Jump to content

User Driven Input for Generating Curves


-nöm-

Recommended Posts

I'm building a crowd simulation system by creating custom VEX operators being cooked in a SOP simulation.

Along with implementing basic behaviours(arrive,separation,cohesion,alignment,obstacle-avoidance,wander,leader following etc.) by manipulating point positions being accessed from the amazing Houdini point cloud feature, I'm working on a path-following behaviour.

I'd like the user to be able to define his own path, a curve rather(as I'm using a curve to define a path), is there anyway I can make my digital asset user-driven, wherein the user can have an option to simply draw up the curve on the grid?

If I found nothing, I would let the user load up an image file with a path drawn on it, and let that form the path to be followed, but I'd have to somehow scatter points(after tracing it) in such a way that they form path-like connected line-segments(even if they might not be curves, it'll still work if I can simply get to access the points forming the line-segments of the path).

But I'm sure someone can come up with a far better solution than that, really looking forward to it! (It's eating the insides of my brain now!!)

Thanks!

Cheers

Edited by -nöm-
Link to comment
Share on other sites

Yes, kinda! :)

But how do I assign this tool to the interface of my digital asset, in such a way that any 'user' using my digital asset will be able to draw the curve and the curve will automatically get connected to the node I want it to, once it has been created (by the user) ?

I'd like the curve/path to be user-driven, rather than me defining the curves and packaging the whole as an asset.

Edited by -nöm-
Link to comment
Share on other sites

Yes, kinda! :)

But how do I assign this tool to the interface of my digital asset, in such a way that once any 'user' using my digital asset will be able to draw the curve and the curve will automatically get connected to the node I want it to, once it has been created (by the user) ?

I'd like the curve/path to be user-driven, rather than me defining the curves and packaging the whole as an asset.

Let the user paint curves outside of the asset and then use a objectmerge SOP with a promoted objectpath to bring it into the HDA.

1. Its easy to implement.

2. The user might want to use a curve generated some other way.

Edited by mawi
Link to comment
Share on other sites

Draw Curve SOP is just an asset using Stroke SOP inside to draw curves, you can do the same, just use Stroke SOP inside of your asset an promote Number of Strokes (stroke_numstrokes) multiparm to your asset

then type stroke into Type Properties/Basic/Default State field on your asset, that's it

or you can even package Draw Curve SOP in your asset instead of just Stroke SOP (and promote the same multiparm and use stroke as default state as well)

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...