how to sample the colour of a point on a curve along curveu

   427   4   0
User Avatar
Member
2 posts
Joined: March 2017
Offline
Hi,
first post here! Have come from a long time in Maya but have been very slowly picking up bits of Houdini for a while now but still mostly clueless

My question is..
I have an object travelling along a curve with a pathdeform node and want to test the colour of the path curve point at the current animated position of the object traversing it (I coloured the path curve points black and white at different points along the curve) the objective is to emit new points from my travelling object only when the path points are coloured white.

I'm emitting points from a wrangle inside a solver node from point 0 of the object that travels along the curve. Not quite sure how I got this far to be honest but managed to google my way (and its probably not the way it should be done) but am properly stuck now!

I have a curvepos attribute from the pathdeform node thats updated through the animation, and am trying to fathom if it's possible to use that to find the point color currently under the object over the course of the animation so I can emit new points only when its coming back as white.

Hope that all makes some kind of sense.

P.
User Avatar
Member
1 posts
Joined: Sept. 2024
Offline
Hi! Maybe this issue could be related to how the transformation matrix handles angles exceeding 360 degrees, as it tends to automatically adjust them back into a range of 0 to 360.

A possible solution might be to use the rotation channels directly through the Transform object instead of deconstructing the transformation matrix. This might simplify the setup and prevent the pops you’re seeing.

You could also try converting the values to radians and multiplying them by the gear ratio, then converting them back to degrees. This could help manage the rotation smoothly.

Additionally, using debugging tools like the APEX Invoke Graph with a debug graph might help you monitor the process and identify any other potential issues. Let me know if this helps!
Bringing furniture designs to life with high-quality 3D rendering and visualization. Explore limitless possibilities with CGIFurniture!
https://cgifurniture.com/ [cgifurniture.com]
User Avatar
Member
133 posts
Joined: June 2024
Offline
@Cd = primuv(1, "Cd", 0, @curvepos);
User Avatar
Member
2 posts
Joined: March 2017
Offline
Thanks RGaal, much appreciated, have come to the conclusion I need to go away and learn more VEX!
User Avatar
Member
4623 posts
Joined: Feb. 2012
Offline
peterduncand3
Thanks RGaal, much appreciated, have come to the conclusion I need to go away and learn more VEX!

primuv is one of the most useful functions in VEX. If you don't want to use VEX for this, you can also use the Attribute Interpolate SOP. Another very useful and highly performant node that can save a lot of work in VEX and enhance performance when implementing complex operations that require preserving existing attribute values.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
  • Quick Links