利用者:Sebbas/GSoC 2016/Reports/Week 3

提供: wiki
移動先: 案内検索

Week 3

My main task this week was to examine the pointcache which currently only stores and refills smoke grid data. I figured that since smoke and liquids are so similar (last week I decided to merge them into one single modifier for that same reason) their cache files should be treated equally.

What's been done

  • Although they're similar, I needed some way to distinguish smoke and liquid setups. This is important for later setting domain parameters but also because of the different file formats: liquid simulations store surface data in .bobj.gz files, smoke volume data is stored in the Blender specific .bphys pointcache file format.
    So I added some flags to account for liquid setups and made my Mantaflow script setup more modular (e.g. a plain Mantaflow solver object can handle smoke and/or liquids). (rBd3c57bc244c0, rB05c03b652628, rB836db6c99046)
  • The next step towards liquid caching was to write the liquid surface files to the correct location on disk. Here, I was able to reuse the smoke cache structures. That is, I reused the smoke cache GUI and all the logic behind path parsing and custom file names.
    All in all, liquid cache writing works now. (rB7abab97769c5, rB5a8340634080)
  • Last week I re-enabled the smoke simulation functions. This week I noticed that the high resolution smoke did not work anymore.
    The problem was a missing liquid inflow grid for high resolution (classic NULL pointer ...). So I added that grid and also think it should come in handy when implementing a high-res liquid option. (rBa3c04bdd56c4)
  • I took a closer look at sampleLevelsetWithParticles() from the Mantaflow source code to understand how particles are sampled. While the randomness and discretization factors play a role (see last weeks report), the values from the phi grid do as well. So instead of filling the phi grid with -0.5 for every point inside the mesh, one can use the distance to the mesh surface. (rBe8863f0be170)
    I tried that approach, but found it produced less accurate meshes (see images). Thus, for now I will keep using my old approach. (rB0992e7f6861a, rB6c177d3d3098)
Old approach - phi using -0.5 for points inside mesh
New approach - phi using distance to mesh surface for points inside mesh

Next up

  • Get the liquid cache read mechanism working.
  • Finish the video comparision I proposed last week. I need the cache reading to work first so that I can create comparable Mantaflow and Elbeem scenes. In my previous videos I always sideloaded the liquid surface files (don't need to test that again).

Questions

  • Discuss sampleLevelsetWithParticles() with my mentor. Is interpolation the problem for less accurate meshes (especially on low-res grids)?