Dynamic Lighting and Lightmapping Conundrum [Solution?]
by GamerX · in Torque 3D Professional · 11/28/2014 (6:01 am) · 0 replies
After *still* failing to get some answers from the Purelight section of this forum, which looks dead btw I tried to get some answers somewhere. So searching here and there across the vast web, i finally got this "anecdote" from a lead game engine project guy who really knows what he's doing. I'm sharing this info to this community and maybe you guys can break it down to actual shader code and stuff and make some improvements and fix the lightmap and dynamic lighting issue.
i've done my part. good day all
Quote:To allow lightmaps to have different (lower) resolution and to respond to dynamic lights properly separate diffuse & lightmap are needed. The ambient pass would modulate the diffuse with lightmap, while dynamic light passes can sample diffuse normally to add dynamic light contribution. To combine dynamic & static shadows nicely would need different shaders and need dedicating eg. the alpha channel of the lightmap as the shadow mask. But in case you only bake the secondary or ambient-like lights to the lightmap, and let strong light + shadows (eg. sunlight) come from dynamic lighting only, that would not be necessary.
i've done my part. good day all
About the author
Hard Core Gamer