How do you cope with first person hud/weapon?

Just wondering the best practice that comes to your mind when willing to attach a weapon and or hands to your hud?



I tried this a few month ago:

http://www.jmonkeyengine.com/jmeforum/index.php?topic=6872.0



But I can’t handle the answers… using a different render pass? Please enlighten me :slight_smile:

i simply attach my hud and hud weapon to the rootnode and move it together with the camera.

usually first person shooter still has a player character model which holds the gun. such as crysis for example.



the only difference is the camera positioning, instead of using a third person chase camera, just use a first person camera handler.



this way when u do shadowing, collision detection and etc, things actually become easier.

Ok, never played Crysis but I get the idea. So indeed let's assume the "player" model contains/holds the gun that appears on the screen. Still got that zBuffer problem.


Core-Dump said:

Or you could simply reduce the near frustum to a lower value at the price of depth buffer precision.
cam.setFrustumPerspective( 45.0f, (float) display.getWidth() / (float) display.getHeight(), 0.1f, 1000 );


Core-Dump warned me about the loss of precision... still making basic worlds, I can't see a difference in graphics quality. Perhaps it's something else?

For your games, do you reduce the FrustumPerspective as stated above?
The "model" I attempt to use is a head node to which is attached a camera node. The gun is attached to the head node, so I suppose it's about the same as what you described?

neakor said:

(...) just use a first person camera handler.


My question will again reflect poor knowledge/understanding of rendering engines, but when you say a first person camera handler, do you simply mean using a first person view, or also that this type of handler has an impact on the rendering? (it sounds like a "no" to me, but I prefer to make sure)

thanks for your time...

it was more an information than a warning :slight_smile:

if you don't see a difference or notice any problems with a near frustum of 0.1 then go for it.

i don't know when a lower value will become notable or what an ideal setting would be.


neakor said:

(...) just use a first person camera handler.


My question will again reflect poor knowledge/understanding of rendering engines, but when you say a first person camera handler, do you simply mean using a first person view, or also that this type of handler has an impact on the rendering? (it sounds like a "no" to me, but I prefer to make sure)

thanks for your time...


no, i dont think there should be an impact on the rendering.