Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extracting mesh from settled fluid
#1
My goal is to extract an iso-surface from a resulting fluid simulation. Does Obi Fluid provide any kind of mesh extraction out-of-the-box?

If not, what are the options for me going forward? Do I need to build a SDF of the ellipsoids from scratch?

Thanks for the help!
Reply
#2
(25-10-2021, 04:50 AM)CreepGin Wrote: My goal is to extract an iso-surface from a resulting fluid simulation. Does Obi Fluid provide any kind of mesh extraction out-of-the-box?

If not, what are the options for me going forward? Do I need to build a SDF of the ellipsoids from scratch?

Thanks for the help!

Nope, extracting a mesh iso-surface in realtime is extremely inefficient compared to directly rendering the fluid surface using screen-space splatting (which is what Obi uses). There's no out of the box support for mesh generation in Obi, since there seems to be very little popular demand for it.

You must build a SDF of the ellipsoids yourself, and use either marching cubes or surface nets to extract a mesh from it. Personally, I'd go with surface nets as they're simpler and output slightly higher-quality meshes imho.
Reply
#3
Okay thanks, that's what I thought as well. For my purpose, I don't need it to be realtime (just need a resulting mesh to feed to my path tracer). 

But I think realtime surface generation is doable with a sparse OctTree SDF. Even with my current Burst implementation of sparse OctTree + Naive Surface Net, the framerate is acceptable for a fairly dense mesh. And I think the SDF generation and possibly half of the NSN algorithm can go wide on the GPU as well. I'll definitely play around with it and see how it goes!
Reply
#4
(25-10-2021, 03:47 PM)CreepGin Wrote: Okay thanks, that's what I thought as well. For my purpose, I don't need it to be realtime (just need a resulting mesh to feed to my path tracer). 

But I think realtime surface generation is doable with a sparse OctTree SDF. Even with my current Burst implementation of sparse OctTree + Naive Surface Net, the framerate is acceptable for a fairly dense mesh. And I think the SDF generation and possibly half of the NSN algorithm can go wide on the GPU as well. I'll definitely play around with it and see how it goes!

Nice! If you get cool results, feel free to share a pic of them with us Sonrisa
Reply
#5
Hi Jose, I did a preliminary CPU implementation (particle ellipsoids -> SDF -> SurfaceNet). Video demo:



A GPU implementation is needed to push the performance further at higher resolutions and particle count. But right now, I think I need to sort out some oddities with the ellipsoids positions. Some ellipsoids in my mesh are displaced differently than your billboard version:

[Image: giphy.gif]

I'm getting and using the positions and anisotropies from ObiSolver. And most of them do align 1:1 to your billboard rendering. But some are just displaced way out there. I dug into your ellipsoids rendering code but can't seem to find the reason. Any pointers on this will be much appreciated. Thanks!
Reply
#6
(14-11-2021, 10:44 PM)CreepGin Wrote: Hi Jose, I did a preliminary CPU implementation (particle ellipsoids -> SDF -> SurfaceNet). Video demo:



A GPU implementation is needed to push the performance further at higher resolutions and particle count. But right now, I think I need to sort out some oddities with the ellipsoids positions. Some ellipsoids in my mesh are displaced differently than your billboard version:

[Image: giphy.gif]

I'm getting and using the positions and anisotropies from ObiSolver. And most of them do align 1:1 to your billboard rendering. But some are just displaced way out there. I dug into your ellipsoids rendering code but can't seem to find the reason. Any pointers on this will be much appreciated. Thanks!

Hi,

Great work! it's looking good Sonrisa

Read from the solver.renderablePositions array instead of solver.positions. That should give you particle positions post- temporal/spatial smoothing.

Let me know if you're already doing it this way, there might be a different reason for this.
Reply
#7
Awesome, that did the trick!
Reply