Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Post Unity 2019.1 error
#11
(09-05-2019, 10:59 PM)witskho Wrote: Hey. The same error when trying to work with the skin in 2019.1. Removed ticks from all optimizations in import settings, made 128 weight values, does not help. When I use a standard unit cloth everything works well. Did any specific solution appear?

Make sure you regenerate the topology and reinitialize the cloth after making these changes.

Some further clarification as to why this happens: FYI, it is not *required* to disable optimization, or to change weight values. Only re-generating the topology and re-initializing is needed. This is because all mesh import optimization does is reorder vertices/faces.

At initialization time, Obi generates an internal array that maps from mesh vertex index to particle index. This array is serialized with the gameobject, to avoid having to re-calculate it at runtime. It is used when updating the mesh at the end of each frame, so that it matches the simulation: each mesh vertex is set to the position of its particle.

In 2019, Unity changed the vertex/face order of all imported meshes by default. Not at all happy with this decision they took. This means that any functionality that relies on consistent mesh vertex order between versions (such as mesh-particle mapping in Obi) needs to re-generate this data in 2019, since the old vertex order and the new (2019) vertex order are no longer the same. This change in Unity breaks backwards-compatibility in a lot of functionality and user data in other projects that I've seen: Terrain editors, vertex painting tools, mesh editing tools, character skinning tools... luckily in Obi, only a reinitialization is needed (could be worse).

From our side, we could either completely drop support for 2018 (not happening yet) or warn our users to re-initialize cloth/softbodies in case they're using 2019. We decided the latter, even though it means a lot of user support overhead for us (and some bad reviews in the store).
Reply
#12
Thanks for the answer. Unfortunately, re-initialization and re-creation does not help. I do not update the old project, and I work in a completely new, created already in the 2019.1 version. For clarity, recorded video in a completely clean project, where there is only a model and obi asset. What am I doing wrong? Same situation with other models with skin, which worked in the 2018 version, so this is not a problem of specific model or geometry. After recording, I tried to use other import options. After each change, I did re-generation and re-initialization every time. It did not help.

 
Reply
#13
(10-05-2019, 04:01 PM)witskho Wrote: Thanks for the answer. Unfortunately, re-initialization and re-creation does not help. I do not update the old project, and I work in a completely new, created already in the 2019.1 version. For clarity, recorded video in a completely clean project, where there is only a model and obi asset. What am I doing wrong? Same situation with other models with skin, which worked in the 2018 version, so this is not a problem of specific model or geometry. After recording, I tried to use other import options. After each change, I did re-generation and re-initialization every time. It did not help.

 

Hi,

We're unable to reproduce this in 2018 or 2019, with any mesh we've used. Please send your mesh to support(at)virtualmethodstudio.com and we'll take a look at it, to try and determine what the problem is.
Reply
#14
Sent. I look forward to your reply. Thank you for helping!
Reply
#15
(12-05-2019, 01:09 PM)josemendez Wrote: Hi,

We're unable to reproduce this in 2018 or 2019, with any mesh we've used. Please send your mesh to support(at)virtualmethodstudio.com and we'll take a look at it, to try and determine what the problem is.

share your results here ! 
I'm facing the same problem ;)
Reply
#16
(13-05-2019, 09:58 PM)CARLA Wrote: share your results here ! 
I'm facing the same problem Guiño

Seems Unity 2019.1 contains another -afaik undocumented- change in the way bone weights are assigned to a mesh. It performs a check to see whether the bone weights match the bone indices, so it does no longer allow empty bone weight arrays (that we used to deactivate built-in skinning for cloth). In previous Unity versions, empty bone weight arrays were not an issue.

As a workaround, in 2019.1 we've resorted to use a full bone weight array with all weights set to zero. This is suboptimal, but it's the only thing that works as of now. Find the attached ObiCloth.cs file and replace it in your project.

We will include this patch in the next update.


Attached Files
.cs   ObiCloth.cs (Size: 23.42 KB / Downloads: 22)
Reply
#17
(14-05-2019, 08:09 AM)josemendez Wrote: Seems Unity 2019.1 contains another -afaik undocumented- change in the way bone weights are assigned to a mesh. It performs a check to see whether the bone weights match the bone indices, so it does no longer allow empty bone weight arrays (that we used to deactivate built-in skinning for cloth). In previous Unity versions, empty bone weight arrays were not an issue.

As a workaround, in 2019.1 we've resorted to use a full bone weight array with all weights set to zero. This is suboptimal, but it's the only thing that works as of now. Find the attached ObiCloth.cs file and replace it in your project.

We will include this patch in the next update.


Hey, I tried the new script; for me this also does not work, get an error (see below) in Character Cloth Demo Scene , Unity 2019.1.1f1. Also tried other things mentioned here, increasing max bones, change optimize mesh.
Seems to render now, but lots of errors in console, and rendering seems completely broken.



Assertion failed on expression: 'offset + size <= bufLen'
0   Unity                               0x00000001085c621f _Z13GetStacktracei + 95
1   Unity                               0x000000010af66263 _Z17DebugStringToFileRK21DebugStringToFileData + 355
2   Unity                               0x000000010af63e6f _Z20AssertImplementationiPKciS0_ + 111
3   Unity                               0x000000010afd6ce1 _ZN11BufferMetal10BeginWriteEmmb + 657
4   Unity                               0x000000010afd69cd _ZN18GfxDeviceMetalBase12UpdateBufferEP9GfxBufferPKv20GfxUpdateBufferFlags + 93
5   Unity                               0x00000001091aad02 _ZN15GfxDeviceWorker10RunCommandER20ThreadedStreamBuffer + 44642
6   Unity                               0x000000010afdb38c GfxDeviceWorkerAutoreleasePoolProxy + 60
7   Unity                               0x00000001091acd30 _ZN15GfxDeviceWorker6RunExtER20ThreadedStreamBuffer + 176
8   Unity                               0x000000010919f9d8 _ZN15GfxDeviceWorker18RunGfxDeviceWorkerEPv + 152
9   Unity                               0x0000000109f0e4af _ZN6Thread16RunThreadWrapperEPv + 1391
10  libsystem_pthread.dylib             0x00007fff6a788305 _pthread_body + 126
11  libsystem_pthread.dylib             0x00007fff6a78b26f _pthread_start + 70
12  libsystem_pthread.dylib             0x00007fff6a787415 thread_start + 13
Reply
#18
are there any updates on the issue ?
Reply
#19
(20-05-2019, 09:23 AM)qlee01 Wrote: are there any updates on the issue ?

Hi there,

Make sure that you've regenerated the cloth topology, and reinitialized the cloth. This is only needed when opening the included sample scenes in >= 2019.1 though, as they were created in 2018.1. Not needed when creating your own cloth. Here's a video of me going over the process for a couple of the sample scenes:

Reply
#20
Hello! I am just learning to use Obi Cloth and began encountering this issue. I have read through this thread, the suggestions to regenerate the topology and re-initialize the cloth all make sense. I attempted to follow this process with a clean install of Obi Cloth in the CharacterCloth scene (with the trenchcoat) and the coat simply vanishes when I start the scene.

Like you said, it shouldn't affect newly-created cloths, just the example scenes, but I wondered if the regenerate -> reinit steps work for you on this scene?

EDIT: I am using 2019.1.3f1
Reply