dmarkwick 261 Posted August 15, 2007 I'd like some of my particle effects lit up, what's the best way to do this? I don't know anything about light objects, illuminated textures (if such a thing is even possible) and of course searching hasn't brought anything up. I see that default fire & explosion effects have dynamic lighting effects. Can anyone (wait for it......) shed any light on this for me? Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted August 16, 2007 Here's an example for you . <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _fireLight = "#lightpoint" createVehicleLocal _buildingPosition; _fireLight setLightColor [0.1,0.05,0.01]; _fireLight setLightBrightness 0.02 * _size - _timeElapsed/500 + random 0.02 - 0.01; _fireLight setLightAmbient [0.3,0.2,0.1]; _fireLight LightAttachObject [_building,[0,0,0]]; I used this in a loop to create a nifty flickering effect: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _fireLight setLightBrightness 0.02 * _size - _timeElapsed/500 + random 0.02 - 0.01; Basically, it's just like creating a particlesource, except much simpler. For your convenience, references for the commands used. http://community.bistudio.com/wiki/createVehicleLocal http://community.bistudio.com/wiki/setLightAmbient http://community.bistudio.com/wiki/setLightBrightness http://community.bistudio.com/wiki/setLightColor http://community.bistudio.com/wiki/lightAttachObject Share this post Link to post Share on other sites
dmarkwick 261 Posted August 16, 2007 Brilliant Thanks very much CSL, very useful info you have there. Share this post Link to post Share on other sites
dmarkwick 261 Posted August 16, 2007 What would be the practical difference between setLightColor and setLightAmbience? Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted August 16, 2007 If I recall correctly, and I may not, ambient is the color of the light at the center of the light source and color is the color of the light at the edge of the light source. To find out for sure, set one to red and the other to green and see what happens . Since it's not very clear, you may want to let us know the result for sure. Share this post Link to post Share on other sites
dmarkwick 261 Posted August 16, 2007 After doing what you suggested CSL I found that setLightAmbient does the thing you expect a light colour command to do - the terrain and surrounding objects are bathed in this colour. As for setLightColor, it controls the "haze" seen around the lightsource, the flare, the ice-ring type optical effect. Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted August 17, 2007 Added Biki notes to reflect that. Share this post Link to post Share on other sites