Extracting mesh from settled fluid - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Extracting mesh from settled fluid (/thread-3147.html) |
Extracting mesh from settled fluid - CreepGin - 25-10-2021 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! RE: Extracting mesh from settled fluid - josemendez - 25-10-2021 (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? 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. RE: Extracting mesh from settled fluid - CreepGin - 25-10-2021 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! RE: Extracting mesh from settled fluid - josemendez - 25-10-2021 (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). Nice! If you get cool results, feel free to share a pic of them with us RE: Extracting mesh from settled fluid - CreepGin - 14-11-2021 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: 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! RE: Extracting mesh from settled fluid - josemendez - 15-11-2021 (14-11-2021, 10:44 PM)CreepGin Wrote: Hi Jose, I did a preliminary CPU implementation (particle ellipsoids -> SDF -> SurfaceNet). Video demo: Hi, Great work! it's looking good 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. RE: Extracting mesh from settled fluid - CreepGin - 15-11-2021 Awesome, that did the trick! |