Page 1 of 1

Instance color changes per frame

PostPosted: Mon Mar 02, 2020 7:31 pm
by WoutTgh
Hi,

I'm using the random color node as an input for a gradient to color instances but it changes with every frame. I tried explicitly creating the id attribute on the points ( [email protected][email protected]; ), and set to "Instances Id's from" to 'id' point attribute.

But it's still , well, a little bit too random :)


Wout

Re: Instance color changes per frame

PostPosted: Mon Mar 02, 2020 7:58 pm
by WoutTgh
OKay, fixed:

I used the this osl shader:

#include <octane-oslintrin.h>
shader randomColorGreyFromInstance(
int seedI = 0 [[string label = "Seed"]],
output color c = 0)
{
float noiseOut = noise("cell", (float)(_getinstanceid() + seedI));
c = color(noiseOut, noiseOut, noiseOut);
}

and added the Id attribute as described above. Still, the random colour node might need an update to not be random over time ! :)

Re: Instance color changes per frame

PostPosted: Mon Mar 02, 2020 9:13 pm
by juanjgon
This problem can come from the multi-thread scene extraction feature, or from the fact that Houdini is modifying the internal instances order in each frame. Can you please attach an example scene with this problem to take a look at it here?

Thanks,
-Juanjo