com.unity.demoteam.mesh-to-sdf icon indicating copy to clipboard operation
com.unity.demoteam.mesh-to-sdf copied to clipboard

Updating from Unity 2021 to 2022 changed something in the M2SDF, made Hair physics fail

Open methusalah opened this issue 6 months ago • 0 comments

I used to use Unity 2021.3 with HDRP, Hair 0.10 and Mesh2SDF 1.0. without issue.

Then I updated to Unity 2022.3 with HDRP. From this moment on, the render textures used to store the SDF where set to RandomWrite = true automatically, and the hair pysics began to fail. The hair did not seem to be affected by gravity anymore and was floating around, maybe with a bigger drag (hard to say)

I tried to set the RandomWrite to false and to remove the line completely in the text file. This solve the issue and hair work corretly again, but only for one launch. After that, the RandomWrite is automaticaly set to true again and on a second launch the physics bug come back.

I updated to M2SDF 1.1 without any change. I also updated Hair to 0.16 but some other issues prevent me to test it for the moment.

Why is this boolean set automatically? It seems very strange and unintuitive. Is there any way to prevent it? why the random access would even mess with the hair physics?

methusalah avatar Aug 11 '24 18:08 methusalah