ShaderFX bridge and light decay settings question.

Evak

24-04-2008 19:49:05

I have been looking at doing some interior lighting using shaders and Ofusion supports the attenuation per light correctly.

I was wondering if it would be possible to get decay to work too so you can get a nice light transition that compliments the attenuation with a smooth transition.

At the moment the attenuation is an abrupt on off stransition at the far falloff range, so a decay range smaller than the atten range is needed so the light fades gently at the far range.

I made a video a while back, that shows attenuation at the beginning, you can see the lighting on the tiles in the level turn off abruptly as the far attenuation range is exceeded. The video shows the decay setting being adjusted to make a smooth transition from lit to not lit.

http://www.flow3d.org/AD/Untitled.html

I was wondering if it would be possible to add decay to the shaderfx bridge exported shaders to compliment attenuation. or whether there was an easy way to add it manualy. ShaderFX lighting is somewhat limited and you did a great job with the shaderFX bridge so far. This is the one remaining lighting issue I have come across. Previously I've been doing outdoor sunlit scenes that havent required many dynamic lights.

I'm creating an example FPS scene for a client with static ambient lightmaps where dynamic lights only effect dynamic meshes in the scene. The decay combined wiht attenuation should provide clean transitions and let Ogre handle the dynamic light 1/0 automaticly.

Lioric

25-04-2008 15:52:17

Custom light attenuation support is being implemented, using the range, linear, quadratic and constant properties

The issue is that shaderFX doesnt support it in the shader (per light attenuation settings), probably this support will be visible only in the preview viewport

Evak

25-04-2008 17:20:46

perfect thanks. Yeah shaderFX has quite a few limitations with shaders. Your bridge handles the lighting much better already :).

Evak

27-04-2008 22:12:38

Ok thanks, I was only checking if it could be done initialy. Should I post a Ofusion Pro support ticked regarding the per light decay?.

Lioric

28-04-2008 17:26:41

Yes, if you need this asap