PDA

View Full Version : Flickering Light?



FluoR
08-24-2006, 11:34 PM
Hey again!

I'm stuck again - I need a flickering (like a bad neon) light. How could I acchieve that? I thought about keyframing the Intensity, but this is hell work over 400frames, because the effects needs to be fast to look like flickering rather than slow pulses. Randomizer?

Any suggestions?

Thanks in advance!


flu0r

Broomy
08-25-2006, 07:29 AM
hi

as an expression u can write this in the expression editor, it will randomize it on each frame though and it will be really flickery, if u or someone else can figure out how to link it to time, say every 10th frame ur away,


pointLightShape1.intensity = rand (0, 1);

well its a start

laters

Broomy
08-25-2006, 07:50 AM
hi again

just had a lookie at the help docs and there is something called "timerX" command that loks like it would be able to help u with the every 10 frames thing.

************************************

$startTime = `timerX`;
for ($i = 0; $i < 5; $i++) {
$elaspedTime = `timerX -startTime $startTime`;
print ("Elapsed Time: "+$elaspedTime+"\n");

**************************************

that is in the help docs and with a bit of playing i think this would be possible to help

I know it is mel and the other is expression but i believe that u can use both for some things.

Hope that helps

laters

sunder
08-25-2006, 08:58 AM
I'll port Broomy's expression to XSI (thanks, Broomy). Set it on your light's intensity
cond( fmod( Fc, 10 ) == 0, rand_0_1( 100 ), 0.75 )

We're checking if the current frame (Fc) is a multiple of 10 and if it is, give it a random intensity between 0 and 1; otherwise, set the intensity to your normal value (set as 0.75)
I'd suggest using a random number instead of 10 when checking the current frame as it looks more natural
cond( fmod( Fc, RAND( 100, 5, 10 ) ) == 0, rand_0_1( 100 ), 0.75 )

Broomy
08-25-2006, 10:45 AM
;p

not quiteas helpfull as i had hoped

never mind :)

sunder
08-25-2006, 10:50 AM
It was useful. You came up with the idea, I just ported it over. Thanks for your contribution :)