Jump to content
Mechanica

Rotate pyro container

Recommended Posts

Hello everyone,

So the basic idea I'm trying to achieve is some geometry emitting a flame following a path. Not really difficult and I've got the basic version down. The trouble starts when I try to implement a rotated container for efficiency. My object doesn't travel at 90 degree angles on a perfectly aligned grid, that'd be boring! So why should I waste time simulating all that empty space?

So what I've got is a geo node with a CHOP Network inside, constraining it to follow a path from a separate geo node. I create some velocities for my path-following, constrained object, then rasterize to volumes, as per the H17 workflow. Then in my curve object, I create orient data according to it's points, which I feed into a "Point Position" for my smoke object inside my DOPnet (I then drive it's "point number" parameter with a setup that determines the point along the path that is nearest my constrained object's center). Hooray, the container rotates along the path! Don't party yet...

The point position node sets the "Position" data to pivot 0, and the translate data to match whatever "point number" it's looking at, causing the rotations to be applied around world center. But only for the incoming volumes, not the container. The container is positioned exactly where you would expect (perhaps because of the "Gas Resize Fluid Dynamic"). This seems kind of stupid, and I'm not sure when this would be useful. Maybe if the transforms were on the source volumes but NOT their containing object? I don't know.

To solve this we next add an RBDState node because apparently it's one of the only other nodes that can write to the position data (THAT took a while to figure out). In the RBDState node we set the pivot to reference the translate of the original emitter (which is constrained to move along the path), and the translation (confusingly parameterized as "position") to zero, and set both of these parameters to "Set Always". Good god we're so close...

But no. The container is correct, following our emitter's orientation along the path. The volumes are there too, centered where they should be, but wait... They're double rotated now. They get the rotation that's applied to the source volumes by the CHOP net in the object where they're created, AND the same rotation applied again from the "point position" node.

I'm having a devil of a time with this. If anyone can help I'd be very grateful.

 

There's another thread here: 

where someone managed to fix this by editing the old "Source Volume" node, but it doesn't seem to work the same way with the "Volume Source" node, or at least that I could discover.

inverse_transforms_demo_4.hip

Share this post


Link to post
Share on other sites

there is so much stuff happening in your hip file that it makes it very hard to even start debugging.

But as a quick suggestion - maybe it will be easier for you to reverse the problem and rotate curve/rocket/velocities while having sim in 0,0,0 (and then put it back to world space).

Share this post


Link to post
Share on other sites
Posted (edited)

Hey, thanks for even taking a look! Yeah, sorry it’s a little complex. I tried to simplify it as much as possible while still keeping everything that seemed essential to the equation. I’ll see if I can make it lighter.

Interesting idea. I had a version somewhat like that where I ran the the sim stationary at world origin, only pulling in the rotations from the current point on the curve, then afterward constraining everything to the curve. I managed to make this work, but the problem I ran into here was the pyro being emitted acted like a stiff object being pulled along by the sphere, as opposed to particles emitted into space. What I mean is, the flames would shoot out into a big mushroom, and then drag along in that shape like a weird parachute, instead of being pulled out long.

 

What I didn’t try was rotating the curve itself. That’d be curious, to have the curve pivot on it’s own orient points so that the current point’s axes always aligns with 0,0,0. Then move EVERYTHING into place post sim. I can give that a try. 

 

Edit: Thinking about it more, won't rotating the curve itself just make a sim that moves in a straight line? That way it won't throw things out into space, creating a flame that rotates with the source, like a stick stuck in a ball?

Edited by Mechanica

Share this post


Link to post
Share on other sites

If you haven't already checked out this tutorial, he explains how to rotate clustered containers and keep all the external forces consistent - pt 1 and 2. But I'm also not 100% on whether this would help you or not, so take with a grain of salt.

https://gumroad.com/l/TqUNR

 

Share this post


Link to post
Share on other sites
Posted (edited)

Hey thanks so much! I have actually seen this one, though I'm thinking now I probably ought to go back and just take another look through it and see if I missed something he's doing. I appreciate the tip!

 

Edit: This is probably exactly what I'm looking for. Realizing that I bought and watched part 1, but not part 2, which seems to cover the info on forces etc. Thanks again!

Edited by Mechanica

Share this post


Link to post
Share on other sites

Man, those are really great tutorials, but unfortunately the techniques they implement seem to be completely broken in H17. Appears to be an issue with the new Volume Source node. It just doesn't want to play nice with the "Point Position" node. So disappointing.

Edited by Mechanica

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

×