Instance color changes per frame

Houdini Integrated Plugin

Moderator: juanjgon

Post Reply
WoutTgh
Licensed Customer
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm
Contact:

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 ( s@id=@ptnum; ), and set to "Instances Id's from" to 'id' point attribute.

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


Wout
WoutTgh
Licensed Customer
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm
Contact:

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 ! :)
User avatar
juanjgon
Octane Plugin Developer
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

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
Post Reply

Return to “Houdini”