Light Attenuation

thelegacy

09-03-2006 14:38:53

Hey, just a quick question. I noticed with the light exportation the the lights Attenuation isn't exported along with the light. But I also noticed in the SDK that Ogre does indeed have the capabilities.

void setAttenuation (Real range, Real constant, Real linear, Real quadratic)
Sets the attenuation parameters of the light source ie how it diminishes with distance.



If it can't be exported with the exporter, does anyone know an easy way to change the attenuation in the .osm file?

<light name="Omni08" type="omni" on="true" CastShadows="no" intensity="1">
<position x="1471.84" y="-974.854" z="2191.46" />
<rotation x="0" y="0" z="0" w="-1" />
<scale x="1" y="1" z="1" />
<color r="1" g="1" b="1" />
<specular r="1" g="1" b="1" />



Sorry if this doesnt all make sense, I'm a level designer trying to help out our coder as he's a bit over worked.

Lioric

10-03-2006 15:59:13

I will review this, it should be exported with the light

thelegacy

12-03-2006 14:32:41

Thanks alot, if you get to the bottom of it, I'd be very appreciative if you let us know.. Maybe I'm doing something wrong with exporting?

thelegacy

15-03-2006 13:33:14

Anyone have an idea of how I can manually set the attenuation? Or if there is something I'm doing wrong with the export?

Project is due in a week and this is one of the last things left to resolve.

Lioric

16-03-2006 01:34:55

Download and apply this hotfix, it should let you export light attenuation in any scene case

hotfix #57oCE

(This fix will be in the next update, but its here if your project needs it now)

And download the updated scene loader lib from the downloads page