Jump to content
-nöm-

User Driven Input for Generating Curves

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-

Share this post


Link to post
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-

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×