# TP Iterator with COS curve.

 Thread Tools Search this Thread Display Modes
 01 January 2013 #1 mstarktv Frequenter   portfolio Michael Stark FX artist Pixomondo USA   Join Date: Dec 2012 Posts: 100 TP Iterator with COS curve. So, this forum has been great help in learning to become comfortable with Thinking Particles. I am back yet again as I am stuck trying to figure this out. I'm trying to become more comfortable using expressions to really direct what my particles are doing. In the image below you can kind of see what I'm trying to do. I have a target object(sphere) and a ground plane. The ground plane is birthing a single shot of particles that aren't visible. Those don't move. Those particles then birth particles from themselves which use a position follow to find the sphere. Using an Iterator, I have it draw a line between the ground particles and the ones going after the target. That is all fine and working My problem is that I'm trying to have the Iterator line curve between the ground particles and the ones that are moving. If you look at the image I wrote the cosine forumula I used to have the line curve. It does does curve, except it doesn't curve be tween the two points. It ends up being at an arbitrary position. I know this may be confusing, so I included the Max 2012 file using TP 5. As always, any help is definitely appreciated. Max File share quote
 01 January 2013 #2 3ak Know-it-All   Join Date: Dec 2002 Posts: 495 Truly speaking it all depends on the kind of curves you need and how you want them to be drawn. 1) If you want just particles that travels from ground to sphere not by straight line but more to the side in the beginning and then more to the sphere at the end you can find every frame 2 vectors - vector from particle to sphere and vector from particle to imaginable "center line" (line from center of the sphere to it's projection on the ground). Then just mix these to vectors with bias == age, time, or normalized distance traveled and use resulting vector as direction of velocity. And you don't need iterator to draw trails in this case. 2) if you need you particles to go straight to the sphere but have trails hanging like cables behind them then you should use iterator to draw bunch of trail particles from initial position of the leader to current pos and then shift those trail particles in local coords. share quote
 01 January 2013 #3 mstarktv Frequenter   portfolio Michael Stark FX artist Pixomondo USA   Join Date: Dec 2012 Posts: 100 Originally Posted by 3ak: Truly speaking it all depends on the kind of curves you need and how you want them to be drawn. 1) If you want just particles that travels from ground to sphere not by straight line but more to the side in the beginning and then more to the sphere at the end you can find every frame 2 vectors - vector from particle to sphere and vector from particle to imaginable "center line" (line from center of the sphere to it's projection on the ground). Then just mix these to vectors with bias == age, time, or normalized distance traveled and use resulting vector as direction of velocity. And you don't need iterator to draw trails in this case. 2) if you need you particles to go straight to the sphere but have trails hanging like cables behind them then you should use iterator to draw bunch of trail particles from initial position of the leader to current pos and then shift those trail particles in local coords. So I suppose what I'm looking to do is the 2nd option. Pretty much I'm trying to have a constant line from the ground particle to the one that is going towards the sphere - but it constantly updates based on the position of the traveling particle. The biggest problem I'm having, which I think i mentioned before, is that the expression does indeed affect the Iterator. However, I want it to affect it within the limits of (between) the 2 particles. I'm going to try and incorporate your math above from the diagram and see where that gets me. share quote
 01 January 2013 #4 CGTalk Moderation Expert   Join Date: Sep 2003 Posts: 1,066,473 Thread automatically closed This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum. __________________ CGTalk Policy/Legalities Note that as CGTalk Members, you agree to the terms and conditions of using this website. share quote

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off CGSociety Society of Digital Artists www.cgsociety.org Powered by vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.