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.

Curtains blowing in the wind?

Postby Hidden Hands » Sun May 24, 2020 11:21 am

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
Hidden Hands
Cherub
 
Joined: 20 Sep 2016
Location: London, England
Discord: VGCtm
Operating System: Windows Vista/7/2008 32-bit

Re: Curtains blowing in the wind?

Postby Tormentor667 » Sun May 24, 2020 12:45 pm

This can only be achieved with a model. Such complex animations are nothing for a texture or a sprite.
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Curtains blowing in the wind?

Postby wildweasel » Sun May 24, 2020 1:11 pm

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
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: Curtains blowing in the wind?

Postby Hidden Hands » Sun May 24, 2020 5:04 pm

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
Hidden Hands
Cherub
 
Joined: 20 Sep 2016
Location: London, England
Discord: VGCtm
Operating System: Windows Vista/7/2008 32-bit

Re: Curtains blowing in the wind?

Postby HAL9000 » Sun May 24, 2020 6:01 pm

    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
    I'm sorry Dave, I'm afraid I can't do that
     
    Joined: 16 Mar 2018
    Discord: HAL9000#9378

    Re: Curtains blowing in the wind?

    Postby HAL9000 » Mon May 25, 2020 12:55 pm

    I've made this example in ~10 minutes...
    Image
    User avatar
    HAL9000
    I'm sorry Dave, I'm afraid I can't do that
     
    Joined: 16 Mar 2018
    Discord: HAL9000#9378

    Re: Curtains blowing in the wind?

    Postby Tormentor667 » Mon May 25, 2020 1:05 pm

    Impressive, you are good :)
    User avatar
    Tormentor667
    needs more detail
     
    Joined: 16 Jul 2003
    Location: Germany

    Re: Curtains blowing in the wind?

    Postby HAL9000 » Mon May 25, 2020 1:07 pm

    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
    I'm sorry Dave, I'm afraid I can't do that
     
    Joined: 16 Mar 2018
    Discord: HAL9000#9378

    Re: Curtains blowing in the wind?

    Postby HAL9000 » Mon May 25, 2020 1:41 pm

    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
    HAL9000
    I'm sorry Dave, I'm afraid I can't do that
     
    Joined: 16 Mar 2018
    Discord: HAL9000#9378

    Re: Curtains blowing in the wind?

    Postby Hidden Hands » Tue May 26, 2020 9:09 am

    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
    Hidden Hands
    Cherub
     
    Joined: 20 Sep 2016
    Location: London, England
    Discord: VGCtm
    Operating System: Windows Vista/7/2008 32-bit

    Re: Curtains blowing in the wind?

    Postby HAL9000 » Tue May 26, 2020 9:17 am

    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
    HAL9000
    I'm sorry Dave, I'm afraid I can't do that
     
    Joined: 16 Mar 2018
    Discord: HAL9000#9378

    Re: Curtains blowing in the wind?

    Postby Hidden Hands » Tue May 26, 2020 10:22 am

    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
    Hidden Hands
    Cherub
     
    Joined: 20 Sep 2016
    Location: London, England
    Discord: VGCtm
    Operating System: Windows Vista/7/2008 32-bit

    Re: Curtains blowing in the wind?

    Postby HAL9000 » Mon Jun 01, 2020 1:08 pm

    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 allExpand view
    Summon curtain_new
    Summon curtain_damaged
    Summon curtain_destroyed


    Enjoy!
    User avatar
    HAL9000
    I'm sorry Dave, I'm afraid I can't do that
     
    Joined: 16 Mar 2018
    Discord: HAL9000#9378

    Re: Curtains blowing in the wind?

    Postby Hidden Hands » Wed Jun 03, 2020 6:56 am

    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 allExpand view
    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
    Hidden Hands
    Cherub
     
    Joined: 20 Sep 2016
    Location: London, England
    Discord: VGCtm
    Operating System: Windows Vista/7/2008 32-bit

    Re: Curtains blowing in the wind?

    Postby HAL9000 » Wed Jun 03, 2020 8:47 am

    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:
    User avatar
    HAL9000
    I'm sorry Dave, I'm afraid I can't do that
     
    Joined: 16 Mar 2018
    Discord: HAL9000#9378

    Next

    Return to Scripting

    Who is online

    Users browsing this forum: No registered users and 0 guests