I've been performing tests on methods for real-time cloth simulation to see which will be most suitable for VP. I tested in engine methods first, and decided to use simple plane to test baseline performance before moving to a curtain model.
My First Test was to use Unreal's built-in cloth simulation system Choas Cloth. This method only functions with a skeletal mesh and physics asset. While this is an added step to the workflow it also means we could import animations with these meshes to integrate the curtains into the environmental transition.
The process is user-friendly, including a weight painting system and lots of parameterization. I followed the preset recommended
for silk found in the UE Content Examples pack. With such dramatic movement/bending in the cloth, I felt it was necessary to increase iterations and subdivisions on the first high-screen space test.
Choas cloth on 40x40 plane at 1 subdivision (12.8k tris) at 4 iterations
FPS are not representative of actual performance metrics
Performance and live edit testing
For the next method to test I wanted to put my shader skills to use, creating some lightweight functions that could emulate the motion of a curtain in the wind. I decided I would only spend about 2 hours on the first pass of the shader and see what I could get working.
This Material Network shows how I generate a seamless non-repeating map by lerping 2 unique Perlin Maps. By using a combination of world position and typical UV coordinate manipulation we are able to manage both consistency and variety.
What the Lerp Node Outputs
With World Position only
With UV coordinates only
Combined
This Network shows how I convert the output of the Lerp into usable value ranges to drive material parameters
My Curtain Shader on a 40x40 (3.2k tris) plane
FPS are not representative of actual performance metrics
Performance and live edit testing
I decided it was time to make an asset to better test the curtains. So I opened Houdini and got to work!
Houdini Curtain Creation
My Shader on the Houdini Curtains
To push this effect further I need to add a gradient that makes the top of the curtain stay still. as well as introducing more texture variation to sell the ruffles and appear less uniform.
Chaos Cloth on Houdini Curtains
Clearly with these settings this asset is not ideal
Chaos cloth with Bending Elements on Houdini Curtains
I am unsure how much more expensive this sim is compared to the left. However results are promising.