16-10-2017, 02:56 AM
Hello, I have a few questions! I am trying to achieve the following for a VR project (I'm using HTC Vive and Leap Motion):
I want to grab a texture object that uses the Obi cloth simulation and place it on a mesh object. The mesh object optionally has been changed before that so that it is necessary to update its mesh collider once. After the object is placed it should be possible to slide the texture/cloth over the object while still having cloth and mesh object stick together. In the end the cloth object should be frozen and optionally a new texture/cloth comes in - taking the old one out of the calculations to save performance etc.
1 For now I have put two handles on the upper corners of the cloth to grab it and place it. Could I turn these handles off after being done with the rough placement? Also it would be much more convenient to be able to grab the cloth anywhere so I wouldn't need dedicated handles. Is there something like temporary handles that could react to the grabbing gesture of the leap motion? Can I directly influence the positions of particles that are in a certain range of the hands?
2 How can I recalculate the Obi collider of the object from its mesh collider? I think I saw something in the API using the ColliderGroup, but this doesn't seem to exist anymore.. At the moment I just add a new collider once the mesh is ready - but I am not sure if that is a good solution... also the cloth seems to jump each time I do that. It doesn't bother me too much, just want to make sure if this would be expected behaviour.
3 Regarding the surface sliding I think I would need to have an Obi collision material that is very sticky with a small stick distance (so it doesn't stick to quickly) and also a low friction value. Then use Friction Combine Minimum and Stickiness Combine Maximum. Does that sound about right?
4 How many iterations of the distance constraints would be OK for VR? Maybe 20 or 30? With the default the cloth enters the mesh a little too frequently..
5 And a final question: There will be a lot of different combinations of objects and cloth textures coming in one after another. But only one combination would be active at a time. What would be the best way to set this up regarding performance and memory? Can I pool all the mesh objects and texture/cloth objects and have them share one Solver? Or would it be better to instantiate them from prefabs and/or have a different solver for each cloth texture object?
Thank you!
Jan
I want to grab a texture object that uses the Obi cloth simulation and place it on a mesh object. The mesh object optionally has been changed before that so that it is necessary to update its mesh collider once. After the object is placed it should be possible to slide the texture/cloth over the object while still having cloth and mesh object stick together. In the end the cloth object should be frozen and optionally a new texture/cloth comes in - taking the old one out of the calculations to save performance etc.
1 For now I have put two handles on the upper corners of the cloth to grab it and place it. Could I turn these handles off after being done with the rough placement? Also it would be much more convenient to be able to grab the cloth anywhere so I wouldn't need dedicated handles. Is there something like temporary handles that could react to the grabbing gesture of the leap motion? Can I directly influence the positions of particles that are in a certain range of the hands?
2 How can I recalculate the Obi collider of the object from its mesh collider? I think I saw something in the API using the ColliderGroup, but this doesn't seem to exist anymore.. At the moment I just add a new collider once the mesh is ready - but I am not sure if that is a good solution... also the cloth seems to jump each time I do that. It doesn't bother me too much, just want to make sure if this would be expected behaviour.
3 Regarding the surface sliding I think I would need to have an Obi collision material that is very sticky with a small stick distance (so it doesn't stick to quickly) and also a low friction value. Then use Friction Combine Minimum and Stickiness Combine Maximum. Does that sound about right?
4 How many iterations of the distance constraints would be OK for VR? Maybe 20 or 30? With the default the cloth enters the mesh a little too frequently..
5 And a final question: There will be a lot of different combinations of objects and cloth textures coming in one after another. But only one combination would be active at a time. What would be the best way to set this up regarding performance and memory? Can I pool all the mesh objects and texture/cloth objects and have them share one Solver? Or would it be better to instantiate them from prefabs and/or have a different solver for each cloth texture object?
Thank you!
Jan