Building a Sync Tool for Blender to Defold

Any way to exclude blender collection from sync?

Collections are segregated at the top level. So you will end up with two collections “city” and “_CITY_OBJECTS” when you sync this project.
Currently, I dont listen to the “visible” property of the collection. I can add this quite easily, so I will queue it for my todo list tomorrow :slight_smile:

2 Likes

After a bit of a crazy weekend, I have updated the the release (1.3.1 - just re-download).

  • The visible flag should now work on collections.
  • The version should be updated.
  • The material should utilize the LightMapper setup ‘as is’.

I didnt get time to make a little material sample. Will drop that here tomorrow.

3 Likes

Thanks for update.
-Sync worked :+1:

Something wrong with child collections.
park,beach, … not exported
2022-11-07_14-17-58
export work
2022-11-07_14-17-42

1 Like

I try change lightmap texture size from 256 to 1024.
-hdr texture have 1024x1024 size.
-but in game images have 256x256 size:(

1 Like

I’ll have a look. The way blender handles these visual layers is a pain (its a separate abstract object).
Its likely that the children are not accessible in this object. I’ll check and update. Material incoming too.

Hrm. The texture thing is odd. Will check, I dont think there are fixed conversions, but there might be.

Quick look at the code, and I dont really support collections within collections. Only root level collections are supported because these are mapped to root level Defold collections. To support this I would need to force a collection proxy or mechanism within the collection in Defold - there are a few ways to do this, so I think I might leave this.

Its easy enough to separate and do yourself. There are also performance and management issues if you go down the collection within collection design in Defold (one collection cannot access another).

If you can convince me otherwise, Id be happy to hear your suggestions. :slight_smile:

1 Like

Ok thanks) It is not problem to move collection to root)

1 Like

The texture thing is really odd. The ‘baked’ hdr texture was 1024 and the output baked texture was 256?

Was the base texture (non lightmapped) 256 by any chance?

(Sorry keep editing) - Was the lightmap texture generated with LightMapper? or manual bake?

One question about lightmaps:)
There some color from near building but i need only shadows.
How can i remove it. It is some mode in lightmapper?


2022-11-07_15-19-13

1 Like

Lightmapper.
Yes setting in objects was 1024.
Hdr texture 1024.
png in images 256

1 Like

That looks like LightMapper. I think you might need to play with the settings for “Lighting Mode”. I dont know much about LightMapper, but that mode doesnt really match the bake modes very well.
Its possible you may need to edit the bake modes, so that Combined doesnt include some of the lighting elements you have there:


Im guessing you could disabled all but Direct, Indirect and Ambient Occlusion - maybe Emit.
Should make generation alot quicker too. I’ll test this right now. h5.

Try something like this:
image
Make sure you select Cycles for the render engine to see the Bake option.
Oh, you will need to clean and rebuild the lightmaps of course :slight_smile:

Hmm i understand. This happened when i enable denoise.
Without denoise check box it export 1024 png.
With denoise 256 png
2022-11-07_15-31-56

1 Like

Thanks i will try to experiment:)

1 Like

Oh wow. Thats interesting. I wonder what Denoise is doing?

Diffuse and Glossy lightmaps are great if you want colored lights for say nighttime lightmaps of light sources (like fires, lamps etc).

Plane is green(grass)

1024
grass_denoised 256 denoise

I wonder if Denoise is doing a subsample - ie, 4x subsample (like a quad filter essentially). Thats not very useful.

Another option I have been playing with that seems to make a big difference is the Quality setting. I need to spend some time reading about LightMapper I think. To get the best results.

1 Like

Here’s a modified model material. This is a really simple lightmap multiplier on diffuse and color.
Its probably a bit easier to understand and modify for your needs.

model-lightmap.zip (1.5 KB)

1 Like

Thanks, it worked as i need :partying_face: :+1: :+1: :+1: :+1:

1 Like