Most probably a really simple answer, I have been following along with the tutorial below:
https://www.youtube.com/watch?v=_xIMLjSx9QQ [www.youtube.com]
And everything works except the new point generation. Is there something glaringly obvious with the code below that I am doing wrong? everything else works, the generation of points at the beginning etc.
int pointCloud = pcopen(0, 'P', @P, 1, 50); vector localCentre = pcfilter(pointCloud, 'P'); vector v = set(@P.x - localCentre.x, @P.y - localCentre.y, @P.z - localCentre.z); @P += v * 0.5; if(@age > 1){ vector randOffset; randOffset.x = -0.01 + (noise(localCentre.x + $FF *@age) * 0.02); randOffset.y = -0.01 + (noise(localCentre.y + $FF *@age) * 0.02); randOffset.z = -0.01 + (noise(localCentre.z + $FF *@age) * 0.02); int newPoint = addpoint(geoself(), @P + randOffset); @age = 0; } else{ @age =+ abs((random($FF + @ptnum)) * 0.05); }
Setup:
Houdini 17.5.360 windows
Cheers
Iskander