How can i create a slow blinking light to simulate a burning torch in a temple ?
Thanks
Eviral
blinking light ???
get the light's data like so..
video::SLight *lightdata = light->getLightData();
and change whatever you like at runtime-
http://irrlicht.sourceforge.net/docu/st ... light.html
video::SLight *lightdata = light->getLightData();
and change whatever you like at runtime-
http://irrlicht.sourceforge.net/docu/st ... light.html
-
- Posts: 322
- Joined: Tue Aug 30, 2005 10:34 am
- Location: slovakia
but the Slight structure doesnt have such a parameter to use:
Public Attributes
SColorf AmbientColor
Ambient color emitted by the light.
bool CastShadows
Does the light cast shadows?
SColorf DiffuseColor
Diffuse color emitted by the light.
core::vector3df Position
Position of the light.
f32 Radius
Radius of light. Everything within this radius be be lighted.
SColorf SpecularColor
Specular color emitted by the light.
I haven't tried do a blinkin light myself yet, but is the irrlicht anim() function able to animate color of a light? I would just switch it from black to disered one in an interval
Public Attributes
SColorf AmbientColor
Ambient color emitted by the light.
bool CastShadows
Does the light cast shadows?
SColorf DiffuseColor
Diffuse color emitted by the light.
core::vector3df Position
Position of the light.
f32 Radius
Radius of light. Everything within this radius be be lighted.
SColorf SpecularColor
Specular color emitted by the light.
I haven't tried do a blinkin light myself yet, but is the irrlicht anim() function able to animate color of a light? I would just switch it from black to disered one in an interval
what is this thing...
mohaps was making a torch animator a while back, you could always pester him for the code
http://irrlicht.sourceforge.net/phpBB2/ ... t+animator
http://irrlicht.sourceforge.net/phpBB2/ ... t+animator
-
- Posts: 7
- Joined: Sun Oct 16, 2005 1:37 am
I'm pretty sure you just covered it right there.needforhint wrote:
f32 Radius
Radius of light. Everything within this radius be be lighted.
If the light has 0 radius, it's not going to be producing light. If you continually modulate the radius you'll get a pulsing effect of sorts. Combine that with modifications to some of the other settings such as color changes and so on and you shouldn't have a problem producing a torch shimmer effect.
Haven't actually tried doing such, but unless I'm missing some critical detail it works in logic and doesn't clash with the manual.
-
- Posts: 322
- Joined: Tue Aug 30, 2005 10:34 am
- Location: slovakia