Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 08 Mar 2005
Offline Last Active Feb 03 2013 01:12 PM

Topics I've Started

Trouble with AlphaState

19 January 2013 - 04:55 PM

Hi Iam having trouble getting transparent texture to work correctly. I append what the problem is.


As you can see, the transparency works good for the bottom faces. But the faces in the background are somehow obstructed by the transparent texture although it should shine through. This effect seem always to happen with all faces in this direction, doesnt seem to happen with faces pointing in the other direction. What could this strange effect be?

Iam using the following (and the BasicShader) to draw things:

FieldOfView = MathHelper.ToRadians(45);
AspectRatio = (float)Engine.Instance.Graphics.Viewport.Width / (float)Engine.Instance.Graphics.Viewport.Height;
NearPlane = 0.1f;
FarPlane = 250.0f; Graphics.Clear(ClearOptions.Target | ClearOptions.DepthBuffer, Color.LightBlue, 1.0f, 0);
Graphics.BlendState = BlendState.AlphaBlend;
Graphics.DrawPrimitives(PrimitiveType.TriangleStrip, cubeSide * 4, 2);

EDIT3: I found that it only happens if I look at a face that is behind, right or top from the cube I am looking at.
It doesn't happen for front, bottom or left faces. Could this have to do something with my normals, since Iam using different geometry for each cube side (6 different Meshes)? Without AlphaBlend everything is rendering fine. I now tried VertexPositionTexure (without normals), still the same problem.

XNA Generate Mip Maps with Texture.FromStream()

06 January 2013 - 04:56 PM



Can I generate Mip Maps in XNA without using the content pipeline? When I use Texture.FromStream there is no parameter which can be used for that.


Is it even recommended using XNA without the content pipeline? I know that it provides faster content loading and its content importers save your quite a bit coding..


But the thing with the content pipeline is that everybody who wants/needs to change game content (graphics designer, sound artist or even a hobbyist modder) needs to have an installed copy of visual studio. That is quite bad, so I want to avoid using the content pipeline.


Message type in packet vs. connection per message type?

21 August 2011 - 07:24 AM

Hi folks,

I want to create a multiplayer game. The clients can communicate with the server with different messages for example "move object x", "send chat msg to all", "send chat msg to x", "request stats".

what is best:
1. Having clients creating a single tcp connection to the server and then so all communication with that conection, but requiring some kind of message type code in the packet


2. Having clients creating a connection for each message type.

How would you solve it?

How to get hires satellite images

20 August 2011 - 02:14 PM

Hi Folks,

Iam trying to use hires satellite images (like google maps) in a game. Where can I get such things?
I want free colored orthogonal images where I can see buildings on it and so on. Do I have any chance to get something like that?

Using ambient light with bumpmapping (managed directX)

28 March 2005 - 10:34 AM

Hi Iam using managed directX and want to do some bumpmapping. It looks fine so far but the problem is that ambient light is completely ignored so that the the side of my models which aren't facing the light is completely black: device.RenderState.Ambient = System.Drawing.Color.FromArgb(0x606060); int factor = VectorToRgba(Vector3.Normalize(viewV-planetV), 1.0f); device.RenderState.TextureFactor = factor; device.SetTexture(0, planet.BumpTexture); device.TextureState[0].TextureCoordinateIndex = 0; device.TextureState[0].ColorOperation = TextureOperation.DotProduct3; device.TextureState[0].ColorArgument1 = TextureArgument.Diffuse;//;TextureColor device.TextureState[0].ColorArgument2 = TextureArgument.TFactor; device.SetTexture(1, planet.Texture); device.TextureState[1].TextureCoordinateIndex = 0; device.TextureState[1].ColorOperation = TextureOperation.Modulate; device.TextureState[1].ColorArgument1 = TextureArgument.TextureColor; device.TextureState[1].ColorArgument2 = TextureArgument.Current;