Jump to content
  • Advertisement

vinnyhalts

Member
  • Content Count

    18
  • Joined

  • Last visited

Community Reputation

192 Neutral

About vinnyhalts

  • Rank
    Member
  1. That sounds like a good idea, thank you.
  2. Hi, I have a pre-pass lighting setup but I was wondering if it can play nicely with baked parts? I want to have shadows, direct lighting, ambient occlusion, radiosity, etc all baked and then use spot/point lights for needed dynamic lighting. Things like a small overhead lights attached to the ceiling from a cable that will swing around when shot/moved.   Any input is valued, thanks.
  3. 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.
  4. 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.
  5.   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.   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.
  6. Hi, I have a few questions about first person setups in general. I understand the basics: Draw the first person view in front of the camera Disable casting a shadow (so you don't see a shadow of some floating arms). 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!
  7. vinnyhalts

    Skinned Animation problem

    Thats for you maybe, for me it works fine.   I assume that model is centered at origin and "pointing" in positive Z axis. Camera view matrix must be updated before you extract view matrix and use it for gun/hand final matrix. Yeah, I see what you mean. It'll be easier to just draw the model in front of the camera.           One: You normally make a model of just the hands and the gun, then draw it in front of the screen or on a render target.   Two: You want the same model to hold and use multiple weapons? It'll probably be easier to just model the hands onto the guns, and animate it from there. So you will have to use some modeling software. Blender is free, if you don't have anything to use.   I use two models, one is the third person model; I only use it in multiplayer or for shadows. The second is the first person view. Which is just the arms and weapons.   Here is a debug photo to help you visualize how the model looks and how to draw it. Yeah , I got it , but for  enemy models ? I can't do the same for them , so I can't just draw their hands ( Right vinn ?) . I see  you just make a trick by drawing the Model hands ! and used person model to simulate shadows , but you don't draw the person model . Instead , you used him to draw shadow  ? ( Right Vinn ?) Q : OK but what about the ragDoll to simulate model when dies ? Q2 : Second , Vinn in your post  "http://www.gamedev.net/topic/639931-rendertargets-and-transparency/  " why did you use render target ? why just not draw the model with it's transformation matrices to rotate the hands ? is that hard implementation or what ?   Q3 : Can you Vinn summarize the process of rotating Model hand and the gun ?( as I am now a little bit confusing as I did not even think to draw just model hands , I am using skinned model sample from Microsoft  and I do every thing for the model (sit , run , stop ...etc) and all I need is to rotate his hands and gun while his body just follow the camera by changing it's translation matrices )     Most of the time the ragdoll is tied in with the physics. BEPUPhysics is excellent and free. Take a look at their action figure and one armed man demos. They should solve your ragdoll problems.   As for the render target, I was going to use different rendering styles for the environment and weapons.   To move the hands, you would simply play the animation you want to use. So for example, when you press W to go forward (on the PC), you set the current playing animation to your walking animation. When you are idle, play the idle animation. It's less than ideal to draw an entire player's model, then put the camera behind the arms. The 3rd person model and the arms should be two different models.   So just to summarize: 1. Draw the arms on screen, in front of the camera. 2. Set the current animation based on player movement. 3. Play the animation.   Here is a pretty decent animation library: http://animationcomponents.codeplex.com/
  8. vinnyhalts

    Skinned Animation problem

    Thats for you maybe, for me it works fine.   I assume that model is centered at origin and "pointing" in positive Z axis. Camera view matrix must be updated before you extract view matrix and use it for gun/hand final matrix. Yeah, I see what you mean. It'll be easier to just draw the model in front of the camera.           One: You normally make a model of just the hands and the gun, then draw it in front of the screen or on a render target.   Two: You want the same model to hold and use multiple weapons? It'll probably be easier to just model the hands onto the guns, and animate it from there. So you will have to use some modeling software. Blender is free, if you don't have anything to use.   I use two models, one is the third person model; I only use it in multiplayer or for shadows. The second is the first person view. Which is just the arms and weapons.   Here is a debug photo to help you visualize how the model looks and how to draw it.
  9. vinnyhalts

    Skinned Animation problem

    This causes the model to behave oddly. The model lags behind where your camera is actually looking and the movement is jagged. Maybe a render target would work? I had a problem with my model's alpha a little while ago; it has since been fixed. The source I posted in this thread (http://www.gamedev.net/topic/639931-rendertargets-and-transparency) covers pretty much everything you need (both the code, and the shader).
  10. vinnyhalts

    Getting associated texture from mesh?

      It does this:    // Copy texture data across from the original material. BasicMaterialContent basicMaterial = (BasicMaterialContent)input; if (basicMaterial.Texture != null) { customMaterial.Textures.Add("Texture", basicMaterial.Texture); customMaterial.OpaqueData.Add("TextureEnabled", true); }     That lets you get the texture to put in a custom effect. What exactly are you trying to accomplish?   It looks like you can also get this in the ModelProcessor in ConvertMaterial. The MaterialContent contains a Textures member.     Cast the Effect objects (on ModelMeshPart or ModelMesh) to BasicEffect. This will succeed assuming you aren't using a custom material. Then get the Texture property.   Thank you, I'll try using one of these in a bit.
  11. vinnyhalts

    Getting associated texture from mesh?

    Thanks, but, this does not extract the texture from the model's data.   How would I grab the texture from BasicEffect at runtime?
  12. vinnyhalts

    Getting associated texture from mesh?

    Right, thank you for replying. I am actually trying to get the texture data from the model, but inside XNA. Similar to how Basiceffect does it.
  13. Hi, I've been trying to wrap my head around this for a few days, and there is a small amount of relevant information about this on the internet.   How does BasicEffect get the texture name stored in a model's data? It seems like it is in the model processor, so I know I would need to write a custom one.   I just need to know: How do I get the texture inside a model? XNA's Basiceffect can draw one texture per mesh (for example, the tank, or dude), but how does it get that texture name?   If anyone knows, it would be very helpful, thanks!
  14. vinnyhalts

    RenderTargets and Transparency

      Yeah, that did it. It seems to be working now. It's a bit jagged, but that's another problem for another time. Thank you very much. I would not have known it was the textures, as I am using public domain models and textures.   Edit: I fixed the Anti aliasing, I just turned up my multisampling. Just in the event anyone should read this and need help: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.rendertarget2d_members.aspx      
  15. vinnyhalts

    RenderTargets and Transparency

    Nothing changed.       Edit, it has to be something in the Render Target. As I disabled it, and just drew the image as I would any other model, and it worked. But this does not solve my problem, as it still jitters when I move in game. I still need to use a Render Target.     Any ideas why?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!