View Single Post
# 5 03-02-2013 , 05:03 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988

$time = `currentTime -q`;

pointLightShape1.intensity = rand(#,#)* $time/$time;

go to the light intensity> right click > create new expression> paste into bottom field> click create.

when using this obviously you need to change the light type, and replace # with whatever you intensity values are going to be.

The problem is that rand is evaluated per-frame, so it will of course create a flickering effect. As Kari has shown above, using the noise function will create a much smoother transition in-between frames.

Imagination is more important than knowledge.