Posts: 8
Threads: 2
Joined: Dec 2021
Reputation:
0
Hello guys, I'm using blender and unity with Obi cloth, but I never animated stuff in my live.
I'm working on an humanoid fox with a travel cape (check the video).
I took a mixamo animation to do some test (3d animator holidays). And I linked neck and shoulders bones (3) to the cape mesh.
And when trying to simply use Obi with the cloth tutorial, the first behavior I get isn't something I can understand.
So there am I. Can someone explain to me how I should build/link my cape? Like more splitting ? Btw the is a double side on the openning of the cape.
I also tried to import Obi terst assets, but it failed
WeTrasnfer (video in bBender) : https://we.tl/t-oSYTWOFUki
Thanks !
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(24-12-2021, 12:40 PM)Celes Wrote: Hello guys, I'm using blender and unity with Obi cloth, but I never animated stuff in my live.
I'm working on an humanoid fox with a travel cape (check the video).
I took a mixamo animation to do some test (3d animator holidays). And I linked neck and shoulders bones (3) to the cape mesh.
And when trying to simply use Obi with the cloth tutorial, the first behavior I get isn't something I can understand.
So there am I. Can someone explain to me how I should build/link my cape? Like more splitting ? Btw the is a double side on the openning of the cape.
I also tried to import Obi terst assets, but it failed
WeTrasnfer (video in bBender) : https://we.tl/t-oSYTWOFUki
Thanks !
Hi Celes!
The Wetransfer link you sent has expired (wetransfer links expire after only 7 days and we were away for holidays on Dec 24th, sorry !). Could you please reupload it?
Posts: 8
Threads: 2
Joined: Dec 2021
Reputation:
0
Sorry I stupidly though the forum was dead
I'm going back trying to use obi on this case, let's update this thread then !
There is a new link : https://we.tl/t-OvVp9OKorp
I'll come check if there is a need to update it !
So basically, I'm trying to simuilate partially the cloak of the character (I realised I forgot the character collider in the recording, but you get the idea).
But right now, if I try to pin the rigged part in unity, well the mesh doesn't get deformed anymore.
Any idea on how I should do it?
Sorry again for this.
And thanks
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
10-03-2022, 08:53 AM
(This post was last modified: 10-03-2022, 08:56 AM by josemendez.)
Hi Celes,
The zip file you shared only contains a fbx file and a video of it in Blender. What have you tried so far in Unity to add cloth simulation to it? could you share your Obi setup? I can't do much to help without some info about the problem.
You mention "if I try to pin the rigged part in Unity the mesh doesn't get deformed anymore". What do you mean by "pin"? are you using attachments? maybe skin constraints?
thanks!
Edit: If you haven't yet, I'd recommend taking a look at the character cloth setup video, as it gives step by step instructions to set up rigged cloth:
https://www.youtube.com/watch?list=PLnCR...e=emb_logo
Posts: 8
Threads: 2
Joined: Dec 2021
Reputation:
0
10-03-2022, 01:25 PM
(This post was last modified: 10-03-2022, 01:27 PM by Celes.)
Hi, sorry I should have share the complete thing !
The animation is broken (from an artist point of view) but it should do the trick.
I saw all the videos, but I definitely missed something. Because I tried to redo only the video beginning and I can't even see the particules with the renderer.
I tried with the video and the sample scene, but the result was at best : pinned part (yes particules attachment) not moving and the rest stretched so far it reached underground x)
I guess the last part is "just" settings. But my goal is to have some part of the mesh using the rig, and some other using the simulation.
Well anyway what I'm sending just don't work at all, but I guess it's better.
unity package => wetransfer
PS : it's brand new so there is no "pin group".
I'll continue to search, who knows, Thanks !
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
10-03-2022, 01:47 PM
(This post was last modified: 10-03-2022, 01:59 PM by josemendez.)
(10-03-2022, 01:25 PM)Celes Wrote: Hi, sorry I should have share the complete thing !
The animation is broken (from an artist point of view) but it should do the trick.
I saw all the videos, but I definitely missed something. Because I tried to redo only the video beginning and I can't even see the particules with the renderer.
I tried with the video and the sample scene, but the result was at best : pinned part (yes particules attachment) not moving and the rest stretched so far it reached underground x)
I guess the last part is "just" settings. But my goal is to have some part of the mesh using the rig, and some other using the simulation.
Well anyway what I'm sending just don't work at all, but I guess it's better.
unity package => wetransfer
PS : it's brand new so there is no "pin group".
I'll continue to search, who knows, Thanks !
Hi,
Your character transform scale is set to 50. This will render it 50 times larger than the actual mesh size, which of course means your cloth blueprint (which is generated from the mesh alone, outside the context of a transform hierarchy) will be tiny. This is the reason you can't see any particles in the blueprint: they're there, but you'd need a microscope to actually see them.
Probably what you want is to set the character scale at import time instead (select the character asset in Unity, and in the import settings set the "scale factor" to 50). Or even better, export the character from Blender with correct scaling/units. This way you make sure a transform scale of 1,1,1 draws the character at the correct size.
My advice would be to get the basic 3D asset export/import pipeline right before attempting to do cloth simulation. Any physics simulation is extremely sensitive to the size of things (a 4 cm toy car and a 4 meters car behave in very different ways), so these kind of issues can feel like an unsurmountable obstacle and get you stuck at first if you don't know what to watch out for and how to fix them.
cheers!
Posts: 8
Threads: 2
Joined: Dec 2021
Reputation:
0
(10-03-2022, 01:47 PM)josemendez Wrote: Hi,
Your character transform scale is set to 50. This will render it 50 times larger than the actual mesh size, which of course means your cloth blueprint (which is generated from the mesh alone, outside the context of a transform hierarchy) will be tiny. This is the reason you can't see any particles in the blueprint: they're there, but you'd need a microscope to actually see them.
Probably what you want is to set the character scale at import time instead (select the character asset in Unity, and in the import settings set the "scale factor" to 50). Or even better, export the character from Blender with correct scaling/units. This way you make sure a transform scale of 1,1,1 draws the character at the correct size.
My advice would be to get the basic 3D asset export/import pipeline right before attempting to do cloth simulation. Any physics simulation is extremely sensitive to the size of things (a 4 cm toy car and a 4 meters car behave in very different ways), so these kind of issues can feel like an unsurmountable obstacle and get you stuck at first if you don't know what to watch out for and how to fix them.
cheers!
Gosh I though the scale wouldn't matter on the solver itself, sorry !
I fixed enough for the test I think => wetransfer
But still no reaction. That's weird I made it work before, broken but at least it was moving. And I still can't see the particules in the game view/scene. There is a lot more in the blueprint thought.
Cheers !
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
11-03-2022, 09:37 AM
(This post was last modified: 11-03-2022, 09:56 AM by josemendez.)
(10-03-2022, 04:09 PM)Celes Wrote: Gosh I though the scale wouldn't matter on the solver itself, sorry !
I fixed enough for the test I think => wetransfer
But still no reaction. That's weird I made it work before, broken but at least it was moving. And I still can't see the particules in the game view/scene. There is a lot more in the blueprint thought.
Cheers !
Hi!
There's many issues with the cloak mesh, these are the most important ones:
- It has +14000 vertices. That's *extremely* dense for cloth simulation, and will result in terrible performance unless your simulation settings are rather low quality. If you want to render a cloth that dense, use proxies to transfer simulation from a simpler one: http://obi.virtualmethodstudio.com/manua...oxies.html
Still, if this is your first contact with cloth simulation I'd advise to simply use a lower-poly mesh. There's no benefit (either visually or simulation quality-wise) in having a very dense mesh for a such simple cloth.
- Its transform scale is 40. Same issue you had yesterday with the entire character hierarchy, still persists with the cloak.
It's paramount that you understand how transforms work, not just for cloth but in games in general: a mesh has no scale of its own - and no position or orientation-. It's just a bunch of points and triangles.
Only when you draw it using a hierarchy of transforms you specify its position, rotation and scale. This does not make the mesh physically larger, it only draws it larger. Cloth blueprints take a mesh as input, without the context of a transform hierarchy. So if you need a transform hierarchy to draw your mesh 40 times bigger to be able to see it, that means your mesh is tiny and so will your cloth.
To illustrate it, here's your cloak mesh in the scene (I just dragged it from the fbx file into the scene): it's but a tiny speck compared to the character.
If you've modeled this in Blender, make sure to apply your transforms before exporting objects. You can do this using Object->Apply->Scale. In your case, Object->Apply->Rotation&Scale would be even better since your cloak is also rotated 89 degrees on the X axis. Check out this video where I explain this concept:
https://www.youtube.com/watch?v=5j7k_tJU...Kn&index=2
This article might also be helpful:
https://artisticrender.com/how-and-why-d...n-blender/
Note this concept of "applying" a transform to a mesh exists in all 3D programs, not just Blender. Again, it's really important that you understand *why* you need to do this.
Long story short, you still can't see any particles in the scene because they're sub-millimeter in size.
- Normals are inverted. Visually, your cloak looks as if it's inside-out. While visuals could be fixed by adding a double-sided material or two materials with opposite culling, normals are also used for simulation: all cloth engines use them to determine regions where cloth isn't allowed to go, to avoid clipping with the character mesh without the need for costly collision detection: cloth vertices can't go to the other side of the plane defined by each normal.
So in your case, cloth would by default be disallowed to get *away* from the character, and allowed to go inside of his body (which is the exact opposite of what you want). Unless you flip your normals, simulation will look like a crumpled triangle soup clipping with the character's body.
Posts: 8
Threads: 2
Joined: Dec 2021
Reputation:
0
(11-03-2022, 09:37 AM)josemendez Wrote: Hi!
There's many issues with the cloak mesh, these are the most important ones:
- It has +14000 vertices. That's *extremely* dense for cloth simulation, and will result in terrible performance unless your simulation settings are rather low quality. If you want to render a cloth that dense, use proxies to transfer simulation from a simpler one: http://obi.virtualmethodstudio.com/manua...oxies.html
Still, if this is your first contact with cloth simulation I'd advise to simply use a lower-poly mesh. There's no benefit (either visually or simulation quality-wise) in having a very dense mesh for a such simple cloth.
- Its transform scale is 40. Same issue you had yesterday with the entire character hierarchy, still persists with the cloak.
It's paramount that you understand how transforms work, not just for cloth but in games in general: a mesh has no scale of its own - and no position or orientation-. It's just a bunch of points and triangles.
Only when you draw it using a hierarchy of transforms you specify its position, rotation and scale. This does not make the mesh physically larger, it only draws it larger. Cloth blueprints take a mesh as input, without the context of a transform hierarchy. So if you need a transform hierarchy to draw your mesh 40 times bigger to be able to see it, that means your mesh is tiny and so will your cloth.
To illustrate it, here's your cloak mesh in the scene (I just dragged it from the fbx file into the scene): it's but a tiny speck compared to the character.
If you've modeled this in Blender, make sure to apply your transforms before exporting objects. You can do this using Object->Apply->Scale. In your case, Object->Apply->Rotation&Scale would be even better since your cloak is also rotated 89 degrees on the X axis. Check out this video where I explain this concept:
https://www.youtube.com/watch?v=5j7k_tJU...Kn&index=2
This article might also be helpful:
https://artisticrender.com/how-and-why-d...n-blender/
Note this concept of "applying" a transform to a mesh exists in all 3D programs, not just Blender. Again, it's really important that you understand *why* you need to do this.
Long story short, you still can't see any particles in the scene because they're sub-millimeter in size.
- Normals are inverted. Visually, your cloak looks as if it's inside-out. While visuals could be fixed by adding a double-sided material or two materials with opposite culling, normals are also used for simulation: all cloth engines use them to determine regions where cloth isn't allowed to go, to avoid clipping with the character mesh without the need for costly collision detection: cloth vertices can't go to the other side of the plane defined by each normal.
So in your case, cloth would by default be disallowed to get *away* from the character, and allowed to go inside of his body (which is the exact opposite of what you want). Unless you flip your normals, simulation will look like a crumpled triangle soup clipping with the character's body.
Damn... I feel bad you though you had to explain me this. I probably have checked the property panel of the cloak in edit mode to not see that applying the scale on the parent object did "transfer" it to the childs. And yes I forgot some modifier from blender cloth simulation so the mesh was crazy dense. The initial one is far from perfect, I will definitely do a retopo at some point, but it's around 1,8k triangles.
I also quickly "fixed" the normal but I will need to find a way to do it manually, but at least you'll see the mesh correctly with a front material and it will get a better simulation.
But the problem is still here, no particules visible and no simulation at all. In fact I didn't add any collider but I don't know if it should simply fall down or stick to the skeleton.
wetransfer
And the rotation in unity isn't linked to some rotation not applied, it's a lovely issue with blender that I can't easily resolve for now, so just ignore it please.
Btw, you were right to assume I'm a beginner, first 3d model ^^
Thanks for your time, have a great day !
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
11-03-2022, 02:02 PM
(This post was last modified: 11-03-2022, 02:05 PM by josemendez.)
(11-03-2022, 12:53 PM)Celes Wrote: Damn... I feel bad you though you had to explain me this. I probably have checked the property panel of the cloak in edit mode to not see that applying the scale on the parent object did "transfer" it to the childs. And yes I forgot some modifier from blender cloth simulation so the mesh was crazy dense. The initial one is far from perfect, I will definitely do a retopo at some point, but it's around 1,8k triangles.
I also quickly "fixed" the normal but I will need to find a way to do it manually, but at least you'll see the mesh correctly with a front material and it will get a better simulation.
But the problem is still here, no particules visible and no simulation at all. In fact I didn't add any collider but I don't know if it should simply fall down or stick to the skeleton.
wetransfer
And the rotation in unity isn't linked to some rotation not applied, it's a lovely issue with blender that I can't easily resolve for now, so just ignore it please.
Btw, you were right to assume I'm a beginner, first 3d model ^^
Thanks for your time, have a great day !
Hi!
Took a look at your latest package: your Updater component does not reference any solver in the scene. So the solver (and hence, the simulation) isn't being updated at all.
Add the solver component to your ObiLateFixedUpdater component "solvers" list, that will A) render the particles and B) update the simulation, making your cloak fall to the ground.
It will fall to the ground because skin constraints - which are very important for skinned cloth, since they keep the cloth in sync with the skinning- are globally disabled in your solver. Open up the constraint settings in the ObiSolver component, and enable skin constraints.
That will finally get the cloth simulation running as intended . From this point on, you will probably want to tweak blueprint settings (specifically, skin radius/backstop) and maybe solver parameters: damping, inertia, etc.
|