Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cloth phasing through itself
#1
Just transferring this over from the Unity Forums:
I tried the proxy with a lower poly mesh, and it definitely did not look right. Luckily, with the nature of the poster, I can switch to the lower poly version when using the cloth part because it simply falls to the ground after being clicked.

My other issue is with the cloth phasing through itself. Is there a particular reason for this?

Just some info: My goal is to have the poster fall to the floor. That all works fine. It's just how the poster looks once it has fallen that is the problem.

Arkano responded with:
"If you're simulating a poster, I'd ditch the mesh you are currently using and use a regular homogeneous plane with a cutout texture. There's no need to model all the small details at the edges of the poster using geometry -in fact that's very very bad practice both from a rendering and a simulation point of view-.

Regarding the poster pasting trough itself: have you enabled self-collisions (checkbox in the ObiCloth inspector)? also, take a look at your particles using the particle editor: select all particles and set the property selector to "radius". Particles can only collide with each other, and your mesh topology looks like it has large gaps between vertices in some zones (trough which particles can pass even with self-collisions on), and large amounts of vertices clumped together in others (which is a waste of resources)."

So in response to Arkano:

We already got all our art assets and it was contracted out, so I can't really change it too much. I threw it into blender and decimated it a lot to get less than 250 polys. That helped with the lag problem for sure.

So I do have self collisions enabled, but I don't seem to have particles (vertices) in the center area, but I'm not an artist at all. So I'm not entirely sure how to get this working. There aren't really any particles that make sense for increasing the radius.
Reply
#2
To stop the cloth from passing through itself, go to your cloths solver and increase the collision iterations. Try 15-20 then play around with it. Turn off your Mesh renderer and add the ObiParticleRenderer so you can see what’s actually happening. You’ll see the size of the particles this way and see how they are interacting with eachother. A low poly mesh means less particles that will be generated which will have bigger gaps in between the particles which will cause your cloth to go through itself. You can try to increase the particle size to close the gaps. You also might want to mess with the bending constraint so it doesn’t fold sharply.

I’m not sure why your Mesh doesn’t have particles generated in the center. You could try changing the topology and see what happens. You’re initializing the cloth comp after you update the topo right? That person was spot on about your mesh. You say there are no verticies in the center of your mesh, so particles will not generate there as he said, and you will pass through the cloth. So you need a similar mesh that fills these gaps. You can remove some cluttered area like he said if you need more performance. If this is the case.
Reply
#3
Yeah, I'm just not entirely sure how to go about that since I have almost zero 3D modeling experience. I think there are no particles in the middle because it's doing the vertices like a quad, where it's only on the corners and they just connect an edge across.

I installed Blender to see what I could try. I originally had a higher poly poster, I decimated that down so there are far fewer particles. But I still have the problem of no vertices in the middle. So I tried subdivide? That created more vertices in the middle, but not much. Any tips on how I can achieve this?
Reply
#4
What shape does your poster have? Why does the mesh seem so complex for a poster, do you have torn edges?
Reply
#5
Yeah the poster has torn/frayed edges. I'm guessing the artist went with the mesh version since we're doing some high graphics VR and it would make the depth and edges look better in VR if it was done that way. Normals in VR suck up close.


Attached Files Thumbnail(s)
   
Reply
#6
Yea that is an expensive poster lol. Do you care about those torn edges flapping individually? If not, you could make a quick plane in Blender with a good vertex density and use that for the topology.
Reply
#7
Oh I could care less about them flapping individually, haha. So you're saying make a plane with good vertex density and use that for doing the proxy thing?

I'm not entirely sure how to make that. And does the mesh unit size need to match up with the mesh for the object, or will it be alright if the Unity scale just matches up?
My artistic talent from a scale of 0-10 is probably 0.5f.
Would I just take a cube (since I need backfaces), scale it to the right size in Blender, then just subdivide cuts until I get a decent vertex density?
Reply
#8
You can use unity make a quad and scale it to see what the width and height are in meters for your poster. Then go to blender make a new plane, and use those dimensions. Then subdivide it until you have a good density. When you make a new obi topology file, there are scaling parameters there you can use if you need.

For backfaces you'll want to add two materials to your object, and for one of its shaders set it to standard (backfaces).
Reply
#9
so I made a rectangle and subdivided it. When I test it, it still clips through itself (see picture). It's definitely better, but I'll have to get a good balance of vertices. Which iteration values do I need to increase to stop the clipping?
Reply
#10
You have self collisions enabled on the cloth? Go to the solver and under Particle Collisions Constraint Parameters turn it up. You can play around with the values, but start at like 15. A poster wont bend to easily, so you will want to turn up the bending constraint iterations a little and under the bending contraints component you can adjust how much bend you would like.
Reply