Toggleable static lights?

Posted By: 3run

Toggleable static lights? - 03/09/18 13:32

Is there any way to toggle static (baked) shadowmap/lights? I want to be able to toggle/shoot lights like in older games (half life 1, counter strike etc).

Best regards!
Posted By: Ezzett

Re: Toggleable static lights? - 03/10/18 22:15

I would do it exactly the opposite way by leaving the required walls in the dark without a static light at compile time and placing a dynamic light at runtime which can be toggled off or on.

I think most of the old games did it the same way. Some games used special techniques for blending in or out pre-baked shadows via dynamic lights to get a more realistic result like Thief. This would be exactly what you are looking for. But I don't think that Acknex offers this functionality without writing your own shader and with today's hardware dynamic lights can also cast good looking shadows, so you should try it with dynamic lights.

You can manipulate the static lightmap of a block by using a shader if you want to.

The manual says:
Quote:
If a technique name contains the character sequence "_lm", it is used for rendering lightmapped blocks, models, or terrain. In the case of blocks or models, the second skin (entSkin2) contains the lightmap.

But I think it would be harder to do because you would need to manipulate the influenced lightmapped blocks individually. You would do it like in the game Thief. If the light was hit you would tell all the blocks in a certain radius to increase their shadow map opacity. But you need to be careful not to influence the blocks that are inside the radius but on the other side of the wall and need to stay lit.
Posted By: 3run

Re: Toggleable static lights? - 03/11/18 21:04

Hi there!

Dynamic lights is a good solution, but then there won't be any shadowmaps. And they also pass throw the walls.. And I can't effort myself to have/write shadowmapping shader to use dynamic shadows (it's too much for oldschool project). I'm aiming to have static shadows, but toggleable (with lights).

About using a shader to manipulate the static lightmap, is there anyone willing to help me out? Maybe even for money (would like to know, how much would it cost).

Best regards!
© 2024 lite-C Forums