taichi-dev / taichi_three

A soft renderer based on Taichi (work in progress)
https://t3.142857.red/
MIT License
223 stars 24 forks source link

make MarchingCube spheres smaller? #31

Open charlotte12l opened 3 years ago

charlotte12l commented 3 years ago

Thank you so much for your taichi-three implementations! That's really helpful.

I'm doing MPM-based snow simulation and rendering, and the rendering part is similar to your mciso_mpm.py. However, I found the rendered spheres are too large which makes my snow look too much? It's just a small snowball and after it crashed the ground, there shouldn't be so much snow in the scene... How can I make the marching cube spheres smaller? Thanks!

Here is a video of my demo: https://drive.google.com/file/d/1poawdz1oJxccJgpSnk-RjbDGKhlQawt9/view?usp=sharing

charlotte12l commented 3 years ago

Oh, I find if I increase the N in MCISO, the spheres would become smaller but the surface is not smooth anymore.

archibate commented 3 years ago

You may specify a larger radius for voxelizer to make balls larger:

vox = Voxelizer(N=xxx, radius=6)

The default radius is 2. This radius is used for gaussian blur to spread voxels out.

Also, try increase the throttle if single particle easily get disappeared / decrease if single particle becoming too large:

vox = Voxelizer(N=xxx, radius=6, throttle=xxx)

The default throttle is 18.