Obi Official Forum
Bug / Crash Mesh Rendermode issue. - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html)
+--- Thread: Bug / Crash Mesh Rendermode issue. (/thread-3571.html)



Mesh Rendermode issue. - Cairn - 30-08-2022

When editing a skinned cloth blueprint, I'm not able to use mesh rendermode for painting. Enabling it causes the 3d view to flicker with various 90s graphic designs (see image).
My meshes also for some reason import into Unity face down from blender. I know this isn't an Obi Cloth issue, but I wondered if it would be possible to rotate the mesh in the editor for easier painting.
I'm on Unity 2021.2.8f1, URP renderpipeline, macOS Monterey, macbook with AMD Radeon Pro 5500M graphics card.


[attachment=1474]


RE: Mesh Rendermode issue. - josemendez - 30-08-2022

Hi there!

Mesh render mode just calls Unity's DrawMeshNow() method. Drawing is delegated to Unity, not sure what could be the issue.
I did report a bug to Unity, that will cause issues when calling DrawMeshNow() multiple times in Unity 2021 and up:
https://forum.unity.com/threads/drawmeshnow-broken-in-2021.1299723/#post-8229531
https://issuetracker.unity3d.com/issues/drawmeshnow-is-not-drawing-mesh-immediately-dx12

However this should not result in vertices being at wrong positions, just that the brush overlay won't be visible in 2021.

Would it be possible for you to send your mesh to support(at)virtualmethodstudio.com so that I can take a closer look at it? thanks!

(30-08-2022, 02:53 PM)Cairn Wrote: but I wondered if it would be possible to rotate the mesh in the editor for easier painting.

It's not possible, the mesh is rendered as imported into Unity.


RE: Mesh Rendermode issue. - Cairn - 31-08-2022

Thanks for the quick reply!

I found the issue. The model worked if exported to a new file, so I compared the import settings and noticed "Keep Quads" was checked on the mesh that didn't work. Tested on other meshes and keep quads broke the drawmesh for them too.

Could maybe be related to this? However they say it's been fixed.
https://issuetracker.unity3d.com/issues/mesh-disappears-when-keep-quads-is-enabled-in-the-fbx-import-settings

Quote:However this should not result in vertices being at wrong positions, just that the brush overlay won't be visible in 2021.
I don't think I have an issue with the brush overlay in 2021.2.8f? Attaching a screengrab so you can check if I'm missing something.
[attachment=1475]


RE: Mesh Rendermode issue. - josemendez - 31-08-2022

(31-08-2022, 10:20 AM)Cairn Wrote: Thanks for the quick reply!

I found the issue. The model worked if exported to a new file, so I compared the import settings and noticed "Keep Quads" was checked on the mesh that didn't work. Tested on other meshes and keep quads broke the drawmesh for them too.

Could maybe be related to this? However they say it's been fixed.
https://issuetracker.unity3d.com/issues/mesh-disappears-when-keep-quads-is-enabled-in-the-fbx-import-settings

When you draw a mesh, Unity requires you to specify the topology of that mesh (triangles, quads, points, lines, etc). Obi assumes all cloth meshes are made out of triangles so it tells Unity to use MeshTopology.Triangles, if a mesh isn't made of triangles then vertex indices will still be interpreted as triads (instead of groups of 4), so there's the problem.

Quad topology is only useful for tessellation shaders, so it should be disabled for cloth (or basically any mesh that won't use tessellation).

(31-08-2022, 10:20 AM)Cairn Wrote: I don't think I have an issue with the brush overlay in 2021.2.8f? Attaching a screengrab so you can check if I'm missing something.

Your screenshot looks fine to me. Not sure when/if Unity has fixed the caching issue with DrawMeshNow, but overlays are broken for me in 2021.3.0f1... good to know that it works in some versions at least! thanks Sonrisa


RE: Mesh Rendermode issue. - Cairn - 07-09-2022

For some reason the mesh display no longer works on this same mesh, in the same unity version. Not sure if that is a clue to the bug, but it seems like it's not just the version of Unity causing it.


RE: Mesh Rendermode issue. - josemendez - 08-09-2022

(07-09-2022, 03:55 PM)Cairn Wrote: For some reason the mesh display no longer works on this same mesh, in the same unity version. Not sure if that is a clue to the bug, but it seems like it's not just the version of Unity causing it.

Same mesh, same Unity version, it suddenly stopped working? That's strange, did you re-export the mesh at some point? Would it be possible for you to share the mesh with me ( send it to support(at)virtualmethodstudio.com) so that I can take a look? thanks!