Physics effect on cloth

Hi,

@Blender added cloth properties as part of physics properties, and exported the avatar as .glb file

I could not get cloth effect while animation.
@slin could u throw some light here…

Thnks
vij

Have you just run the simulation inside Blender or have you baked it?

Hi @vijay_krishna

Unfortunately, I am not a designer and I am not familiar with any design tools like blender.

I am pretty sure you will have to do something like here ( as @carolhmj mentioned ). Maybe with different simulations/animations for the cape like running vs idle and make sure to play them at the right time :slight_smile:

1 Like

@br-matt can we get wind simulation on cloth while walking using this web framework…

Thnks
vij

That’s a tall order :slight_smile: I would not know where to begin but anything is possible. Especially if you start converting C++ stuff to wasm

Maybe this can help you out:
https://blog.raananweber.com/2016/04/03/cloth-physics-simulation-for-babylon-js/

3 Likes

@carolhmj i tried using physics imposters almost there…

am stuck can u help me

The reference PG is here

Do you know this cloth example made with a shader?

Babylon.js Playground (babylonjs-playground.com)

@CodingCrusader tried by yur concept using .glb , same old issue is persisting…

Maybe i need yur guidance here…

Pinging @nasimiasl because he is the creator of this example and can bring light into the darkness.

PS: I downloaded the object from nasimiasl and looked at it in the sandbox. The figure does not have a dress on. I could not download your object to make a comparison.

Babylon.js - test.obj (babylonjs.com)

test.zip (220.8 KB)

1 Like

sharing the 3d avatar
https://fashion-desings.s3.ap-south-1.amazonaws.com/common/casuals/tshirts/userchoice/kurtha8.glb

Your character is already wearing clothes. Nasimiasl’s character’s clothes are created by the shader. I have changed some parameters here to illustrate this:

if(abs(pos.x)>5. || (pos.y)>155. || pos.y < 5.) discard;

cloth-sim | Babylon.js Playground (babylonjs-playground.com)

@CodingCrusader
Creating cloth from shader is time consuming and too complex.
In my case we have already clothes. Maybe if i can get the Mesh of outer dress and map it to shader would fix the issue.

var outerdress =scene.getMeshByName(“kurtha1.005”)

Now am unable to map it to the shader ?

hey

my workfloe for make dress base on only nude body

define cut and calculate stopBody

  1. https://www.babylonjs-playground.com/#P70MW7#2

  2. calculate new position after wind direction
    https://www.babylonjs-playground.com/#P70MW7#3

  3. recalculate stop Body and elastic calculation
    https://www.babylonjs-playground.com/#P70MW7#4

  4. ignore wind front direction

  1. all done just rotate wind
    https://www.babylonjs-playground.com/#P70MW7#6

2 Likes

Thanks @nasimiasl for sharing the logic… i tried but cannot fit yur logic into my model(avatar outfits)

The only option left is physics imposters i dont know where am making mistake…

Thanks
vij

This is an other example how to create a cloth simulation without shaders

Soft Body Example | Babylon.js Playground (babylonjs.com)