Thursday, 5 January 2017

add point to centre of primitive and have UVs (sort of)

Just to add points and then remove the primitive.

addpoint(0, @P);
removeprim(0, @primnum, 1);



This goes into a primitve wrangle!


To also have UVs:

vector uv = primuv(0,"uv",@primnum,set(0.5,0.5,0));


int pt = addpoint(0,@P);
removeprim(0, @primnum, 1);


setpointattrib(0,"uv2",pt,uv,"set");


Above this wrangle node, we'd initialise the uv2 value. After it, we'd rename the attribute to "uv". For some reason Houdini doesn't like it when you have UVs in both point and vertex.

No comments:

Post a Comment