Its easy to do it in C4D, (and probably in Blender, idk I'm C4D user)...
Flag Example:
https://youtu.be/7OheaRFFpDw (this can be also applied for curtains)
-Create low poly plane\cloth model
-Edit UV and create Texture map for your cloth model
-Follow the tutorial to apply wind animation the cloth model, tweak settings to your preference
-After that
bake animation to point vertex cache and export to FBX (or OBJ sequence for use in MD3 tool)
-Use Noesis to convert from FBX to md3 animation
-Create Gzdoom actor and modeldef.
-Done