aoisaki Posted April 11, 2016 Share Posted April 11, 2016 I'm watching dragon 2's ice blast system breakdown I got confuse about how to create center curve and custom velocity please help ! Quote Link to comment Share on other sites More sharing options...
mestela Posted April 11, 2016 Share Posted April 11, 2016 (edited) Here's one way to define a spine curve along a spray of particles that have been hit. -store the hit time as @firsttime -normalise that, store it as @u -quantize @u to the amount of points you want along the curve. now there's patches of points that share the same @u -add prims by attribute @u, now you have little polyline islands that have the same @u value -promote the average @P to prim, then back down as @Pavg -set @P as @Pavg, fuse. Now each island has been collapsed to a single point at its average center -sort these points by @firsttime so they're in order -add prim, this will make the line -smooth pop_curve_center.hipnc Edited April 11, 2016 by mestela 4 Quote Link to comment Share on other sites More sharing options...
aoisaki Posted April 12, 2016 Author Share Posted April 12, 2016 Here's one way to define a spine curve along a spray of particles that have been hit. -store the hit time as @firsttime -normalise that, store it as @u -quantize @u to the amount of points you want along the curve. now there's patches of points that share the same @u -add prims by attribute @u, now you have little polyline islands that have the same @u value -promote the average @P to prim, then back down as @Pavg -set @P as @Pavg, fuse. Now each island has been collapsed to a single point at its average center -sort these points by @firsttime so they're in order -add prim, this will make the line -smooth pop_curve_center.hipnc wow!Thank you very much! It's perfect! Quote Link to comment Share on other sites More sharing options...
aoisaki Posted April 12, 2016 Author Share Posted April 12, 2016 Here's one way to define a spine curve along a spray of particles that have been hit. -store the hit time as @firsttime -normalise that, store it as @u -quantize @u to the amount of points you want along the curve. now there's patches of points that share the same @u -add prims by attribute @u, now you have little polyline islands that have the same @u value -promote the average @P to prim, then back down as @Pavg -set @P as @Pavg, fuse. Now each island has been collapsed to a single point at its average center -sort these points by @firsttime so they're in order -add prim, this will make the line -smooth pop_curve_center.hipnc sorry for bothering you again. How can i use this center curve to define the vector like the picture 2. Quote Link to comment Share on other sites More sharing options...
argilop Posted April 12, 2016 Share Posted April 12, 2016 You can compare the average Position with your current P and then if its "x" or "z" values are greater or smaller go one way or the other. Quote Link to comment Share on other sites More sharing options...
mestela Posted April 12, 2016 Share Posted April 12, 2016 (edited) -set each point normal to {0,1,0} -get closest point on the curve (a) -get the next point on the curve (a+1) -vector along the curve is b - a -vector away from the curve for each point is a - @P -add those vectors to @N, scale to taste would need further refining no doubt, but that's the general idea. pop_curve_center_normal.hipnc Edited April 12, 2016 by mestela 1 Quote Link to comment Share on other sites More sharing options...
aoisaki Posted April 13, 2016 Author Share Posted April 13, 2016 -set each point normal to {0,1,0} -get closest point on the curve (a) -get the next point on the curve (a+1) -vector along the curve is b - a -vector away from the curve for each point is a - @P -add those vectors to @N, scale to taste would need further refining no doubt, but that's the general idea. pop_curve_center_normal.hipnc pop_spine_n.gif wow! thank you very much! you rock! 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.