Instance color changes per frame

Forums: Instance color changes per frame
Houdini Integrated Plugin

Moderator: juanjgon

Instance color changes per frame

Postby WoutTgh » Mon Mar 02, 2020 7:31 pm

WoutTgh Mon Mar 02, 2020 7:31 pm
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
Licensed Customer
 
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm

Re: Instance color changes per frame

Postby WoutTgh » Mon Mar 02, 2020 7:58 pm

WoutTgh Mon Mar 02, 2020 7:58 pm
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 ! :)
WoutTgh
Licensed Customer
Licensed Customer
 
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm

Re: Instance color changes per frame

Postby juanjgon » Mon Mar 02, 2020 9:13 pm

juanjgon Mon Mar 02, 2020 9:13 pm
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
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Return to Houdini


Who is online

Users browsing this forum: No registered users and 11 guests

Thu Mar 28, 2024 1:17 pm [ UTC ]