Jump to content
Visual Cortex Lab

Particles On Curves

Recommended Posts

is there a way to ... "drive" the way of particles with curves? ... i need get something like the water flow on a river which avoids rocks and such.. by drawing curves for the particles motion .. or to make another example to create a crowd of insect that walks around a room.. avoiding stuffs... but i wish to "draw" the path.. that's it. and not just one curve.. many.. which the particle system should distribute itself on the curves.

any idea is welcomed.

:)

cheers

Share this post


Link to post
Share on other sites

there are a number of ways to use curves to drive particles.. i suggest doing a quick search here and over at sesi forums for the different methods available (attractors, creeps, etc)..

as far as what you're wanting to do.. why not just send your particles down the river and use attractors with negative radial forces on your collision objects? Also, you'll probably want some direct collisions against the objects as well instead of just simple avoidance, so play with some bounce/slide action off of those..

hth

Share this post


Link to post
Share on other sites

my target actually is to create a ... texture ... (rendering from top) .. therefore i'd like less "automatic" stuffs as possibile..

anyway .. my lame part went out for a while.. and after looking ad Demos i found something that might help :)

thanks for your fast reply thought.

Share this post


Link to post
Share on other sites
is there a way to ... "drive" the way of particles with curves?

23257[/snapback]

Download the tangent sop from the houdini exchange and apply that to your curves.

then you can use the attribute transfer pop to have the particles inherit the tagent attribute

and use this to move your particles.

If you have trouble let me know and I'll give you a more detailed description.

all the best

Luca

Share this post


Link to post
Share on other sites

why not avoiding the tangent thing and simply using sortSOP to order the points + pointSOP to align the normals along the curvature, and then as doc said - attribute transfer.

Share this post


Link to post
Share on other sites
why not avoiding the tangent thing and simply using sortSOP to order the points + pointSOP to align the normals along the curvature, and then as doc said - attribute transfer.

23264[/snapback]

I assume you mean subtracting the position of one point from the other to get the normal.

the only problem with this is that you always get one normal that's screwed up (the point at the

end of the line points to the point at the begining of the line). The tagent sop's nice

because it avoids this problem.

As an aside you could always use primduv expression (which is what the tagent sop uses)

to get the tangent.

typical houdini, many ways to skin a cat :)

Share this post


Link to post
Share on other sites

would you like to ... better explain me such examples with expressions and such... i mean.. i'd like to try those method but i'm not really guru with attributes.. and i lack of knowledge on many expressions .. :):)

cheers.

Share this post


Link to post
Share on other sites

hm .. ok i archivied to use of force/curve setup ... but.. now i've got a problem .,, about distribution of particles.

with such method i see all my particles like running ON the curve... while what I'd like it to create some path where particles should stay (randomly) on or close to it... but not attracted until they all lay on the curve... like having "tubes" where those particles should walk inside once they're attracted ... hope this help showing my target :)

cheers.

Share this post


Link to post
Share on other sites

Howdy,

I did something like this recently. One of the things I struggled with is that my particles had to move very fast, and using the tangent method they would inevitably stray off the curve. I created a system where the particle wouldn't look at the tangent of the curve, but rather it would figure out where in relation to the curve it should be next frame, after which I would set the acceleration to that. I think I did it by setting the uvs on the curve to real world scale, and looking at the velocity of the particle I could figure out how far along the curve it would travel, then grab the position, N and up from the curve based on the uv I calculated and figure out where the particle would go. I had much more control that way, and since you're only modifying acceleration, you could still add noise, gravity, etc, and it would look fairly natural.

Share this post


Link to post
Share on other sites
would you like to ... better explain me such examples with expressions and such... i mean.. i'd like to try those method but i'm not really guru with attributes.. and i lack of knowledge on many expressions .. :):)

23276[/snapback]

Hi Sum

have a look at the attached hip for an example

popMoveAlongCurve.hip.gz

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

×