Curtains blowing in the wind?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Curtains blowing in the wind?

Post by Hidden Hands »

Okay, time for another difficult request... but one I REALLY would like to pull off, but have absolutely no idea how. I want curtains, blowing about due to a broken window. In other wordes, the window in a bedroom is cracked, causing a breeze to come through into the room, causing the curtains to blow about and creating an eerie atmosphere. Can this be done? How can I pull this off?

I'm thinking a linedef with a curtain texture that's given special 3d movement properties maybe.

I'm guessing ACS... maybe not though? I can show an example of what I want if neccesary? Here is an example of what I'm trying to pull off.

Image

Thanks in advance!
User avatar
Tormentor667
Posts: 13554
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Re: Curtains blowing in the wind?

Post by Tormentor667 »

This can only be achieved with a model. Such complex animations are nothing for a texture or a sprite.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Curtains blowing in the wind?

Post by wildweasel »

For what's possible in GZDoom, you're probably going to have to go with a canned animation of a model. From there it'll be "as simple as" defining a decoration and assigning it the model with Modeldef, but of course, the trick is getting that model made in the first place.

This, unfortunately, goes well beyond what can be achieved with lines and sectors.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: Curtains blowing in the wind?

Post by Hidden Hands »

Ah I see. Well this seems like something I might not be able to pull off anytime soon. Thank you all very much though for letting me know what is needed.

Making a game really helps to appreciate the hard work people that do this stuff back in the late 90s did, it's never as easy as it looks.
User avatar
HAL9000
Posts: 266
Joined: Fri Mar 16, 2018 7:44 am
Contact:

Re: Curtains blowing in the wind?

