I'm trying to make curtain that I can open/close in unreal engine. For now I have this:
I suppose I should add cloth modifier to curtain and attach it to rings. After that I should stretch that rings and cloth will follow them. After that I'll bake the animation and export it.
Unfortunately, I don't know how to do any of this things(. I created 100 loop cuts for curtain to stretch it:
and the rings is the one ring with array modifier. Can you help me with details?
-
$\begingroup$ You could this in Blender but the cloth simulation does not work in the Unreal Engine. It's better to have a look at the Unreal Engine's cloth physics if you plan to use this in the game engine. $\endgroup$– BlunderNov 24, 2022 at 19:00
-
$\begingroup$ @Blunder I know, but I don't need full simulation. I just need to open and close curtain. So I think I can just bake animation in blender and export it in unreal. I need simulation in Blender just to make this stretch procedurally, not manual. $\endgroup$– СергейNov 24, 2022 at 19:08
-
$\begingroup$ @vklidu sorry, but I don't understand. Is that a questions? $\endgroup$– СергейNov 25, 2022 at 17:02
-
$\begingroup$ I deleted my comment now ... your Q was answered and accepted :) Forget it. $\endgroup$– vkliduNov 26, 2022 at 8:56
1 Answer
It looks like you can export shape keys from Blender to Unity, so you could use this method:
Create a vertex group where the curtain is hung, choose it as the pin group in the Physics panel > Cloth > Shape > Pin Group:
Then create 2 shape keys, select the second, scale down the vertices:
Create 2 keyframes on the second shape key Value, one with the value at 0, the second at 1. Enable the Object Collisions > Self Collisions option, give it a Solidify and a Subdivision Surface modifier. Here is what it gives when you play the animation:
-
$\begingroup$ 2 questions: how to attach it to rings and how to remove the artifacts? $\endgroup$– СергейNov 24, 2022 at 19:30
-
$\begingroup$ For the artefact, enable the Self Collisions option. As for the rings, maybe animate with bones? $\endgroup$ Nov 24, 2022 at 19:36
-
-
-