How to Implement Cloth Simulation with PlayCanvas

We’re super-excited to announce some new experimental PlayCanvas technology that simulates cloth physics.

Read all about it here:

Can you help us spread the word on Twitter?

:smiley: :pray:

5 Likes

Ooh, nice feature!

That last image reminded me something…

4 Likes

:innocent:

5 Likes

Here’s a funny riff on the cloth tech we announced yesterday - The Emperor dancing to hip hop!

Here’s the demo:

And here’s @ray’s tweet!

3 Likes

He has the moves! That was refreshing :slight_smile: Thank you for making my day!

2 Likes

If one would want to test it in his own project, would patching the shader chunk as in the example suffice?

Pinging @ray :slight_smile:

@LeXXik - yes it should/could work in your own project if you add the money-patch,js script to patch the transform shader chunk and the cloth-sim.js script process your character - your character would also need vertex colors set up on it (as shown in the dev blog article posted by @will above).

3 Likes

Yep, got it, thank you, @ray!

I tried all this with my own model but I just get an error: Cannot read property ‘length’ of null from cloth-sim.js. Any ideas?

Impressive!! It’s great!! However, now I am trying to replace the model with another that has some vertex painted as well, but it doesn’t really work. Are there any additional settings that I need to add to the model? TNX IN ADVANCE :slightly_smiling_face:!!..

@Luis_Mb - if you are just swapping out the example character model for a new one, the additional painted vertex color is all that should be needed - does the character model you are trying to use import and render and animate correctly? What is the error you are getting?

Something to try is to import the example character model into your 3D package, modify it and export using the same settings you use for your own character model. I can also help take a look at your character model if you are able to allow me access?

Thanks. This is my model https://sketchfab.com/3d-models/cloth1fbx-603cdfe41728494da5acf5ae69cbfd32

@Luis_Mb - I can’t seem to access the model on sketchfab? I guess it’s not public - if you prefer, you could give me read access to your PlayCanvas project - and I can look at your source model there? My PlayCanvas username is: rtuk

Sorry :sweat_smile: Now is public!

Hello Guys.

Use cloth in Playcanvas is really awesome. :dancer:
I have had some problems trying to upload my own models
Some advance in the project?

Also stumbled on this project recently, and it would be rly rly cool to use this in some of our projects!

I see in the blog post there is talk about improving the system and making it more easy to implement. Has there been any such patches?? If so, where do I look to implement this?

Unfortunately, we’ve not made progress to adding this to the core engine so the only methods to do this have been mentioned in the blog post above.

@will hi, how can i exportr the cloth simulation animation in glb files. I want to do some cloth simulation using playcanvas’s script to handle thounds cloth. Is it possible for me to use script to export the cloth sumulation animation?