Hi
Lightmap
@ Paul : I have a question about lightmap technic in AGK.
I have tried SetObjectLightmap(). It works fine and produce great effects, in interior/exterior scenes (days).
But, I have seen that the "white" surface (the white color in the texture) always shine, even if all the lights are black (0,0,0).
I would like to know if it's possible to have another mode to calculate the lightmap.
For now, it seems to be in "overlay" or "additive" mode (it use the black color and the white color too).
Could it be possible to have a sort of multiply mode (only the black/grey color is used) ?
For Example a command like :
SetObjectLightmapMode(obj, mode)
mode = 0 (normal, like actually), mode =1 (multiply : only the black/grey colors are used, and the color don't disappear when we add some lights over the lightmap)
To understand the interest of this type of lightmap, I have made some lighting tests :
- my test level without lightmap, and some lights/sun/ambientcolor (night scene) :
The same scene with a lightmap on the ground.
Tthe ground seems to be self-illuminated, it's strange and not very great for this type of scene ^^ :
The same scene, with lightmap, and SetObjectColor() on the ground object to correct his color.
It's not bad, but not a very good technic, because, we lost the brightness of the lights.
The same scene in blender :
it's a good result because the lightmap is in multiply mode.
So the shadows of the lightmap are always presents, event if we put the light over it, which is better. In AGk, the shadows of the lightmap disappear in this mode (which is a good mode for some scene, but not for this type of scene
).
And here is a "fake" lightmap (multiply mode) to see what this scene could be with this mode (multiply).
The lightmap is on the diffuse texture (you can see the texture of the ground is more pixelised as the other images) :
What do you think about this mode ? Do you think it could possible to have a multiply mode for lightmap (AGK could have two modes fr lightmap : the actual, the multiply).
or is there another way to have this result (texture0 = diffuse, texture1 (with different UV) = lightmap in multiply mode) ?
I have thinking about a shader but I don't know how to have this result.
Light :
Will you add the directionnal light (available in the previous version) which is great to create good light ?
Bugs)
- ObjectRayCast() doesn't work with SetObjectScale()
- SetObjectTransparency(Obj,2) : the additive mode doesn't work (tested on win8 and android)
- the pointlight seems to be bugged on android (tested on samsung galaxynote 10.1) :
SetObjectTransparency(Obj,2)-additive mode & light bugs :
Thank you very much
http://www.dracaena-studio.com