0
votes
0answers
47 views

How to I coordinate a camera with the eyes of a model?

I am currently working on an FPS in XNA and I wanted to know how I would position the camera at the eyes of the model and whenever the model rotated or moved it's head (where the eyes are), the camera ...
1
vote
1answer
133 views

Tile textures on 3D models. HLSL shader code maybe?

I'm making a game in C# with XNA. I'm now applying textures to models. However if I change the scale of the model, the texture stretches with it. How can I make the texture tile over the model instead ...
0
votes
1answer
52 views

Applying textures to 3D models

I want to apply textures to a 3D Model in XNA 4. Whatever I saw on the internet was to apply the textures in the modeling tool and then load the model (*.fbx) into XNA. Is it possible to load the ...
1
vote
0answers
60 views

Texture visualization problem on camera movement (xna)

I'm trying to move a camera over a model that is used as the floor of the game. When I move the camera, the texture of the model is not showing correctly (video of the problem: ...
1
vote
0answers
106 views

Using obj file in an XNA game [closed]

Sorry if this is a bit novice but I am far more into engineering than game development but I just want to make a small 3D game for fun with XNA (well actually MonoGame). The thing is that I don't have ...
0
votes
2answers
141 views

Creating a collision shape for a complex model

I'm currently creating the collision system for my 3D XNA game. To check collisions with models (especially complex ones) like trees or other plants, I thought about rendering a low poly version of ...
2
votes
1answer
190 views

XNA mesh.Draw() takes the longest CPU time

We have a problem. Our game steadily slows down as we increase the number of models we draw. When the number reaches 100 - FPS is dead. Our humble tests showed that the reason is not GPU. This is what ...
2
votes
2answers
89 views

Finding a specific point in a graphic model in code

I'm not really sure what I'm asking, so sorry for the bad title. I'm still new to game programming and especially the "game specific parts" like models and graphics. Let's say I have a model of a ...
0
votes
0answers
82 views

XNA - Draw FPS Hands? [duplicate]

I'm creating a FPS game in XNA 4. I'm trying to display two hands and a gun in front of the camera. I already the models Hands: How can I do so the fingers and hands position adapts to the gun ...
-1
votes
1answer
74 views

Creating and drawing models efficiently

