Jump to content
The Dark Mod Forums

Random Animations--possible?


Springheel

Recommended Posts

This might be possible already, I don't know.

 

What I'm hoping is that we can have animations work like sounds do. When we call a sound, we actually refer to a soundshader that has a list of sounds, and one sound from that list is called randomly. Could we do the same for animations? Squill has made two equally good failed KO animations, and it would be far more realistic if AI didn't use the exact same animation every time. Any chance we can set up lists of animations to select from randomly?

Link to comment
Share on other sites

I've wondered this as well, and I'm pretty positive it's possible since even Half-life 1 had support for that. But I'm not sure how it works exactly in the Doom 3 engine, it might be something you can do through a def file but I'm not certain about that. Scripts could probably do it since from what I understand they simply link assets together even if they're MD5anim files.

 

Another idea I had that I'm not aware of the engine actually supporting is the option of having an animation played from a range between two other animations. So basically, you'd have two animations of the same action, each slightly different, and then the end animation that plays would be anywhere between those two points (for example a person stretching with his arms do his sides and another with him stretching with his arms upwards, and the final animation could be stretching directly outward, slightly upwards, slightly downwards, fully upwards; basically any possible position between the two animations).

 

Essentially it would simply be interpolating the bone positions between two absolute values for each frame of the animation. I'm not sure how hard it would be to impliment though, but it was something I thought of years ago and never really had the chance to do it, so if anyone else thinks that would actually work feel free to chime in.

Link to comment
Share on other sites

I'm not particularly knowledgeable about monster scripting and animations, but it's possible to pick a random number in a script... so maybe it would be possible to just have the scripts randomly choose the animation, even if there's no SDK support for it?

Yeah, that would be easy to do, just have the anims named <anim name>_1 <anim_name>_2 etc.

 

A more advanced way would be to make a new anim decl type and a new play anim command that automatically chooses a random one from the ones listed in the decl, but I'm not sure if that would be worth it or not.

Link to comment
Share on other sites

A random anim picker would definitely be worthwhile and it shouldn't be hard to do that. We talked about this early in the beginning. How would this currently work? If we have a guard standing idle, we would like it to make all kind of random animations like ywaning, turning, coughing, etc.. I thought that this is already possible?

Gerhard

Link to comment
Share on other sites

There are two slightly different uses for this.

 

One, we absolutely need, and that's for randomly playing idle animations. That requires calling an animation at randomly determined intervals while the AI is in an idle state (which must be possible since D3 does it for head turning already). It also requires selecting from a list of possible idle animations (yawn, stretch, cough, etc).

 

The second use is to select from multiple versions of the same animation. So if we have three different search animations, and the AI goes into search mode, it randomly picks one of the three to play. This would add some variety to the way the AI move, which is beneficial for animations that they do a lot (like searching, walking, etc).

 

We would probably want to do something like the above for combat as well, randomly picking between various attack animations.

Link to comment
Share on other sites

Yeah, that would be easy to do, just have the anims named <anim name>_1 <anim_name>_2 etc.

 

Do we need to talk about naming conventions? If we have to change the name of an animation later, wouldn't that also mean having to change all the .def files as well? Better to avoid that if possible.

 

Maybe it would be worth thinking about this now before we get too many to handle, especially since we're starting to work on idle animations which definitely will need to be randomized. Or is there a way that we can randomize them regardless of what they're called?

Link to comment
Share on other sites

Do we need to talk about naming conventions? If we have to change the name of an animation later, wouldn't that also mean having to change all the .def files as well? Better to avoid that if possible.

 

Maybe it would be worth thinking about this now before we get too many to handle, especially since we're starting to work on idle animations which definitely will need to be randomized. Or is there a way that we can randomize them regardless of what they're called?

It doesn't matter what the *.md5anim name is as long as the def anim has the proper name. I could easily point an idle animation to attack.md5anim. Anim decls won't be a problem to rename & I agree that we need naming conventions for those.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 2 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 4 replies
×
×
  • Create New...