Obi Official Forum
How to cure blur - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html)
+--- Thread: How to cure blur (/thread-4333.html)



How to cure blur - bobooo - 15-08-2024

[attachment=2166]
When I play the sample scene in HDRP, the object becomes blurry,
How can I resolve the blur?

Obi version is 7.0.1

Unity version is 2022.3.22f1.


RE: How to cure blur - josemendez - 15-08-2024

(15-08-2024, 06:00 AM)bobooo Wrote: When I play the sample scene in HDRP, the object becomes blurry,
How can I resolve the blur?

Obi version is 7.0.1

Unity version is 2022.3.22f1.

Hi!

Thanks for reporting this! It's an oversight on our part.

Open up ComputeSoftbodyRenderSystem.cs (or BurstSoftbodyRenderSystem.cs, depending on which backend you're using) and modify line 101 (or 89 in BurstSoftbodyRenderSystem) to look like this:

Code:
Graphics.RenderMesh(rp, batch.mesh, m, m_Solver.transform.localToWorldMatrix, m_Solver.transform.localToWorldMatrix);

instead of this:

Code:
Graphics.RenderMesh(rp, batch.mesh, m, m_Solver.transform.localToWorldMatrix);

Unity's Graphics.RenderMesh takes both the object's current transform and its previous transform as parameters for object-based blur. If you don't pass the previous transform it assumes the parameter value is null. As a result, motion blur thinks the object is moving when it isn't. In my humble opinion, Unity should change this method so that it assumes the previous transform is the same as the current one by default.

kind regards


RE: How to cure blur - josemendez - 15-08-2024

I've started a feedback thread in the Unity forums regarding this issue:
https://discussions.unity.com/t/graphics-rendermesh-and-motion-blur/1503731

Hopefully they will address this to improve the robustness of Graphics.RenderMesh.

We will include the aforementioned workaround of passing the same transform twice in the next version of Obi, which will be released shortly.

Thanks for bringing this to our attention! Sonrisa