Producing efficient openable curtains

I know there’s a bit of information out there on high quality curtains for architectural visualisation, but I’m hoping to create a relatively large number of netcode-efficient, low- to mid-poly curtains for use in a realistic game level, and I can’t find anything relevant to that. I am intending that the curtains can be toggled between a closed and opened state with a user keypress. Ideally all that would need to be replicated would be the open/closed state.

I don’t need any sort of blowing in the breeze effect (I have seen tutorials relating to that), and the pushing mentioned above is by an abstract force rather than from collisions with the player (I am not intending for there to be any reacting to player collisions unless it’s doable without a big performance hit with, say, 20-30 curtain objects in the level). Having the material ‘swoosh’ in a realistic way during the transition would be nice, if it’s ‘cheap’, but by no means essential - a simple solution is probably better.

Without knowing the Unreal physics system in detail nor what is possible with it (without a big performance hit), I guess in physics terms the system would resemble a series of linked rods, each rod being associated with/aligned with a vertical strip of curtain material). The ends of the rods are free to move along a horizontal axis, with some sort of self-collision/spring force so that they concertina in the appropriate way when pushed from one side.

If all else fails, a very simple solution would have a single concertina-shape static mesh which is simply resized when activated between short and wide (curtains open, emphasising the folds) and wide and thin (curtains closed, flattening the folds). This may suffice, but the animation would look odd because real curtains are folded from one side to the other when drawn, rather than all folds flattening at once.

I’m not expecting hand-holding but I would appreciate some pointers on what sort of setup would be best, rather than hand-holding with the implementation, so I know where to focus my reading on the physics side of things (I have nearly zero knowledge at present). I imagine there’s a few different ways to do it. (The activation/keypress side of things is no issue.)

For my sins (which must be many) I use Lightwave, so I’m probably stuffed on things to do with PhysX/APEX clothing. I can produce the basic models/meshes though.

Thanks in advance, and apologies for my ignorance.

For static meshes there is this: Static Mesh Morph Targets | Unreal Engine Documentation

but i dont know how you could replicate that in Lightwave. If this isnt an option then you could use skeletal meshes and either;

  • Use bones to skin the curtain and then animate opening/closing.
  • Or use morph targets and switch between a couple of phases(at least 3 - open, half open, closed to prevent odd distortions between open and closed)

Thanks - that’s very helpful. I will look into all of those things, and prepare my walls for more head-bashing as I try and get it into the engine…

Much like playing a concertina requires finesse, replicating the nuanced folding of real curtains might pose some interesting technical considerations.

Yea, you just dont do it.
Like you don’t do any other type of physics simulation along with Replication.

Maybe there’s some other way that is not goofy or sort of.

There isn’t.
You need to send data through a network for every vertex displaced to have things match up on all clients.
And they never will - networks lag, connections drop, and net coding is a lost art…

Its pretty much the equivalent of you claiming its possible to travel at lightspeed.
Sure it is… if you are on a TV show or movie set (now of definitely ill repute - Dismey.), or if you happen to be a photon…

That sounds pretty challenging.