(28-02-2021, 07:16 PM)josemendez Wrote: Hi,
The link you posted does not seem to contain an image, and it's not visible
Deformable objects can't be non-uniformly scaled at runtime. In few words, the reason for this is that non-uniform scaling does not preserve euclidean distances. I'll copy-paste a more detailed explanation I gave in a different thread:
The easiest workaround for this is to generate several blueprints of your object at different scales, then at runtime pick between them at random.
I hope this one is as public view↓
I started with about 10 diferent blueprints and I noticed it consumes a lot of processing leaving my game about 10fps, even with optimizations of interations, unity timesteps and so on... I used those blueprints, made prefabs and populated with about 50 clothing objs throughout the scene, but suffocating 10fps, oh, btw using skinnedmaps, since the cloth slave meshes are thick.
I had to kill some diferent meshes, I made a lot of tests and found out that using 1 blueprint for 5 different slaves and populating with about 45 cloths it can reach ~58fps. Artistically not my ideal but performance X art is a really really though fight.
So, to get more variations at this situation Im putting from .85f to 1.5f stretch scale in some prefabs to get size variations, it got some like physics artifacts but playing with constraints i got some acceptable results.
If axis stretching is possible, it could be cool like stretching the pillow more along X then along Y/Z.. making some proporting variations u know?
Oh, I also figured out that the more vertices/particles on the driven mesh more expensive to process. In my mind it should be obvious but my artist side made me made the driven mesh 3-4x times resolution dense then know, that I'm using 9 vertex... some penetrations occur but not that much, between performance X art I had to leave like this.
And btw I also have 2 curtains and 1 blanket at the scene, which are very broadwide meshes but I also made their driven mesh resolution lower with some acceptable results.