FLIP & Ocean

   15636   15   3
User Avatar
Member
64 posts
Joined: July 2005
Offline
Hello,
Here is my attempt to the proverbial FLIP surface and Ocean interaction. Basically I want to use the FLIP simulation for splashes but the ocean would take care of the ‘static’ parts:

https://vimeo.com/55817137 [vimeo.com]

I'm using attribTransfer on points but I'm missing something and any hint would be appreciated!

edit: brb, going to watch https://vimeo.com/41727309 [vimeo.com]

Attachments:
SplashHOT_v03.hipnc (1.1 MB)

User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Funny enough I am looking into this very problem right now. I cannot say I have a clear answer yet for you. I have had a look at your file and there's no HOT data.
If you want to swap idea's feel free to PM me , Ive already worked out some cool stuff using point clouds to get data from a surfaced simulation to give objects the impression of bobbing around using point clouds. All in VOPs

Rob
Gone fishing
User Avatar
Member
64 posts
Joined: July 2005
Offline
Hey Rob,
¿You mean no normals and so on on my ocean or no ocean at all? I compiled the latest package from https://github.com/eloop/hot [github.com] for H12.1.154 on linux

Anyway, I think I'm missing some attributes knowledge so let me do some exercises and I'll try to merge the ocean and flip surface again.. I'll pm if I can get something useful.
User Avatar
Member
64 posts
Joined: July 2005
Offline
Using attribute transfer works but it doesn't ‘blend’ points that are under the ocean surface: https://vimeo.com/55905748 [vimeo.com]

I'm taking the VOP way too and I'm starting with colors to see what is above and below:

Attachments:
highandlow.jpg (157.7 KB)

User Avatar
Member
373 posts
Joined: March 2009
Offline
You can apply the same ocean deformer to the flip mesh – use vop to increase / decrease the ocean influence by v or height. To get the sides to really line up, you can use a clip sop to cut clean lines around the edges, and basically do the reverse for the ocean mesh, cutting out a square. Depending on your flip sim (if the near the edge of bounds it moves up and down at all in the sim), you may want to use a ray to get the exact height of the ocean mesh, then blend that in on the flip mesh at the edges so they are more in-sync if needed.
Ian Farnsworth
User Avatar
Member
64 posts
Joined: July 2005
Offline
I just noticed I can use v for this.
I'll follow your suggestions to cut the mesh, thanks!
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Thanks for chipping in Ian .

My current work in progress is to clip the flip fluid in Y to the max I can get away with, then in VOPs work out the centroid of the sim and make a ramp, then using colour delete what I dont need , so that leaves me with a nice surface to apply the HOT deformer.

scene file on the way !

Depending on your flip sim (if the near the edge of bounds it moves up and down at all in the sim), you may want to use a ray to get the exact height of the ocean mesh, then blend that in on the flip mesh at the edges so they are more in-sync if needed.

Interesting idea, ray sop the edges using a ramp or such. For rendering though don't we want to cut out the chunk of Ocean under the flip sim ?

Rob
Gone fishing
User Avatar
Member
373 posts
Joined: March 2009
Offline
[quote=“circusmonkey”-

Interesting idea, ray sop the edges using a ramp or such. For rendering though don't we want to cut out the chunk of Ocean under the flip sim ?

Rob

Yes, that would be used in conjunction with the other stuff I mentioned (using clips and whatnots to cut out a hole). You'd still use the cut out version for rendering, but ray against the entire ocean mesh to get the meshes to line up a bit better in some cases.
Ian Farnsworth
User Avatar
Member
64 posts
Joined: July 2005
Offline
Ok, I got it working - kinda. There are some small glitches yet (I need to get the centroid). Also, the ray sop is in the works!



edit: Video here https://vimeo.com/55973277 [vimeo.com]

Attachments:
SplashHOT_v09.hipnc (1.1 MB)

User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
right >

Ive solved a few things but one thing I know injecting the Vel from a HOT ocean into the flip sim is very slow and it might just be better to deform the surface after with HOT.
Your going to need my read / write cache otl and some scene structure. The read write tool will build your directories if you don't have them. Ive built HOT in vops to deform the ocean using a custom set of hot vops, so you might want to swap them for your own hot build. This file shows you how we can delete the sim surface we don't want . I guess the next task is to use the same technique to cut out the HOT ocean and then in vops make a blend for the edges.



Rob

Attachments:
rse_flip_collision.hip (1.0 MB)
rse_sop_read_volumedata_v002.otl (23.5 KB)

Gone fishing
User Avatar
Member
373 posts
Joined: March 2009
Offline
circusmonkey
right >

Ive solved a few things but one thing I know injecting the Vel from a HOT ocean into the flip sim is very slow and it might just be better to deform the surface after with HOT.

Rob

Depends on how you're doing it (and of course if you really need it). Using volumes it's actually rather easy, and very quick. You can convert the ocean to a volume (make it sufficiently deep enough – and keep it below the surface), and just add it (multiply by the timestep first I think) to the flip vel field using a gas linear combination or you can set it all up with the pump shelf tools. If you were to do it via a sop solver, and perform the ocean on the actual points, then you're asking for trouble. The problem with doing it in the sim is detail. Though sometimes you'll have to add motion in-sim depending on the shot.. like if you need a ship going through the ocean, it can be useful to have some real wave motion in the sim. You'll get the overall wave motion, but you won't get any fine details. You'll want to add that back in afterwards likely with the shader, but you can also do it on the mesh as well. It's fine to mix and match though as needed of course.
Ian Farnsworth
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hi Ian so whats the best approach to feeding the HOT mesh which is a 2 plane into the flip sim as a PUMP . So far in all my tests the results are far from perfect. the volume is full of holes and takes over 13 mins to write to disk and thats just converting a 25 x 25 hot mesh.

Rob
Gone fishing
User Avatar
Member
373 posts
Joined: March 2009
Offline
Say whaaattt??? :shock: Not sure why, but I'm just guessing it's the size of your ocean to the division size of your volume being created. It defaults to .1 which can be pretty small. You can set the quality/detail of that volume manually (and I suggest doing so to roughly match the flip division size, or you can even go a bit lower). I've attached a file with the rough setup I would use for this. It also helps to cache any volumes like this before the sim, and read off disk. Oh, I use z-up – sorry if that's confusing when you open the file. If you want to copy my vops you'll have to compensate for that too. I also used a mountain sop instead of ocean for this file, just replace with the ocean sop or vop (though it uses y-up only, so you'll have to rotate it, ocean, then rotate back if you use my file)

Attachments:
Flip_Ocean.hip (1.1 MB)

Ian Farnsworth
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
That's a great scene Ian, the volume VOP used to slice the volume at the intersection of the grid > very nice !


Rob
Gone fishing
User Avatar
Member
373 posts
Joined: March 2009
Offline
Glad you found it useful. Another quick way of doing that would be to use the extruded grid as a fog volume and just multiply the velocity volumes by that. Its easy enough to make the pump field a fog volume and use the volume mix or volume merge nodes to multply the vel volumes by that, or now that I'm thinking about it you could use pump field as a mask field on the dop fluid source node as well. There's always multiple ways of doing something.
Ian Farnsworth
User Avatar
Member
443 posts
Joined: Sept. 2012
Offline
Really useful tips guys.
  • Quick Links