Ocean to Flip to Unity
2977 2 0- angenehmunangepasst
- Member
- 2 posts
- Joined: April 2017
- Offline
Hey,
I am doing a project where I am trying to get something like the picture below in Unity, with FLIP-sim done in Houdini (01.jpg). I followed this tutorial (https://youtu.be/nnujlxEoSDg) to get an ocean that then is simulated in FLIP. So far so good. But when I am trying to port this to Unity, a couple of problems arise:
1) If I use VAT I only get an unlit shader, that does not support transparency. Which seems to be bad for rendering oceans in real time. Is there a way around this?
2) If there is no way around it, are alembics the weapon of choice? If so, is there a way around those ugly holes pictured in 02.jpg? Are those holes cause by the narrow band and will be less severe if I increase the narrow band?
3) More general: How do I delete all polygons, that are not part of the surface after the particlefluidsurface-SOP?
Hopefully you have some pointers and/or ideas how to tackle the topic, thanks!
Hip-File attached as well.
I am doing a project where I am trying to get something like the picture below in Unity, with FLIP-sim done in Houdini (01.jpg). I followed this tutorial (https://youtu.be/nnujlxEoSDg) to get an ocean that then is simulated in FLIP. So far so good. But when I am trying to port this to Unity, a couple of problems arise:
1) If I use VAT I only get an unlit shader, that does not support transparency. Which seems to be bad for rendering oceans in real time. Is there a way around this?
2) If there is no way around it, are alembics the weapon of choice? If so, is there a way around those ugly holes pictured in 02.jpg? Are those holes cause by the narrow band and will be less severe if I increase the narrow band?
3) More general: How do I delete all polygons, that are not part of the surface after the particlefluidsurface-SOP?
Hopefully you have some pointers and/or ideas how to tackle the topic, thanks!
Hip-File attached as well.
- Ambrosiussen
- Member
- 197 posts
- Joined: July 2015
- Offline
Hi,
VAT is one way of approaching this.. But I would also like to point you to this tutorial: https://vimeo.com/261901539 [vimeo.com]
It also takes care of the sides and bottom of your container if I remember correctly.
If you want to remove the sides and bottom yourself manually, I would either use a bounding box plugged into a group sop, and then delete everything outside of the bounding box. (See attachment) Or delete primitives based on their normal. (See other options on Group SOP)
Paul
VAT is one way of approaching this.. But I would also like to point you to this tutorial: https://vimeo.com/261901539 [vimeo.com]
It also takes care of the sides and bottom of your container if I remember correctly.
If you want to remove the sides and bottom yourself manually, I would either use a bounding box plugged into a group sop, and then delete everything outside of the bounding box. (See attachment) Or delete primitives based on their normal. (See other options on Group SOP)
Paul
Edited by Ambrosiussen - Dec. 13, 2019 16:08:11
- angenehmunangepasst
- Member
- 2 posts
- Joined: April 2017
- Offline
Wow thank you very much! The tutorial looks promising. I'll try that out tomorrow.
For the current state: I gave up on VAT (for this particular case)/simulating FLIP and instead opted to just bake an alembic simulation. This is what it looks like right now in Unity. I think it is ok, but will definitly check out the linked video because it looks like the better and more fitting approach.
Essentially I created a big highres circle, did a polyreduce that keeps the polys near the camera and smoothly transitions to lower resolution on the edges. This gets displaced by the ocean specturm-SOPs and looped by the game-dev make-loop-SOP (which is super useful). In Unity I made a shader in shader graph that uses normal maps to create ripples on the alembic animation.
Since I dont use FLIP anymore the buoy is “simulated” by a crappy self-coded solver for now. I guess it will stay self-coded but should be less crappy next iteration.
The file is attached for anybody interested. As soon as I get to implement the stuff from the tutorial I'll post another update.
@deleting by bounding box: I was hoping that there was a more elegant way with attributes coming from the simulation itself. Bummer.
For the current state: I gave up on VAT (for this particular case)/simulating FLIP and instead opted to just bake an alembic simulation. This is what it looks like right now in Unity. I think it is ok, but will definitly check out the linked video because it looks like the better and more fitting approach.
Essentially I created a big highres circle, did a polyreduce that keeps the polys near the camera and smoothly transitions to lower resolution on the edges. This gets displaced by the ocean specturm-SOPs and looped by the game-dev make-loop-SOP (which is super useful). In Unity I made a shader in shader graph that uses normal maps to create ripples on the alembic animation.
Since I dont use FLIP anymore the buoy is “simulated” by a crappy self-coded solver for now. I guess it will stay self-coded but should be less crappy next iteration.
The file is attached for anybody interested. As soon as I get to implement the stuff from the tutorial I'll post another update.
@deleting by bounding box: I was hoping that there was a more elegant way with attributes coming from the simulation itself. Bummer.
Edited by angenehmunangepasst - Dec. 15, 2019 10:56:37
-
- Quick Links