• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
vinnyhalts

Logistics of first person arms and third person shadow

7 posts in this topic

Hi, I have a few questions about first person setups in general. I understand the basics:

  1. Draw the first person view in front of the camera
  2. Disable casting a shadow (so you don't see a shadow of some floating arms).
  3. Play the animations based on what you are doing, etc.

There are a few things I don't understand. In games like Battlefield and Halo 2/3 you can see your legs. Do I just create the legs below the view of my camera, similar to the arms, and go from there?

 

Also, when playing games that have shadows, aside from Battlefield 3 (on Xbox), you can see your entire player's shadow. How do they do this? Do they not draw the model, but draw the shadow?

 

If anyone has some advice, I will be glad to listen to it. My mindset might be thinking about this in all the wrong ways. Thanks!

0

Share this post


Link to post
Share on other sites

Hi, I have a few questions about first person setups in general. I understand the basics:


1. Draw the first person view in front of the camera
2. Disable casting a shadow (so you don't see a shadow of some floating arms).
3. Play the animations based on what you are doing, etc.

 

Obviously you are already a bit sidetracked on the basics. There is no such thing as "disable rendering shadows" for any given graphics configuration. There isn't even such a thing as "render shadows". Shadowmapping is a seperate render step. Basically, you render the whole scene from the lights point of view, and you simply ignore any objects that should not cast a shadow. Then, in the lighting pass, you take that renderer shadow-map into account whether an object should be lit or not.

 

This should already answer most of your questions. Scene and shadow rendering are independant passes, so you can easily have a model that is rendered but does not cast a show and vice versa.

0

Share this post


Link to post
Share on other sites

 

Hi, I have a few questions about first person setups in general. I understand the basics:


1. Draw the first person view in front of the camera
2. Disable casting a shadow (so you don't see a shadow of some floating arms).
3. Play the animations based on what you are doing, etc.

 

Obviously you are already a bit sidetracked on the basics. There is no such thing as "disable rendering shadows" for any given graphics configuration. There isn't even such a thing as "render shadows". Shadowmapping is a seperate render step. Basically, you render the whole scene from the lights point of view, and you simply ignore any objects that should not cast a shadow. Then, in the lighting pass, you take that renderer shadow-map into account whether an object should be lit or not.

 

This should already answer most of your questions. Scene and shadow rendering are independant passes, so you can easily have a model that is rendered but does not cast a show and vice versa.

 

Hey, thanks for replying. I get that shadowmapping is a separate step. I can already selectively disable shadows for any entity.

pjbOYjA.jpg6TxBNTk.jpg

 

I'm more or less asking about the logic of what the best setup would be. I understand that if I make arms and legs for the first person view, I need to disable the shadows for it. I want to know what the most common techniques are for these types of things.

 

Do I draw just the shadows for the entire model, along the graphics for my first person legs and arms? It seems very wasteful to me, since my game will be running on low end hardware.

 

Thanks again for replying to me.

0

Share this post


Link to post
Share on other sites

Often in FPS games, the arms aren't even really in the world. By this I mean, that the entire world is rendered using some particular camera, then the arms/gun are drawn using a completely different camera and depth-buffer, so that they never intersect with the world and so the artists can use FOV-hacks to make them "look right".

 

Yep, you obviously don't want to include just a pair of arms in your shadow pass, or it will look very strange when the player looks down! Same goes for a model that only includes legs.

 

The game will have logic for drawing a player in the 3rd person vs 1st person -- i.e. the way the game draws another player may be different to the way it draws yourself (arm + leg specialized model for yourself, whole body for others).

When drawing from the light's point of view, none of the players would use the specialized 1st person mode; every player is drawn as a 3rd person player.

 

In other games, there isn't much of a specialized 1st person mode, and when in first person, all they do is disable rendering of the head and place the camera there -- the arms/legs/body is the same as it would draw for a 3rd person view.

1

Share this post


Link to post
Share on other sites

Often in FPS games, the arms aren't even really in the world. By this I mean, that the entire world is rendered using some particular camera, then the arms/gun are drawn using a completely different camera and depth-buffer, so that they never intersect with the world and so the artists can use FOV-hacks to make them "look right".

 

Yep, you obviously don't want to include just a pair of arms in your shadow pass, or it will look very strange when the player looks down! Same goes for a model that only includes legs.

 

The game will have logic for drawing a player in the 3rd person vs 1st person -- i.e. the way the game draws another player may be different to the way it draws yourself (arm + leg specialized model for yourself, whole body for others).

When drawing from the light's point of view, none of the players would use the specialized 1st person mode; every player is drawn as a 3rd person player.

 

In other games, there isn't much of a specialized 1st person mode, and when in first person, all they do is disable rendering of the head and place the camera there -- the arms/legs/body is the same as it would draw for a 3rd person view.

Thanks, I'm going to give this a test after I get back from work. I assume that with some games, where the hands and weapons change when you are near a bright light, are using a separate camera with the player's POV, just rendered to a texture?

 

So for example, if my game has a long hallway in it, where you walk under many hanging lights. Each time I walk between two lights, my first person hands get darker, and the reverse whenever I walk under a light. So I just have a second camera follow the player (with the same world and view matrix) and render the first person view to a texture, then draw the texture to the screen?

 

That makes sense in my head, hopefully it will for you too.

Edited by vinnyhalts
0

Share this post


Link to post
Share on other sites

You should not need to render the first person arms to a texture, instead render them to the backbuffer after the world rendering. If you're using different fov / nearclip / farclip settings for the first person arms camera, you can clear depth beforehand to avoid problems with the world objects interfering with the arms rendering. The first person arms model just needs to be roughly at the correct point in the world so it will get the world lights applied to it properly.

0

Share this post


Link to post
Share on other sites

Worth mentioning, since you brought it up: Halo 2 and later skip all this crap by using the in-world player model for first-person weapon views. It's actually a lot harder than it sounds.

0

Share this post


Link to post
Share on other sites

Worth mentioning, since you brought it up: Halo 2 and later skip all this crap by using the in-world player model for first-person weapon views. It's actually a lot harder than it sounds.

Are you sure, I remember the shadows being slightly off for first and third person models. An example is in Halo 3: When you reload a gun, there is a very slight delay of about half a second after your first person view has finished reloading, where you cannot shoot. During this time, you can see your shadow finishing up the third person reloading animations. Theater mode is very handy for small things like that.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0