Hi,
I’m a bit confused by Zones, specifically how the AmbientColor LightMask is supposed to work. The code is UrhoSharp, but I think the principles should be the same as Urho3D. According to the Urho documentation it is just the object’s and zone’s lightmasks that matter. According to the metadata it is the scene light’s and zone’s lightmask. From a day’s experimenting it seems to me the scene light’s + object’s lightmasks work as expected. As soon as a Zone is added nothing seems to work as expected.
Urho Doc - Zones
Like lights, zones also define a lightmask (with all bits set by default.) An object’s final lightmask for light culling is determined by ANDing the object lightmask and the zone lightmask.
Drawable MetaData:
// Return light mask. Or Set light mask. Is and’ed with light’s and zone’s light
// mask to see if the object should be lit.
Another thing I found strange is that the scene with no lights and no Zone is close to black. If a Zone is added, yet the lightmask set to zero, the scene is a grey colour. I would expect it to still be black. No doubt I’ve misunderstood something here.