As I am learning the basics of game programming (in xna), I want to start creating simple 3d models and draw them (I'm already able to draw, control and animate them). I want to create the following: ...
2
votes
1answer
158 views

xna model scaling - model is bigger than world

I'm having trouble scaling my model in XNA with C#. The model is bigger than the world itself and I can't seem to scale it down. Below is the code I'm using and an attached screenshot. How can I scale ...
0
votes
1answer
182 views

XNA ModelMesh.Draw vs GraphicsDevice.DrawIndexedPrimitives

I am using XNA 4.0 and I wonder if drawing models with multiple meshes is better by filling the vertex and index buffers first and calling GraphicsDevice.DrawIndexedPrimitives() or by simply using ...
0
votes
1answer
329 views

XNA & HLSL - rendering a model with its original materials (colors)

I am currently trying to code my own HLSL effect file, in order to render an FBX model I made with Autodesk maya, and to which I have applied some materials (colors). before trying to write an effect ...
0
votes
4answers
224 views

How can I render a model on top of another model regardless of their relative Z positions?

I was wondering if there's any way to render models over other 3D models regardless of their relative positions? Kind of like how it works in 2D graphics, you set a render order and it renders them ...
0
votes
0answers
62 views

XNA HLSL no model textures

I am using XNA and HLSL to render all the models in my game, so far there is only one, a flashlight. My flashlight model is a .fbx file type, and it loads the model in the game perfectly fine. ...
3
votes
1answer
341 views

XNA 4.0 - Why does using a RenderTarget2d cause transparency on models?

I have been working through Riemers ShadowMap tutorial and everything was going well until the section on drawing to a separate rendertarget. I am using a different model and quads but I assumed the ...
0
votes
1answer
104 views

Texture not carrying over to game correctly?

I have created my map for my game using 3DS Max. I have then applied textures to the map within 3DS Max, where the textures all show correctly. I export the map as a .fbx file to use within an XNA ...
0
votes
1answer
137 views

Changing textures on a Model messes up antialiasing? (XNA)

Here is a code sample: blockModel = game.Content.Load<Model>("Models/Cubes/Cube"); //this is a .fbx file, made in blender absoluteBlockTransforms = new ...
-2
votes
1answer
643 views

How to draw millions of cubes without idle , model instancing in XNA?

I work for a project in the style of game "Minecraft". I started using the "Model Instancing" in order to generate a large number of cubes possessing an identical model. So far so good. My problem is ...
2
votes
1answer
266 views

Sketchup model renders wrong in XNA

My XNA model renders wrong. It should render like that: But it renders like that: The background doesn't matter. It's just the model that renders wrong. Here is the drawing code: protected ...
3
votes
1answer
466 views

How rotate a 3D cube at its center XNA?

I try to rotate a 3D cube on itself from its center, not the edge. Here is my code used. public rotatemyCube() { ... Matrix newTransform = Matrix.CreateScale(scale) * ...
2
votes
1answer
148 views

XNA partially extending the content pipeline using a ModelContent

I am trying to extend XNA's content pipeline in order to import a model in .obj format (a very simple and text-based format, see here for details). Writing a full extension library seems like an ...
1
vote
0answers
145 views

BasicEffect and SkinnedEffect treating WorldViewProj differently? [closed]

I made a ModelBatch class that batches and draw rigged/unanimated and skinned/animated models. For now, BasicEffect is assigned to rigged models (XNA Model Processor) and SkinnedEffect is assigned to ...
1
vote
0answers
236 views

How can I efficiently form terrain from a large number of cubes in XNA? [duplicate]

I have a project with a floor built from with small cubes (100x100 of them). If I exceed that size, the performance of my game suffers. How can I efficiently draw a larger number of identical models? ...
1
vote
0answers
189 views

3D Animations in XNA 3.1

Well, guys. I'm in a Game Design class at school. Before you ask "WHY ARE YOU USING 3.1 INSTEAD OF 4" -- I would like to point out that C# 2008, and .NET framework 3 is NOT my preferred environment, ...
0
votes
0answers
129 views

Creating Primitives and Model from Texture2D Xna 4.0

So I was playing around with XNA working on a 3d engine with 2d sprites as characters and objects. After a while I became very unhappy with the way the sprites were being scaled and billboarded so I ...
0
votes
1answer
170 views

How to calculate the position of an attached model after rotation?

I'm programming a basic game on XNA. I started to place an object (eg weapon) attached to the right arm of my player. When I move my character forward behind left or right all right. But when I ...
4
votes
1answer
275 views

How do I get a Model to add a name to it's Texture(s) in the XNA Content Pipeline

I know that a texture's name is not preserved when it's loaded in. I also know that you can give it a name. For example: Texture2D texture = content.Load<Texture2D>("MyTexture"); texture.Name ...
4
votes
1answer
240 views

How attach a model with another model on a specific bone?

I meet a difficulty attached to a model to another model on a "bone" accurate. I searched several forums but no result. I saw that many people have asked the same question but no real result see no ...
0
votes
1answer
129 views

How stoper one annimation model on XNA?

I do not understand how to pause an animation of XNA. I can "Start" the animation of my model but not stop it. I use SkinningSample_4_0 sample dll Here is my code to use. Here is my code to use. ...
2
votes
1answer
88 views

XNA 4.0 Model into parts

is there a way to split a .fbx model into parts, and move those parts individualy in XNA 4.0 ? Thanks
0
votes
1answer
314 views

Apply bone tranforms when importing FBX in XNA

Preconditions: I have some models, that does only contain some meshes and one texture. There is no animation within the model. An example: a model of a table. I want to draw the Model with a custom ...
6
votes
1answer
555 views

How can I attach a model to the bone of another model?

I am trying to attach one animated model to one of the bones of another animated model in an XNA game. I've found a few questions/forum posts/articles online which explain how to attach a weapon ...
1
vote
1answer
163 views

How can I efficiently render a very large model?

I have a huge model I want to draw in my XNA application; due to its size I am experiencing a tremendous loss of performance. The model has about 50,000,000 edges and has a size on disk of 205 MB in ...
0
votes
0answers
145 views

Keep 3d model facing the camera at all angles [duplicate]

I'm trying to keep a 3d plane facing the camera at all angles but while i have some success with this: Vector3 gunToCam = cam.cameraPosition - getWorld.Translation; Vector3 beamRight = ...
1
vote
1answer
115 views

Consistency of DirectX models

Is there a way to check the consistency of a DirectX model (.x) ? Whilst compiling .x files with XNA GameStudio 3.1 compilation is aborted with the following error message: Error 2 Could not read ...
1
vote
0answers
130 views

Light on every model and not in the whole scene

I am using a custom shader and try to pass the effect on my Models like that: foreach (ModelMesh mesh in Model.Meshes) { foreach (ModelMeshPart part in mesh.MeshParts) { ...
6
votes
1answer
274 views

Text on a model

I am trying to put some text on a Model and I want it to be dynamic. Did some research and came up with drawing the text on the texture and then set it on the model. I use something like this: public ...
1
vote
2answers
134 views

Issue with importing model to xna

I am creating a model with Blender which looks like this: and I am importing it into an XNA project. There seems to be some kind of transparency issue. The model looks like that: When the camera ...
0
votes
1answer
209 views

How to draw textures on a model

The following code is a complete XNA 3.1 program almost unaltered to that code skeleton Visual Studio is creating when creating a new project. The only things I have changed are imported a .x model ...
0
votes
1answer
499 views

Why does my 3D model not translate the way I expect? [closed]

In my first image, my model displays correctly: But when I move the model's position along the Z-axis (forward) I get this, yet the Y-axis doesnt change. An if I keep going, the model disappears ...
2
votes
1answer
270 views

Texturing voxel faces separately

I am creating a 3D level editor which should be used to generate the very basic layout (level geometry) and a few basic game-logic entities of maps used in my game. So far, I decided to use voxels (i ...
0
votes
1answer
165 views

Can someone explain this occurrence with a fbx model in xna?

Because this is kind of weird to explain, let's show you what I mean. This is in my game. When I import this base ship model, it should be at (1000,1000,1000), but the model acts like it's at ...
1
vote
0answers
391 views

XNA HLSL: Skinned Model Deforming Wrong

I am creating a basic XNA recreation of Minecraft. My current problem is that my "Steve" model, which is skinned with an armature using vertex groups to deform, is showing up disfigured beyond all ...
1
vote
2answers
1k views

How to convert Blender models for XNA

I am creating my first game, I'm using Blender to create character models, is there any tutorial or guide to tell me what steps to convert a model into something animated and usable in XNA?
3
votes
1answer
319 views

Retrieving model position after applying modeltransforms in XNA

For this method that the goingBeyond XNA tutorial provides, it would be really convenient if I could retrieve the new position of the model after I apply all the transforms to the mesh. I have edited ...
4
votes
1answer
2k views

Moving a rotated model in XNA

This seems like a simple problem with an equally simple solution that is invisible to me. I have a model that spawns at the origin and looks at my player model wherever it goes. I would like it to ...
1
vote
4answers
2k views

Rotating a model AND translating it forward in XNA

I have this enemy class, and I want it to 1) Spawn at a certain place Vector3 pos 2) Rotate to face my player position 3) Move forward As this code is now, it will appear at it's specified place: ...
5
votes
1answer
382 views

How do I create weapon attachments?

My question is; I am developing a game for XNA and I am trying to create a weapon attachment for my player model. My player model loads the .md3 format and reads tags for attachment points. I am able ...
1
vote
1answer
201 views

Converting a DrawModel() using BasicEffect to one using Effect

Take this DrawModel() provided by MSDN: private void DrawModel(Model m) { Matrix[] transforms = new Matrix[m.Bones.Count]; float aspectRatio = graphics.GraphicsDevice.Viewport.Width / ...