How do i rotate a 2D Liquid Simulation

i’ve been trying to rotate the “Grid 2D flip Hose” fluid simulation 90 degrees on x is there an easy way to do this?

image
Grid 2D flip Hose example i’m trying to rotate on x 90

Seems like i need to change a few things to get this to rotate I’m aware of that, this seems like a good place to start: Grid2D_FLIP_RasterizeParticles, right?

What are some key parameters i would need to change in the system to rotate it?


Custom HLSL shaders in Grid2D_FLIP_RasterizeParticles

Endgoal: run low res fluid sim over map to create simple wind simulation

Thanks for the help

There might be some other stuff you need to make some changes to that we can’t see here but by you can try just swapping the Y and Z values, so in the first custom HLSL box you would swap the Y and Z values:

Grid_SetGridValue(XIndexInt, 0, YIndexInt, Velocity.x, IGNORE);
Grid_SetGridValue(XIndexInt, 1, YIndexInt, Velocity.y, IGNORE);

And do the same for the other custom HLSL box:

Grid_SetGridValue(XIndexInt*x, 0, YIndexInt*y, Weight*Velocity.x, IGNORE);
Grid_SetGridValue(XIndexInt*x, 1, YIndexInt*y, Weight*Velocity.y, IGNORE);

You might need to go to the other stuff that’s plugging into that and swap the Y and Z axis things as well

1 Like

Try to do this without changing that rasterization code. The best way to start is assume you need to change the Grid 2D Create Unit To World transform rotation to be an axis and angle to quat. Orient the sprite for the sim plane how you want (you need to enable the disabled renderer in there to see it). After that, check ray trace on both Grid2D Rasterize Particles and Flip Particle Update. That should be a good starting place, but I’ll admit, the workflow is a bit tedious to get there. We’ll improve it over time.