Obi Official Forum
Cloth Shrinking in Play Mode - 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: Cloth Shrinking in Play Mode (/thread-3340.html)



Cloth Shrinking in Play Mode - kingceryn - 28-02-2022

I'm trying to recreate the Boat example with my own meshes, and for some reason my Sail mesh is shrinking when i enter play mode.  I'm pretty sure i have the constraints setup properly, and the parenting to the Mast pivot, but the Sail itself shrinks down and i cant figure out why.

The mesh scale is 1,1,1 
https://www.youtube.com/watch?v=VikMrIx7YNc




RE: Cloth Shrinking in Play Mode - josemendez - 28-02-2022

Hi there,

Could you share some details about your setup? What' the blueprint scale value? you mention the cloth is parented to the Mast pivot, is the Mast transform or any of the transforms up its hierarchy scaled?


RE: Cloth Shrinking in Play Mode - kingceryn - 28-02-2022

(28-02-2022, 08:48 AM)josemendez Wrote: Hi there,

Could you share some details about your setup? What' the blueprint scale value? you mention the cloth is parented to the Mast pivot, is the Mast transform or any of the transforms up its hierarchy scaled?



Here's a video of most of the relevant settings i think, let me know if theres something i didnt check in this video:

https://www.youtube.com/watch?v=hgtlHFrrP8s




RE: Cloth Shrinking in Play Mode - josemendez - 01-03-2022

Hi there,
Thanks for the video! however it does not show the transforms up the Mast hierarchy. Is the boat or any transform above it in the hierarchy scaled?

Also, are the cloth corners being attached inside a collider? (can't see how large the mast colliders are). Asking because this will force the attachment position out of the collider, and cause some additional issues. This can be avoided by using collision filters (see the last part of: http://obi.virtualmethodstudio.com/manual/6.3/pinconstraints.html)


RE: Cloth Shrinking in Play Mode - RandomizedAF - 17-04-2022

(01-03-2022, 08:59 AM)josemendez Wrote: Hi there,
Thanks for the video! however it does not show the transforms up the Mast hierarchy. Is the boat or any transform above it in the hierarchy scaled?

Also, are the cloth corners being attached inside a collider? (can't see how large the mast colliders are). Asking because this will force the attachment position out of the collider, and cause some additional issues. This can be avoided by using collision filters (see the last part of: http://obi.virtualmethodstudio.com/manual/6.3/pinconstraints.html)



Josemendez, How can you fix issues with scaling without having to remake the entire model again?

(01-03-2022, 08:59 AM)josemendez Wrote: Hi there,
Thanks for the video! however it does not show the transforms up the Mast hierarchy. Is the boat or any transform above it in the hierarchy scaled?

Also, are the cloth corners being attached inside a collider? (can't see how large the mast colliders are). Asking because this will force the attachment position out of the collider, and cause some additional issues. This can be avoided by using collision filters (see the last part of: http://obi.virtualmethodstudio.com/manual/6.3/pinconstraints.html)



Josemendez, How can you fix issues with scaling without having to remake the entire model again? I currently have this issue and my ship was definitely scaled differently in all parts, the mast in one size and the parts of the mast that hold the sails are another size.


RE: Cloth Shrinking in Play Mode - josemendez - 18-04-2022

(17-04-2022, 02:48 PM)RandomizedAF Wrote: Josemendez, How can you fix issues with scaling without having to remake the entire model again? I currently have this issue and my ship was definitely scaled differently in all parts, the mast in one size and the parts of the mast that hold the sails are another size.

It shouldn't be necessary to remake anything, simply apply your transform scale values and export the model again.

Applying transform values is done differently depending on the program you use. For instance in Blender it's Object->Apply->Scale.

If you have multiple parented objects with different scales it can be a bit tedious as applying the scale of a parent will  re-scale the children. However this is not good practice anyway, since a non-uniformly scaled parent + rotated child gives rise to skew which is (almost) always undesired.

See: https://artisticrender.com/how-and-why-do-we-apply-scale-in-blender/

Note that some of the reasons Obi doesn't use the components transform values when generating the blueprint are:
-A) assets cannot reference scene objects (eg, you can't have a texture or audio file know anything about the scene), so blueprints don't know how the mesh is going to be transformed in the scene.
-B) using regular components instead of assets (scriptable objects) to store blueprint data would duplicate the blueprint data for every single cloth in your scene, causing the amount of serialized scene data to skyrocket and become unmanageable except for trivial cases.