Community
Arnold for Maya Forum
Rendering with Arnold in Maya using the MtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I avoid color jitter to animate?

18 REPLIES 18
Reply
Message 1 of 19
lemoinemarc
1517 Views, 18 Replies

How do I avoid color jitter to animate?

I'm using color jitter to give different tint to a lot of trees in my scene. I really love how easy it is to set. The problem is when i start to render frames, the object's color changes at each frame..How can I randomize colors on different objects, without the flickering effect in an animation?

18 REPLIES 18
Message 2 of 19
lee_griggs
in reply to: lemoinemarc

The colors don't change for me. What is your shader setup?

542-color-jitter.jpg

Lee Griggs
Arnold rendering specialist
AUTODESK
Message 3 of 19
lemoinemarc
in reply to: lemoinemarc

543-setting-color-jitter.jpg

Here is my setup..

Message 4 of 19
welcome55
in reply to: lemoinemarc

Same problem here. With fixed camera it works fine. As soon as you use an animated camera the color jitter randomly switch between objects every frame...

Is it a bug?

Message 5 of 19
welcome55
in reply to: lemoinemarc

@Lee Griggs

if I try to use "utility" map with obj as color mode, it does the same as color jitter: objects are changing color randomly with animated camera. With non moving camera it works as it should.

Message 6 of 19

You are right. Since objects, in some cases, gets re-translated with a different name along animation, shaders based on a random seed computed out of the objects' name change their behavior along animation.

We're working on fixing this for the next release.

Message 7 of 19

This is a possible workaround. It may require some work if you have a lot of objects. Anyway:

Instead of using the Object mode, we leverage the User Data one. So, reset the Object's min/max stuff to 0, and transfer the values to the User Data group.
Assign each object an Arnold Property, enable the User Options and enter this string in the field for the first object:

declare seed constant INT seed 1

For the second object, enter

declare seed constant INT seed 2

and so on for all the objects.

In the material editor, get a user_data_int node, and set its Attribute to seed.

What is now going on is the following: on exporting the shapes, MAXtoA attaches the User Options string to the objects. The string means that a constant user data called "seed" is now on the object, its value being 1 for the first object, 2 for the second, and so on.
On rendering, user_data_int reads this values from the hit object. So, if "seed" is found, its value is returned as the output of the shader.
cololr_jitter, in User Data mode, computes the random seed based on the data_input, and so, for obejcts sharing the same seed in the User Options string, you'll get the same randomized value.

Makes sense ?

2336-color-jitter-setup.jpg

2337-color-jitter-user-data.jpg

Message 8 of 19

Zap made me note that constant user data can be set in 2019 also without using the Arnold Properties.

RMB on the object, select Object Properties, and under the User Defined tab enter

seed=1

for the first object, etc.

instead of user_data_int, use user_data_float, and prefix the attribute name by "usr_", as in the screenshot.

Another advantage is that this can also be scripted

2338-color-jitter-object-properties.jpg

Message 9 of 19
welcome55
in reply to: lemoinemarc

Thanks Nicola, I tried to use the data instead of object but did not know how to declare the variable. I hope this will be fixed in the next update.

Message 10 of 19
welcome55
in reply to: lemoinemarc

ok good to know. thanks

Message 11 of 19
masterzap
in reply to: lemoinemarc

Of course, you already have user data with a running number for each object, it's called "nodeHandle". It should be safe to use for randomization purpouses.

/Z

Message 12 of 19
welcome55
in reply to: lemoinemarc

I have another question regarding this jitter color. I have a tree, multi subobject material for trunk, branches and leaves. How could I use the jitter color to produce randomnes in the color of the leaves? Is there an option to use user data with a specific uv set for example?

Message 13 of 19

Right Zap ! I was focusing too much on 2018.

So, you can forget about all the user options and properties, and just use the following.

2339-color-jitter-handle.jpg

Message 14 of 19
welcome55
in reply to: lemoinemarc

It does not work with an animated camera. Still have the random changes along the animation. In 2018 or 2019 it is the same...

Sorry wrong test. It does work in 2018 and 2019.

Thanks a lot!

Message 15 of 19

The reported problem was fixed in version 2.2.956, released yesterday.

Message 16 of 19
welcome55
in reply to: lemoinemarc

Thanks! Tested and it works fine!

Do you know if there is any trick using color jitter with leaves of a tree (all leaves, branches and trunk in same object), to randomize a little bit the leaves color?

thanks

Message 17 of 19

@Olivier Desrois
See if this can help: https://answers.arnoldrenderer.com/questions/7547/pflow-and-color-jitter-1.html?childToView=7629#ans...
In short, if the tree is a single mesh, then you must provide the shader a way to identify the leaves being hit. Send me a simple scene if you want me to help further.

Message 18 of 19
welcome55
in reply to: lemoinemarc

thanks for that, it works very well! Arnold is very powerfull! (thanks to the very good and responsive support!)

link to solution for the others:

https://answers.arnoldrenderer.com/questions/7547/pflow-and-color-jitter-1.html?childToView=7629#ans...

Message 19 of 19
dangoldstein
in reply to: lemoinemarc

I am also getting this flickering with the aiColorJitter node in Maya 2019. I have a figure with just an aiStandardsurface and with that the aiColorJitter node. I wanted each polygon of the figure to be a different color so I set the aiColorJitter to "face". Looks correct when I render. However, I then create a MASH Explode node so that all the polygons start off on the ground and then piece back together to form the figure. During the explode/build up the polygons constantly flicker. Is there any way of fixing this?

Here's an example of what my figure looks like. https://www.pictorem.com/127099/Parrot%20LOW%20POLY%20ART%20.html but each poly explodes out separately with the MASH node.

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

Post to forums  

Autodesk Design & Make Report