Jump to content
The Dark Mod Forums

Swapping Heads On Ai


Springheel

Recommended Posts

Continued from Animation thread:

 

 

3. How do we prepare our models for head-swapping? How easy it is to cut the heads off (especially on models like the builder guard who has a specific neckguard), and is a new attachment joint needed to attach them? We probably need to do some research for this one. How does cutting the head off a model affect the animations?

 

 

3. Hmm, well from what I understand we'd need to edit the models at the neck and set the points as attachment areas, but how a head is reconnected to that I don't know.

 

From what I saw (at least in oDD's mb files) was that the AI mesh was already broken up. And I found a few stand-alone heads in the LWOs. As for the rest of the LWOs I think they are one mesh.

 

3. It doesn't mess up the anims but it means they'll have to be re-exported. How you're going to swap the heads in game is up to the coders.

 

Swapping the heads is already in vanilla D3. I think you just put in "def_head", and have to also name the head attachment joint. You can look at the def file for most of the D3 characters and it will show how to do this.

 

@Ish re: head swapping - yeah that's right. Actually I revise this - this is a modelling issue. But still the anims will have to be re-exported.
Link to comment
Share on other sites

There's not much to swapping heads from a coding standpoint, D3 does it already. But there are a couple specific things we need to know:

 

Is there an appropriate joint in the neck of our AI to attach the heads to?

 

How do you control the head when you're making animations if it's cut off? I know the head can act independently (looking around) but there would be times we'd want it to do something specific to go along with the rest of the animation. D3 might already handle this, I don't know.

 

Is removing the current heads from the models very difficult?

 

Should we be doing this now, before new animations are made, or is it just as easy to do later?

Link to comment
Share on other sites

Oh it's definetly something to get done ASAP before other anims are made.

 

But as for animating, it would be the same as animating with a sword. We animate with a placeholder head, and then delete it after exporting, leaving the neck bone behind which retains all of the movement information, and a head can be attatched to this in the game.

Link to comment
Share on other sites

I did some tests on this a while back.

You don't even need to do a head swap, you can just to a face swap.

WIth the elite city watch for example, all you see is his face anway, so all you need is a new face model that fits into his chainmal coif.

Perfect job for facegen. Any of you guys can do it. Well, it would be better if you had some modeling skill so you could furthur alter the facegen face in lightwave to give it more charcater, and alter the shitty facegen texture in photoshop, agin, to give it more character.

Civillisation will not attain perfection until the last stone, from the last church, falls on the last priest.

- Emil Zola

 

character models site

Link to comment
Share on other sites

We're going to want to swap more than the face though. We want to be able to swap entire heads, helmet and all.

 

We animate with a placeholder head, and then delete it after exporting, leaving the neck bone behind which retains all of the movement information, and a head can be attatched to this in the game.

 

Ok, so will the existing neck bones be able to be used for this?

 

It's starting to sound like this won't be super difficult, so perhaps this should also be done now.

Link to comment
Share on other sites

Ok, seems like the consensus is that this is relatively straightforward, and should be done soon. Anyone want to volunteer?

Link to comment
Share on other sites

  • 2 weeks later...

This is also known as "interchangeable heads"

 

I have three or four generic headless bodies that can use one of the many heads in the Duck Nukem mod. The body textures are changed with Skin files, the heads are changed with a monster_whateverHead def file, and a neck joint to match between the body rig and the head. In my case, I use the neckcontrol joint. I even managed to use this with lip-sync heads now, which is very cool. Some of the monsters can even have their head punched off and kicked around.

http://www.doom3world.org/phpbb2/viewtopic...swapping#143569

 

What I get from this is that a head is just another AF attatchment :)

 

(The head being punched off is done with setting the head to nodraw, and spawning a head, though I doubt we need that.)

Link to comment
Share on other sites

Yes, that much I already knew. The neck joint controls the head turning (and is also used to attach things that follow the head, like glasses and helmets).

 

What I was wondering was how you get the head to play particular animations, but it looks like that's controlled in the def file for the head:

 

model head_sarge {

mesh models/md5/heads/sarge/sarge.md5mesh

channel eyelids ( Ruplid Rlolid Luplid Llolid )

 

anim stand models/md5/heads/sarge/sargeidle.md5anim

anim idle models/md5/heads/sarge/sargeidle.md5anim

anim blink models/md5/heads/sarge/sargeblink.md5anim

 

}

 

So the neck joint on the body would control things like looking down at his belt, or doing a double-take, etc. The facial animations are independent, but can be set to do specific things during specific AI 'states'. I saw animations for 'dead' (which would be great for us, so the AI wouldn't have their eyes open after being KOd) for 'sight', etc.

 

Really, it all seems a lot more straightforward than I thought.

Link to comment
Share on other sites

On further consideration, it seems like the actual cutting the heads off the model will be the trickiest part. It will need to be done at pretty much the same relative position on all the existing models (otherwise certain heads will make the necks too tall/short).

 

Many of the models are wearing chain-mail coifs and hoods, which complicates things a bit. I don't know if they're rigged separately or not.

 

My suggestion is that we try to cut right at the base of the neck, where the neck joint is. With models like the builder guard, this area will be hidden by his armour. It should also look the most natural if you want to attach a model with no chainmail on their head.

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

    • 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 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...