Post by HAL9000 »

    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
    Last edited by HAL9000 on Mon May 25, 2020 1:51 pm, edited 1 time in total.
    User avatar
    HAL9000
    Posts: 266
    Joined: Fri Mar 16, 2018 7:44 am
    Contact:

    Re: Curtains blowing in the wind?

    Post by HAL9000 »

    I've made this example in ~10 minutes...
    Image
    User avatar
    Tormentor667
    Posts: 13554
    Joined: Wed Jul 16, 2003 3:52 am
    Preferred Pronouns: He/Him
    Operating System Version (Optional): Windows 11
    Graphics Processor: nVidia (Modern GZDoom)
    Location: Germany
    Contact:

    Re: Curtains blowing in the wind?

    Post by Tormentor667 »

    Impressive, you are good :)
    User avatar
    HAL9000
    Posts: 266
    Joined: Fri Mar 16, 2018 7:44 am
    Contact:

    Re: Curtains blowing in the wind?

    Post by HAL9000 »

    Tormentor667 wrote:Impressive, you are good :)
    Thanks, Cinema4D is very good for simulations like wind, cloth, water etc...
    It's pain in the ass to create loop, bake animation properly into FBX and convert to MD3 tho...
    (because it's physics simulation not animation...if that make any sense :P )
    User avatar
    HAL9000
    Posts: 266
    Joined: Fri Mar 16, 2018 7:44 am
    Contact:

    Re: Curtains blowing in the wind?

    Post by HAL9000 »

    Here is the md3 (0-45 frames loop), and texture
    Feel free to create your own texture, this was just an example.
    Actor and modeldef is not included.

    Tip: You can also animate the texture with extra frames and apply it to the animated model :D
    ...and achieve something like this:
    Image
    Last edited by HAL9000 on Mon Jun 01, 2020 1:24 pm, edited 1 time in total.
    User avatar
    Hidden Hands
    Posts: 1053
    Joined: Tue Sep 20, 2016 8:11 pm
    Location: London, England
    Contact:

    Re: Curtains blowing in the wind?

    Post by Hidden Hands »

    HAL9000 wrote:Here is the md3 (0-45 frames loop), and texture
    Feel free to create your own texture, this was just an example.
    Actor and modeldef is not included.

    Tip: You can also animate the texture with extra frames and apply it to the animated model :D
    ...and achieve something like this:
    Image
    Holy Hell on a bicycle this is the most amazing thing I've ever seen in my entire life......you made a PERFECT model in perfect detail of what I wanted.... I am MINDBLOWN.

    May I have this please? May I use it? Credit will be given for your incredible work .

    If so how do I add it into the game please!? :)

    You are just... damn I csnt believe this. Incredible!
    User avatar
    HAL9000
    Posts: 266
    Joined: Fri Mar 16, 2018 7:44 am
    Contact:

    Re: Curtains blowing in the wind?

    Post by HAL9000 »

    Hidden Hands wrote:
    Holy Hell on a bicycle this is the most amazing thing I've ever seen in my entire life......you made a PERFECT model in perfect detail of what I wanted.... I am MINDBLOWN.
    May I have this please? May I use it? Credit will be given for your incredible work .
    If so how do I add it into the game please!? :)
    You are just... damn I csnt believe this. Incredible!
    This was just an example , I will create better version and send it to you later, actor, animdef and modeldef included
    Will send it to you later, Cheers!
    User avatar
    Hidden Hands
    Posts: 1053
    Joined: Tue Sep 20, 2016 8:11 pm
    Location: London, England
    Contact:

    Re: Curtains blowing in the wind?

    Post by Hidden Hands »

    HAL9000 wrote:
    Hidden Hands wrote:
    Holy Hell on a bicycle this is the most amazing thing I've ever seen in my entire life......you made a PERFECT model in perfect detail of what I wanted.... I am MINDBLOWN.
    May I have this please? May I use it? Credit will be given for your incredible work .
    If so how do I add it into the game please!? :)
    You are just... damn I csnt believe this. Incredible!
    This was just an example , I will create better version and send it to you later, actor, animdef and modeldef included
    Will send it to you later, Cheers!
    Wow thank you so much I appreciate more than I can say! I look forward to it I cant wait to use it. Thank you again!!!
    User avatar
    HAL9000
    Posts: 266
    Joined: Fri Mar 16, 2018 7:44 am
    Contact:

    Re: Curtains blowing in the wind?

    Post by HAL9000 »

    Sorry for the late reply. Here is the pk3 file. Modeldef, Zscript, Animdef and Editor files included. (I did not test it in editor tho)
    Feel free to use and modify it, actor is just a placeholder.
    Just don't forget to add me to the credits. ;)

    https://www.dropbox.com/s/yypjk7fl8gxpl ... s.pk3?dl=0

    Code: Select all

    Summon curtain_new
    Summon curtain_damaged
    Summon curtain_destroyed
    Enjoy!
    User avatar
    Hidden Hands
    Posts: 1053
    Joined: Tue Sep 20, 2016 8:11 pm
    Location: London, England
    Contact:

    Re: Curtains blowing in the wind?

    Post by Hidden Hands »

    HAL9000 wrote:Sorry for the late reply. Here is the pk3 file. Modeldef, Zscript, Animdef and Editor files included. (I did not test it in editor tho)
    Feel free to use and modify it, actor is just a placeholder.
    Just don't forget to add me to the credits. ;)

    https://www.dropbox.com/s/yypjk7fl8gxpl ... s.pk3?dl=0

    Code: Select all

    Summon curtain_new
    Summon curtain_damaged
    Summon curtain_destroyed
    Enjoy!
    Thank you so much for this! I can't wait to try it out tonight. I'll be trying it when I get home later, and of course I'll definitely add you to the games credits! :)
    User avatar
    HAL9000
    Posts: 266
    Joined: Fri Mar 16, 2018 7:44 am
    Contact:

    Re: Curtains blowing in the wind?

    Post by HAL9000 »

    Hidden Hands wrote: Thank you so much for this! I can't wait to try it out tonight. I'll be trying it when I get home later, and of course I'll definitely add you to the games credits! :)
    No problem. Feel free to tweak the actor files.

    Based on current actors you can for example create new base "curtain_new" actor and when you shoot it it can turn to "curtain_damaged" or "curtain_destroyed" model...Just an idea....
    Also, just crossed my mind.... I will create burn animation for curtains just in case you want to set them on fire or idk...

    Something like this: (yeah it looks bad at the moment, this was just a test...)
    Spoiler:
    Post Reply

    Return to “Scripting”