Tagged Questions
0
votes
1answer
40 views
XNA Texture2D positioning problem
I'm currently stuck on something that just seems extremely odd. I'm creating a game with kinect, and when the player performs an action I want to place a texture onto the screen where their hand is.
...
0
votes
0answers
24 views
Error in Pixel-Pixel-Collision [closed]
I have got this pixel-pixel-collision code, but unfortunately, it gives me an error: Index outside range of the array on if (((t1[i] & 0xff000000) > 0) && (t2[i] == 0xffC3C3C3)) inside ...
1
vote
2answers
83 views
XNA spritebatch.Draw: Which part gets colored by the color parameter?
Which part gets colored and how can I control it?
I have a rounded block and my goal is to have the center filled with a certain color chosen by that parameter. Here's the picture:
...
0
votes
1answer
70 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 ...
2
votes
0answers
79 views
Getting UV maps from UDK?
I have created a map using UDK and I am exporting it as a .fbx for use within an XNA project.
My question is, can I generate a UV map for texturing the map or is there an easier way to texture a map ...
1
vote
2answers
141 views
HLSL Multitexturing with more than 4 textures
I've come up with an idea that should work in multitexturing a terrain with more than 4 textures, up to a 64 if a supported ShaderModel is used.
I'm trying to use the RGBA color values as both values ...
1
vote
1answer
126 views
How to draw different textures on my cubes DrawUserIndexPrimitive with XNA?
I'm having some problem to draw textures with class "DrawUserIndexPrimitive" on Xna.
I can draw my cubes / models without problem. But I want to draw different textures on my cubes.
I loop on each ...
0
votes
0answers
122 views
HLSL Triplanar texturing and multi texturing performance
I'm stuck for my terrain rendering shader code for DX9. I'm looking to implement triplanar texturing, a texture atlas, and blending between different textures. Right now it's working. The problem is ...
0
votes
1answer
145 views
How to make a cube mesh and texture for XNA use?
I have a very specific question which I feel should have a very short answer, but which I can't seem to find despite Googling on and off all day.
I'm trying to start with 3D graphics, and I read up a ...
4
votes
1answer
171 views
Creating rectangles from the inner part of a texture2D
Ok, this may be hard to understand, but I'll do my best.
You will see that the first image is a normal mario, and the other is the result I am looking for. I'm trying to find a way to extract ...
1
vote
2answers
262 views
Mobile game textures sizes
I am developing a Windows Phone 7 game using XNA 4.0 which I plan to later port to iOS and android using Monotouch and Monodroid. My question is how to determine what texture size should I include? ...
1
vote
2answers
104 views
Textures loading too large on smaller monitors
I have an XNA game, and when i run the game the textures load all good on my computer and on my tv and they're all bring drawn in the right position. But on my laptop, which screen is smaller then ...
0
votes
2answers
143 views
Better quality texture when zooming
Is there any way to have better quality textures ?
I thought that creating huge textures will improve their quality in game, that's why I draw textures with 0.25f or 0.5f scale.
I understand that ...
0
votes
3answers
230 views
XNA SpriteBatch.Draw with rotation, scaling and origin?
I use a 1x1 pixel 2d texture as source for SpriteBatch.Draw. The texture is scaled and rotated around an origin. The left image is only scaling. The right one scaling + rotation around the origin at ...
-1
votes
1answer
112 views
How can I solve this animation [duplicate]
At the moment I have a simple static texture. Now I want to animate my sprite. The texture is a simple human. When the user press the enter button, the human gets into state2. This is the standart ...
-1
votes
1answer
125 views
Animation: mid-state
At the moment I have a simple static texture. Now I want to animate my sprite. The texture is a simple human. When the user press the enter button, the human gets into state2. This is the standart ...
-2
votes
3answers
348 views
Why use textures that are Power of Two? [duplicate]
Possible Duplicate:
Why are textures always square powers of two? What if they aren’t?
I am using C# and XNA (also MonoGame for other platforms than Windows) to create a game in 2D. ...
2
votes
2answers
97 views
Create a variety a sprites from a single image in XNA?
I want to be able to take a single image and cut them up into a lot of images to make the sprites. How would I do that in XNA since I only know how to load the texture then use it without changing it?
...
2
votes
1answer
173 views
XNA Textures with background color
I am fairly new to XNA and I have questions in regards to textures.
Most of my of textures have a background color along with the overall image (white, black, or whatever). This is quite ugly as the ...
3
votes
2answers
163 views
How to use images/text/etc. in XNA without Content Pipeline?
I'm currently writing a program in C# with the XNA framework. It is absolutely necessary for the game's images and text assets to be visible by the end user in the form of PNG files, so I can't use ...
1
vote
1answer
183 views
MultiTexturing by neighbouring points textures
Visual example:
I've been trying to understand multitexturing for a while now, I've created a terrain generator but have no need for height just yet and I still want one texture to blend over to ...
3
votes
1answer
106 views
XNA windows phone release black textures
i just made a 3d game in XNA for windows phone 7. I build it in release mode on visual studio 2010 and suddenly when I run game there is no textures on models - 2 models are black and one is ...
4
votes
1answer
130 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 ...
3
votes
4answers
393 views
XNA 2D Spritesheet drawing rendering problem
I'm making a tile-based game, using one spritesheet containing all tile graphics.
Each tile has a size of 32x32 pixels.
The main problem is: when I draw the tile to the screen, if the tile position x ...
2
votes
2answers
226 views
Assigning a different texture based on picking
I'm making a game using XNA. I have some simple objects like cube and sphere, and I would like to change the texture of one face of these objects based on picking. That is, when the cursor is over ...
2
votes
1answer
139 views
XNA running slow when making a texture
I'm using XNA to test an image analysis algorithm for a robot. I made a simple 3D world that has a grass, a robot, and white lines (that are represent the course). The image analysis algorithm is a ...
3
votes
2answers
450 views
Blending textures together, texture fade over / fade in
What is the best way to render a texture overlapping effect?
Like in this example:
I want either the grass to fade in to the snow texture, or the other way around. No rough edges. Somehow make ...
1
vote
1answer
131 views
XNA shield effect with a Primative sphere problem
I'm having issue with a shield effect i'm trying to develop. I want to do a shield effect that surrounds part of a model like this: http://i.imgur.com/jPvrf.png
I currently got this:
...
7
votes
1answer
356 views
Spritebatch drawing sprite with jagged borders
Alright, I've been on the making of a sprite class and a sprite sheet manager, but have come across this problem. Pretty much, the project is acting like so; for example:
Let's take this .png ...
1
vote
2answers
135 views
Texturize a shape of multiple triangles in 2D
This is an example of a shape consisting of multiple points, triangles and eventually a shape:
Red Dots = Vector3 (X, Y, Z) or Vector2 (X, Y)
If I have a Texture of a certain size, how do I ...
1
vote
1answer
221 views
Detecting pixels in a rotated Texture2D in XNA?
I know things similar to this have been posted, but I'm still trying to find a good solution... I'm drawing Texture2D objects on the ground in my game, and for Mouse-Over or targeting methods, I'm ...
0
votes
3answers
108 views
XNA Inheritence via Texture2D
As you know to draw a Texture2D mostly an Origin, scale-factor, rotation-value and color is necessary.
To inherite a new class ATexture2D from Texture2D with adding this parameters, can cause ...
0
votes
1answer
403 views
Multiple textures on a mesh created in blender and imported in xna
I created a cube in blender which has multiple images applied to its faces. I am trying to import the model into xna and get the same results as shown when rendering the model in blender. I go through ...
6
votes
1answer
185 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 ...
0
votes
1answer
175 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
288 views
Artifacts when using SamplerState.LinearClamp in SpriteBatch
I'm using XNA 4.0 and VS2010 Express for Windows Phone and Windows Phone SDK 7.1.
This is a platform game and I have a map made up of 16x16 textures that is drawn dynamically, tile by tile.
When ...
0
votes
1answer
104 views
how to create texture for modelmesh?
Is there a possibiltiy to create a texture from a meshpart in xna. By getting a flat version of the mesh. So I can create a texture for it and edit that texture(via rendertarget)? I need to get the ...
-1
votes
1answer
786 views
Asset missing problem XNA
I'm using VS2010 with XNA 4.0 and I'm trying to load an FBX model with texture on the screen. The problem I'm having is this error:
Missing Asset: C:\Users\ChocoMan\Documents\Visual Studio ...
1
vote
2answers
302 views
Loss of texture detail in XNA (Banding 16 bit issue)
I'm loading in a background texture for my game, it's not vert detailed, it's just there too add some variance. The problem is that there looks like a large reduction in detail. I've included images ...
0
votes
1answer
558 views
XNA: Instancing Cubes, Each Side Different Texture
I am trying to make thousands of instanced cubes, each with a unique texture on each side.
Am I going to have to split each cube into 6 instanced faces, or can I unwrap it in such a way the the ...
2
votes
1answer
221 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
369 views
3D Texture Mapping (Atlas)
This is a pretty simple question. If I was to use multiple images in a single texture for a 3D cube, how would I go about re-using each vertex (having 8 total vs 24)?
With a single buffer of 8 ...
2
votes
1answer
138 views
Any significant performance cost to using BlendState.Premultiplied?
Normally I guess you'd use BlendState.AlphaBlend because normally when you load your textures through the pipeline they're already premultiplied. However, if you're loading textures at runtime from ...
2
votes
3answers
510 views
XNA texture stretching at extreme coordinates
I was toying around with infinitely scrolling 2D textures using the XNA framework and came across a rather strange observation.
Using the basic draw code:
spriteBatch.Begin(SpriteSortMode.Deferred, ...
0
votes
2answers
1k views
How do I draw a single Triangle with XNA and fill it with a Texture?
I'm trying to wrap my head around:
http://msdn.microsoft.com/en-us/library/bb196409.aspx
I'm trying to create a method in XNA that renders a single Triangle, then later make a method that takes a ...
3
votes
2answers
124 views
Is it possible to index different vertex attributes with different index buffers?
Let's say I've got a vertex which is part of many triangles. I can just reference those with an index buffer. But is it possible to share it's position but have different texture coords for each ...
1
vote
1answer
318 views
XNA - Drawing zoomed 2D sprites
I have a tile based game. Each tile texture is loaded and then I draw each one next to the other, forming a continuous background. I actually followed this tutorial for the xml files.
...
2
votes
1answer
467 views
How to save an arbitrarily large image to a file in XNA?
I have built a level editor for an XNA-based Megaman clone I am working on and one of the features I would like to implement is the ability to save a full-resolution map of the entire level (like this ...
4
votes
2answers
272 views
Is it possible in HLSL to use bitfields?
I have in memory a representation of my 2d GameMap (think of a Scorched Earth like landscape).
The map is made up of MapElements, a MapElement is made up of 64 bits defined like
struct MapElement {
...
4
votes
1answer
140 views
XNA4 - Trouble updating part of a Texture2D
I have a big Color[] ColorMap in memory (1280x720), and I have a Texture2D that I've uploaded this ColorMap to.
I update parts of the in-memory ColorMap, and want to upload those changed parts to the ...
