1st person weapon rendering
by Andrew Edmonds · in Torque Game Engine Advanced · 03/17/2008 (2:40 am) · 1 replies
Hi all,
Is there a way to render the player's weapon (or any mounted object for that matter) in 1st person view the same way it is rendered in 3rd person? I'm trying to get away from having the weapon 'mounted to the camera' to give a slightly more realistic view.
Also, the player model (currently AdamPack using TorqueMotion) has the weapon down to his side at rest, but in first person view it is always shown on screen. It also gives us some odd shadows:
In 3rd person view, you can see the shadow of the weapon in the player's hand:

However, in 1st person view, the weapon shadow is shown floating next to the player shadow (this one is a little hard to see but hopefully you get the idea):

Any thoughts? Thanks as always...
Is there a way to render the player's weapon (or any mounted object for that matter) in 1st person view the same way it is rendered in 3rd person? I'm trying to get away from having the weapon 'mounted to the camera' to give a slightly more realistic view.
Also, the player model (currently AdamPack using TorqueMotion) has the weapon down to his side at rest, but in first person view it is always shown on screen. It also gives us some odd shadows:
In 3rd person view, you can see the shadow of the weapon in the player's hand:

However, in 1st person view, the weapon shadow is shown floating next to the player shadow (this one is a little hard to see but hopefully you get the idea):

Any thoughts? Thanks as always...
About the author
Formed in 2005, EiKON Games is an indie games development project based in the UK working on the tactical first person shooter "Epoch: Incursion". See the Join Us or Contact Us pages at http://www.eikon-games.com/
Torque Owner Chris Byars
Ion Productions
Here's ours: www.ion-productions.com/renders/render7.jpg
www.ion-productions.com/screens/screen2.jpg
Anyways. The reason this happens is that in 1st person view, the weapon is just an "image", not the actual weapon item. It is positioned on screen depending on the X Y Z values in the eyeOffSet datablock in the weapon's *.cs file. There are multiple ways to make 1st person weapon view be more realistic. The complex way I am doing it is to have two separate models made within one model file based on LOD. When in 3rd person, just the weapon renders, and when in first person, the weapon and a pair of hands/arms render and animate for reload/activate/fire/etc. Then in 3rd person animations are linked to the first person activities so it is a lower quality animation sequence/weapon model that looks as good enough as you want it.
You can also eliminate the eyeOffSet line of code in your weapon's *.cs file and then it will render in first person view at his side. Ensure you have renderFirstPerson or the like enabled. This method requires your player model's weapon holding positions and animations to be PERFECT. 90% of the time as it is, the player will be looking one way, while the weapon is either off screen, looks dumb, or is pointed in the wrong direction than the crosshair is aiming or the projectiles are going.
I have a resource up that allows you do to the hacky 1st/3rd person weapon model differences, which, if you're somewhat of a modeller, you can make look really damn good.