I have a per particle attribute expression that is not being evaluated when I batch render my scene.
The expression tells each particle to change color based on it's distance from the scene origin.
The color is driven by a ramp.
The animation is basically a planet exploding, and the particles are lava exploding out. The lava cools as it travels out into space, hince the change of color.
The expression is a Runtime after dynamics expression:
particle_lavaShape.rgbVPP = mag( particle_lavaShape.position ) / 15;
I added the Vray per particle attribute to my particleShape node and enabled RGB.
Then I connected a ParticleSampleInfo node to my Vray matarial's Self Illumination.
Everything works in the viewport and also renders in my preview window, but...
When I batch render outside of Maya, no color updates, the particles keep the color of the first frame.
I even tried to setup a batch render where it loads each frame individually to see if the expression would be evaluated that way, (below) and that didn't work either.
Batch render:
render -r vray -s 1 -e 1 -cam camera1 -im planet_destruction_lava planet_destruction_lava.ma
render -r vray -s 2 -e 2 -cam camera1 -im planet_destruction_lava planet_destruction_lava.ma
etc...
I also tried to bake the simulation but that didn't seem to work.
Any suggestions on how to fix this or setup a similar particle shader to work?
Will running the expression before dynamics help?
I attached the file.
It loads in a RealFlow particle sequence you will need to replace or just create a new particle system in Maya and apply the shader to it.
Thanks.
The expression tells each particle to change color based on it's distance from the scene origin.
The color is driven by a ramp.
The animation is basically a planet exploding, and the particles are lava exploding out. The lava cools as it travels out into space, hince the change of color.
The expression is a Runtime after dynamics expression:
particle_lavaShape.rgbVPP = mag( particle_lavaShape.position ) / 15;
I added the Vray per particle attribute to my particleShape node and enabled RGB.
Then I connected a ParticleSampleInfo node to my Vray matarial's Self Illumination.
Everything works in the viewport and also renders in my preview window, but...
When I batch render outside of Maya, no color updates, the particles keep the color of the first frame.
I even tried to setup a batch render where it loads each frame individually to see if the expression would be evaluated that way, (below) and that didn't work either.
Batch render:
render -r vray -s 1 -e 1 -cam camera1 -im planet_destruction_lava planet_destruction_lava.ma
render -r vray -s 2 -e 2 -cam camera1 -im planet_destruction_lava planet_destruction_lava.ma
etc...
I also tried to bake the simulation but that didn't seem to work.
Any suggestions on how to fix this or setup a similar particle shader to work?
Will running the expression before dynamics help?
I attached the file.
It loads in a RealFlow particle sequence you will need to replace or just create a new particle system in Maya and apply the shader to it.
Thanks.
Comment