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

Bake or Freeze particle expression to create a forest

1 REPLY 1
SOLVED
Reply
Message 1 of 2
roger
469 Views, 1 Reply

Bake or Freeze particle expression to create a forest

Hi, I’m using particle instances to dress a background mountain prop.

To get random rotation and scale, I use an expression at Runtime before Dynamics.
This get’s me the desired look.
However, every time I re-open my scene, it generates a New random seed, so the trees are never in the same scale or rotation. This gives me issues with renderpasses or re-renders, as things shift.

Am I able to freeze or make the random rotation and scale the same every time?
Can I hook them up with a noise map and Control them by using that?
I don’t want to use x-gen, I’m on Maya 2015, and using redshift3D as my renderer, and the pipeline with x-gen is not optimal.
I’ve tried to export the instances to geometry instances, but it’s to many, and bugs the system Down.
If I could use my simple particle setup, but get the same results every time, it would be brilliant.

This is my current expression;
nParticleMountainLowVegShape.indexPP = nParticleMountainLowVegShape.particleId%3;
nParticleMountainLowVegShape.RandomRotationPP = <<rand(25),rand(360),rand(25)>>;
nParticleMountainLowVegShape.RandomScalePP = rand(0.6,1.5);

Would anyone be able to give me a direction to move in in layman terms?

Thank you!
Roger Gihlemoen!Instancing foilageInstancing foilage

1 REPLY 1
Message 2 of 2
roger
in reply to: roger

I found the answer to my question however, adn it goes like this:

if (particleId == 0)
{
seed (12345);
}

Add this to the beginning of the script, that will generate the same random pattern every time.
To get a different pattern, change the seed number.

R

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

Post to forums  

Autodesk Design & Make Report