Looooong / Unity-SRP-VXGI

Voxel-based Global Illumination using Unity Scriptable Render Pipeline
MIT License
766 stars 62 forks source link

Poping particles shadows on dynamic mesh #30

Open Wenzy-- opened 4 years ago

Wenzy-- commented 4 years ago

Your addon's effect is so great.But when i try to generate some procedural mesh https://imgur.com/euTGxR3 There are some particles shadow will pop out and appear randomly.(From the picture it seems aceptable ,by if run in video it looks very anoying )

Is there any way i can avoid this issue happen.The shadow will follow the direction light.And I found it's related to the voxel?When the resolution is low,the particle shadow will become bigger.

This issue seems won't happen in the static mesh.

Looooong commented 4 years ago

On the VXGI script in the inspector, you can enable "Visualize Mipmap" property to see where are those voxels at. You can then figure it out or post me a picture with mipmap visuallized so I can help you out.

Wenzy-- commented 4 years ago

https://imgur.com/K4CSUpJ What does it means? i saw some colored voxels pop out.Is it because i generate some useless vertex in the mesh?

Wenzy-- commented 4 years ago

https://imgur.com/X2DpSYC https://imgur.com/HrTseoE But it seems impossible,because i have made a clamp function to cut the mesh to avoid it out of the section

Looooong commented 4 years ago

You can switch to wireframe mode in Unity to see if there are "tiny" triangles there.

Looooong commented 4 years ago

My guess is that this is a precision error on the GPU side because of extreme steep surface (comparing at one point to another).

Wenzy-- commented 4 years ago

ok, thank u for your suggestions.I have checked my mesh is fine.And i found a temporary solution~When i rotate the plane a little bit.Like set the Rotation (0.1,0,0),the strange particle shadow will disappear.I don't figure out why

Looooong commented 4 years ago

Based on the irregularity of the mesh, I guess this is because the steepness of the slope relative to the projection used in voxelization that causes floating point errors. I will think of some way to improve it later on.