Torque 3D 1.2 - Disembodied Arms
by Derek Bronson · 09/09/2011 (4:18 pm) · 28 comments

Another week, another Torque 3D 1.2 blog! Last week I showed off some of the objects we have created in Torque 3D 1.2 in my Turrets, Proximity Mines and Teleporters Oh My! blog. If you haven’t read it I would suggest you check it out, I’m proud of what our developers and artists were able to achieve. This week I’ll be showing off one of the larger features that we have worked on for Torque 3D 1.2, a split between first person and 3rd person.
To give you some history on this, several years ago Matt Fairfax and I talked about how difficult it is to get models and animations to look good in first person and third person and how other games and engines have solved that problem. At the time we talked about creating a separation between first person and third person but had to table the discussion. I’m happy to say that thanks to Dave Wyand we’ve finally been able to add that feature to Torque 3D.
Now when you switch into first person we can swap out the weapon model with something optimized for that view. This usually means higher polys and different materials to highlight things on the weapon that would too difficult to see from a distance. We didn’t stop there.
We also decided that we didn’t want to bake the arms into this new first person weapon model. This would have made it difficult to create character variants as we would have had to have very generic arms and hands to ship different first person weapons for each character that could hold it. Instead we added arm bones and animations to the first person weapons, then created a separate first person arm model and gave it the same rig.
Using Dave’s coding magic, when an animation kicks off on the weapon it drives the rig of the first person arm model allowing us to have control over the look and feel of each weapon state and still able to do character variants without adding a ton of additional files and work.
We decided to take things even further and get the third person stuff involved as well. We’ve made some changes so it’s now pretty easy to setup different third person animations for the various weapon holds that we have. Meaning the soldier now has a pistol run, mine run, rifle run etc.
To get everything playing nicely we made it so whatever state the weapon is in controlled the state player was in. So when the player goes to reload in 1st person he reloads in 3rd person as well.
[--- Dave's Tech Talk Corner ---]
Quote:
To make this work the PlayerData and ShapeBaseImageData datablocks have been expanded to include new references to first person shapes. And each now has a pair of animation prefixes used for cross referencing the other when in a 1st or 3rd person view.
For example, you may have a couple of different rifles that use the same 3rd person animation sequences. You give both weapon datablocks an imageAnimPrefix of “rifle”. Now when it comes time to choose the correct sequence for the 3rd person view -- perhaps a fire sequence -- Torque looks for the “rifle_fire” sequence. If that is not found, then the standard “fire” sequence is used instead.
Now in 1st person you want each rifle to operate differently. So you give the first rifle an imageAnimPrefixFP (for first person) of “fancypants” and the second rifle an imageAnimPrefixFP of “superduper”. When the player fires the weapon in 1st person either “fancypants_fire” or “superduper_fire” is used, depending on the rifle. And if either sequence is not found then Torque will use the “fire” fallback sequence.
All of this is data driven and based on what the player is currently holding. And certainly isn’t limited to just weapons. A fairly decent fishing sim could be done with this. :)
[--- Dave's Tech Talk Corner ---]
For all of you that have existing Torque 3D projects, have no fear. We were very careful to make sure that all these new player features played nicely with the current character stuff. That way when/if you decide to take advantage of it you can, otherwise you can ignore it without any effect to your current project or art pipeline.
I’m really excited for this feature set as it allowed our artists to really focus on making things look and feel good. Any feature that allows artists to just be artists is good in my book! This is a special To Be Continued feature so stay tuned for next week when I discuss some of the other improvements we’ve made to the weapon and character.
Torque 3D 1.2 Development Blogs:
- Introduction
- Chinatown
- Turrets, Proximity Mines and Teleporters oh my!
- Disembodied Arms
- Disembodied Arms Continued - Coming Soon!
#3
Big Thanks Guys.
09/09/2011 (5:31 pm)
That is what I have been needing and was trying to make without much luck. :(Big Thanks Guys.
#4
09/09/2011 (5:39 pm)
Aaarg... so tempting... might just see if it's worth abandoning my 'real animations' crusade :P.
#5
Now, get those 'Art' tutorials started on how to set all this up in our modeling programs...;).
09/09/2011 (6:25 pm)
A reasonable approach...so, I'm taking it that the FSM machine will allow for the 'disembodied arms' to do more than 'recoil'....which again, is a very reasonable approach artistically....Now, get those 'Art' tutorials started on how to set all this up in our modeling programs...;).
#6
Can't agree with you more on the docs. Both in terms of covering how to setup a character in general and covering the newer features we have developed.
09/09/2011 (6:32 pm)
Yep, I'll post a video on Monday showing some of the animations that we have done but right now we have both the gun and camera moving as part of the Fire state.Can't agree with you more on the docs. Both in terms of covering how to setup a character in general and covering the newer features we have developed.
#8
To put it into perspective: If you want to make Left 4 Dead, this is similar to the system Valve uses. That's epic win there.
09/09/2011 (11:46 pm)
I have been waiting to see this feature since my first year at GG. I remember those conversations with Matt and Derek, always hoping it would happen. This is, by far, my favorite feature for T3D 1.2.To put it into perspective: If you want to make Left 4 Dead, this is similar to the system Valve uses. That's epic win there.
#9
Thanks!
09/10/2011 (12:43 am)
A great feature to be added I think we've all wanted to see this happen!Thanks!
#10
09/10/2011 (1:08 am)
yes! at last.. looking forward to this. great work guys
#11
09/10/2011 (7:16 am)
SWEET!!!!
#12
09/10/2011 (7:36 am)
Boo frickin' ya! I'm super stocked about this feature. This is required for my game so this will be awesome.
#13
09/11/2011 (1:43 am)
Excuse my ignorance, but how is this different from adding a large LOD to the model?
#14
Guimo,
It means better detail on the weapon for one since in first person you'll have the ability to use a different weapon model with more polys and more texture.
-this you could do with a large lod, but you'd be stuck doing the entire model normaly (whole character and weapon both) but this way you only use the better arms/weapons when in first person, thus the character's polys won't limit the amount of polys used for the weapon/arms.
Also the 1st/3rd person animations will correspond so we won't get the issuse of, I'm reloading (in 1st person) but no one else can tell that I am in 3rd.
And as he said 3rd person will can reflect different animations used in 1st.
Basically it's like a direct route from 1st to 3rd movement wise with no back clutter with the added bonus of better weapon/arm detail in first with out racking up the polys when you're in 3rd person.
09/11/2011 (4:32 am)
Anyone correct me if I'm wrong, but I believe...Guimo,
It means better detail on the weapon for one since in first person you'll have the ability to use a different weapon model with more polys and more texture.
-this you could do with a large lod, but you'd be stuck doing the entire model normaly (whole character and weapon both) but this way you only use the better arms/weapons when in first person, thus the character's polys won't limit the amount of polys used for the weapon/arms.
Also the 1st/3rd person animations will correspond so we won't get the issuse of, I'm reloading (in 1st person) but no one else can tell that I am in 3rd.
And as he said 3rd person will can reflect different animations used in 1st.
Basically it's like a direct route from 1st to 3rd movement wise with no back clutter with the added bonus of better weapon/arm detail in first with out racking up the polys when you're in 3rd person.
#15
This is a huge functionality 'art' boost[control of player object], not just an optimization for rendering[lod].
09/11/2011 (5:42 am)
...that's what I'm picking up, Sidikian.This is a huge functionality 'art' boost[control of player object], not just an optimization for rendering[lod].
#16
09/11/2011 (10:11 am)
How does this work if you already show the player model in 1st person view?
#17
I'm assuming you mean you see the arms and feet of your model already without this. Well the current player model more than likely is hidden, kind of like fake vehicle cockpit views and how they work.
Idk if you've ever noticed but on some games there's like zero detail in the cockpit if you look at it in 3rd person standing outside the vehicle, but once you get in it and it switches to a 1st person cockpit view you see all the dials and gauges etc.. Well same concept. It's a totally different mesh, meant to look like the one everyone else sees from the outside. Think of it in terms of a heads up display b/c that's kind of what it is.
The arms you'll see with this new view won't be the same one's attached to the 3rd person model, they'll be higher rez. versions, while the 3rd person model is hidden.
So basically you'll have your full body 3rd person model, and then just your arms model in first, and same will go for the weapon (2 totally different models one for 3rd and one for first).
09/11/2011 (7:24 pm)
Again correct me if I'm wrong, but...I'm assuming you mean you see the arms and feet of your model already without this. Well the current player model more than likely is hidden, kind of like fake vehicle cockpit views and how they work.
Idk if you've ever noticed but on some games there's like zero detail in the cockpit if you look at it in 3rd person standing outside the vehicle, but once you get in it and it switches to a 1st person cockpit view you see all the dials and gauges etc.. Well same concept. It's a totally different mesh, meant to look like the one everyone else sees from the outside. Think of it in terms of a heads up display b/c that's kind of what it is.
The arms you'll see with this new view won't be the same one's attached to the 3rd person model, they'll be higher rez. versions, while the 3rd person model is hidden.
So basically you'll have your full body 3rd person model, and then just your arms model in first, and same will go for the weapon (2 totally different models one for 3rd and one for first).
#18
One thing that really frustrates me in almost all FPS's is looking down and seeing nothing at all, I'm not just a floating camera...!
09/12/2011 (1:41 am)
I'm talking about if I have 'renderFirstPerson = true' in the PlayerData datablock.One thing that really frustrates me in almost all FPS's is looking down and seeing nothing at all, I'm not just a floating camera...!
#19
09/12/2011 (6:49 am)
Just what the doctor ordered, I'll be nice to finally be able to do animations without the first person looking horrible w/ incredibly bad aiming (referring to the marine in T3D 1.1).
#20
The trade off using this system is that you don't render the full player in 1st person. It is like the previous (and still in 1.2) eyeOffset method, except you get more than just the end of your gun glued to the bottom of your screen.
Having a full body that animates correctly in 1st person is a tricky proposition. I don't know if there are many coding tricks we can do to help there. It seems more like an art issue to make everything line up while you move the camera. However, as you would be using the 3rd person model while viewing through its eyes for 1st person, I believe that the ShapeBaseImageData animation changes would carry over so you can have different grips, gaits, etc. for different weapons.
@Glenn:
We have spot-on 1st person aiming with this method. And I believe Chris has 3rd person aiming wrapped up as of this past weekend.
- Dave
09/12/2011 (8:19 am)
@Andy:The trade off using this system is that you don't render the full player in 1st person. It is like the previous (and still in 1.2) eyeOffset method, except you get more than just the end of your gun glued to the bottom of your screen.
Having a full body that animates correctly in 1st person is a tricky proposition. I don't know if there are many coding tricks we can do to help there. It seems more like an art issue to make everything line up while you move the camera. However, as you would be using the 3rd person model while viewing through its eyes for 1st person, I believe that the ShapeBaseImageData animation changes would carry over so you can have different grips, gaits, etc. for different weapons.
@Glenn:
We have spot-on 1st person aiming with this method. And I believe Chris has 3rd person aiming wrapped up as of this past weekend.
- Dave

Torque 3D Owner Tuomas Kaukoranta