Page 1 of 1
blinking light ???
Posted: Fri Oct 14, 2005 3:24 pm
by eviral
How can i create a slow blinking light to simulate a burning torch in a temple ?
Thanks
Eviral
Posted: Fri Oct 14, 2005 11:39 pm
by bitplane
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
Posted: Sat Oct 15, 2005 10:40 am
by needforhint
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
Posted: Sun Oct 16, 2005 5:16 am
by bitplane
mohaps was making a torch animator a while back, you could always pester him for the code
http://irrlicht.sourceforge.net/phpBB2/ ... t+animator
Posted: Sun Oct 16, 2005 7:24 pm
by AcidFaucet
needforhint wrote:
f32 Radius
Radius of light. Everything within this radius be be lighted.
I'm pretty sure you just covered it right there.
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.
Posted: Mon Oct 17, 2005 2:33 pm
by needforhint
that's cool idea, will do