Suggestion / Idea Feature request: API to get the mesh from FluidMesher - 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: Suggestion / Idea Feature request: API to get the mesh from FluidMesher (/thread-4160.html) |
Feature request: API to get the mesh from FluidMesher - kodra - 09-04-2024 My use case is that I'm working on my own custom fluid shader. The workflow is tedious: Press Play -> Wait for the simulation until the fluid gets to a certain shape I'd like to inspect the shader for -> Tweak the shader. I figured that if I dump the mesh from BurstFluidMesherSystem as an Unity asset, it would make iterating on the shader much faster. So I added this API: Code: public List<Mesh> DumpMeshes_Editor() It works. I kinda hope it's officially supported tho, cause 1. I don't know if it's the correct way to do it 2. It's not that easy for Compute backend as the mesh only lives in GPU (I suppose). RE: Feature request: API to get the mesh from FluidMesher - josemendez - 09-04-2024 (09-04-2024, 02:48 AM)kodra Wrote: My use case is that I'm working on my own custom fluid shader. The workflow is tedious: Press Play -> Wait for the simulation until the fluid gets to a certain shape I'd like to inspect the shader for -> Tweak the shader. Hi, This is a planned feature. All other ObiActors (Ropes, Cloth, Softbodies) currently support exposing the mesh, by right clicking on the Renderer component (ObiRopeExtrudedRenderer, ObiClothRenderer, etc) and selecting "Bake Mesh". Works both for Burst and Compute (in the case of the Compute backend, we read the mesh back from the GPU before exporting it). We'll add it to fluid emitters shortly. Your code will export all fluid emitters in a solver, many of them fused into a single mesh as batches contain all fluid meshes sharing the same fluid rendering pass. That, and that it will only work when using Burst. kind regards, |