Visual Cortex Lab Posted December 14, 2005 Share Posted December 14, 2005 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 Quote Link to comment Share on other sites More sharing options...
deecue Posted December 14, 2005 Share Posted December 14, 2005 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 Quote Link to comment Share on other sites More sharing options...
Visual Cortex Lab Posted December 14, 2005 Author Share Posted December 14, 2005 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. Quote Link to comment Share on other sites More sharing options...
doc Posted December 14, 2005 Share Posted December 14, 2005 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 Quote Link to comment Share on other sites More sharing options...
peship Posted December 14, 2005 Share Posted December 14, 2005 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. Quote Link to comment Share on other sites More sharing options...
doc Posted December 15, 2005 Share Posted December 15, 2005 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 Quote Link to comment Share on other sites More sharing options...
Visual Cortex Lab Posted December 15, 2005 Author Share Posted December 15, 2005 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. Quote Link to comment Share on other sites More sharing options...
Visual Cortex Lab Posted December 15, 2005 Author Share Posted December 15, 2005 also ... i need to use many curves for this .. not just one. just in case. thanks Quote Link to comment Share on other sites More sharing options...
Visual Cortex Lab Posted December 15, 2005 Author Share Posted December 15, 2005 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. Quote Link to comment Share on other sites More sharing options...
edward Posted December 15, 2005 Share Posted December 15, 2005 Er, but that's what Doc's method does (points randomly close and along to the curve). Quote Link to comment Share on other sites More sharing options...
anakin78z Posted December 15, 2005 Share Posted December 15, 2005 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. Quote Link to comment Share on other sites More sharing options...
doc Posted December 15, 2005 Share Posted December 15, 2005 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.