cwalrus Posted October 7, 2015 Share Posted October 7, 2015 Hi - i have an animated tube emitting particles. I'd like them to emit outward and upward relative to the tube. When I add velocity to the velocity channels it adjusts their velocity relative to worldspace, rather than the local tube's "x" direction. How can do this thing? thanks! Quote Link to comment Share on other sites More sharing options...
mestela Posted October 7, 2015 Share Posted October 7, 2015 Like this? Set @v as you need it before hitting the popnet, more control that way. emit_along_tube.hip Quote Link to comment Share on other sites More sharing options...
cwalrus Posted October 7, 2015 Author Share Posted October 7, 2015 Yes exactly, thank you. (why's it gotta be so complex?!!!) Quote Link to comment Share on other sites More sharing options...
mestela Posted October 7, 2015 Share Posted October 7, 2015 Well... is it though? I'm finding the push towards vops/wrangles is making more of sops/dops/pops consistent, which I dig. Yes exactly, thank you. (why's it gotta be so complex?!!!) Quote Link to comment Share on other sites More sharing options...
cwalrus Posted October 7, 2015 Author Share Posted October 7, 2015 Yes i think so. To simply include the vectors / normals of the cylinder you have to type a ridiculous custom chunk of code. I would expect VEX like that for more complex tasks, but that seems a rather basic one, right? Also I'm relatively new to it - so I'm sure you're right that it's getting better. But over the last two years I've seen it change so dramatically it's hard to keep up! Quote Link to comment Share on other sites More sharing options...
mestela Posted October 7, 2015 Share Posted October 7, 2015 3 lines of simple vex code seems reasonable to me. That's less than you'd use in an equivalent maya particle expression, and much more performant. I broke it up across a few lines to add more control, and make it easier to read. Keep in mind that it'll work on any kind of geo, static or deforming, and always give you a velocity that's combed to point along the y axis. A few lines of code to do that doesn't seem ridiculous at all. If you literally only need v to point along the axis of the cylinder, and no other purpose, then yeah, of course there's simpler ways to do that. Immediately after you create your cylinder, put down an attribute create sop with the following settings: name:v type: vector value: 0 4 0 When you do your transforms and whatnot after the attrib create, v will always point down the length of the cylinder. Another way would be to use a polyframe node to give you N, tangentu, tangentv, then copy tangentu (or tangentv) into v. Many ways to skin many cats in Houdini. Quote Link to comment Share on other sites More sharing options...
cwalrus Posted October 7, 2015 Author Share Posted October 7, 2015 I guess I'm just frustrated at trying to get up to speed on a convoluted program with shitty outdated docs, which requires code rather often... But you do have a point there. And thanks for the code - i'll have it forever now! 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.