Community
Smoke Forum
Welcome to Autodesk’s Smoke Forums. Share your knowledge, ask questions, and explore popular Smoke topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

expression help

1 REPLY 1
Reply
Message 1 of 2
SDMFX
417 Views, 1 Reply

expression help

Any expressions wizards in this group? I'm banging my head against a wall trying to write what I thought would be a simple expression.

I need to create a random offset. Basically I want the rotation of one channel to animate the rotation of another based on the value at a given frame MINUS a random integer between two given numbers. Say, 1-10.

Here's what I have:

eval(control.rotation.x, frame -(here's where I need my random generator))

the random functions "rand", and "truerand" give a random value per frame. I need a number that doesn't change but is initially random.

 

Any ideas?

1 REPLY 1
Message 2 of 2
msandsman
in reply to: SDMFX

Have you tried putting the random generator on another axis channel and then used a script like this:

eval(control.rotation.x, frame -(eval(random.rotation.x, 1))

That way your random number is evaluated only once.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report