WIP - Attach to Curve - [Houdini Utility]

   3451   0   1
User Avatar
Member
37 posts
Joined: 3月 2019
Offline
Hi everyone,

bit late to the party, but I thought I'd get a little WIP thread up and running regardless.

Attach to Curve

Scope:
My plan for this Tech Art Challenge is to submit a utility HDA that makes it easy to:
  • add (and remove) points to curves directly in the viewport.
  • attach them to the curves so modifications to them also move the points
  • be able to modify the points after they have been placed / adjusted by the underlying curve

Use case and example:
Placing a specific object along a curve.
Easily done:
  1. use the addSOP to add a point
  2. move it roughly to the position I want the object to be
  3. use a raySOP to snap the point based on minimum distance
  4. transfer various attributes from the curve, such as normal, tangent and up vector
  5. place the object using a copytopointsSOP

While this becomes muscle memory at a certain point, it is a lot of steps that can be streamlined.
Also, the real issue shows when trying to modify the curves after the fact. Maybe a client asks for some changes.
The point that was added previously is in world space, and changing the curve too far might influence the object placement that we had set up drastically.
If we're lucky, the same position we had placed the point at originally is still the closest and it will snap where we want. If we're less lucky, and a different curve happens to now be closer to the point, it will no longer end up in our desired spot.
See this visually:


Progress thus far:
Viewer State to easily add points, with preview highlight for the location of the created point, as well as the curve that it will be placed on.


This one I'm pretty proud of: The snapping distance is based on screenspace coordinates, instead of worldspace.
This should allow for a more consistent feeling when adding the points.
In the example below the snapping distance is 10 pixels.


Inspiration:
A big inspiration for this is the RC Spline feature of iToo Railclone.
The timestamped video below is a trailer for it and demonstrates some of the workflows that this should enable:
https://www.youtube.com/watch?v=ngKL3BNap8Y&t=74s [www.youtube.com]

Looking forward to the remainder of the challenge!

EDIT: Changed .mp4 attachments for .gif
Edited by sebastianknoll - 2022年11月23日 05:24:04

Attachments:
problem_to_solve_01.gif (987.5 KB)
attach_to_curve_placing_points_01.gif (628.2 KB)
attach_to_curve_screenspace_snapping_distance_01.gif (6.0 MB)

  • Quick Links