Jump to content

  • Log In with Google      Sign In   
  • Create Account

jsuffolk

Member Since 09 Feb 2003
Offline Last Active Jun 22 2014 07:41 PM

Topics I've Started

Starfighter Alpha Video Preview

16 December 2013 - 10:11 AM

Here's a video showing a preview of the alpha version of my game in development: Starfighter. There's some cool stuff at the end around :40 (boss and planetary warp effect), so if you get bored it's still worth jumping to that part.

 

Feedback is appreciated, as always!

 

http://www.youtube.com/watch_popup?v=18iAJy10f2w&vq=hd1080


Is it possible to relief map a fractal surface

25 May 2013 - 10:31 AM

I'm fairly pleased with my terrain LOD and shading now overall, but I think the surface looks kind of flat; all I'm doing now is some simple normal mapping. I've been considering applying the relief mapping algorithm I use elsewhere, but it seems that would require huge numbers of texture fetches.

 

With the high-detail fractal surface I'm currently using, I'm already doing 33 texture fetches per pixel with the fractal algorithm alone (11 bands with a anti-repetition algorithm that requires 3 lookups per band), and I'm worried that multiplying this by a large number of search iterations (10 or so) for relief mapping it might choke the GPU.

 

At what point will I be texture-fetch limited? Do I have better options than simple normal mapping with a high-texture-fetch fractal noise-based surface?

 

 


Bizarre Terrain Glitch

23 May 2013 - 07:55 PM

I have a planet terrain shader that perturbs vertex positions by using a 3D fractal noise lookup on a sphere as the heightmap. It works perfectly 99.9% of the time except for these bizarre glitch vertices that occasionally appear. It looks like a spike in the middle of the otherwise normal mesh.

 

I've narrowed it down to the trilinear texture lookups into the noise. The glitch always only affects a single vertex, smaller than a texel in size. It occurs consistently for the same position lookup in the texture

 

Annoyingly, my fractal lookup is pretty basic and after looking over this code and trying dozens of things I remain stumped to the cause. I suspect the problem must be some sort of glitch in the vertex shader trilinear filtering; I see few other possibilities at this point. Anyway, here's some pics of the glitch and the relevant code for the vertex shader (I omit the pixel shader for brevity).

 

#define textureSize 80.0
#define halfTexelSize 0.00625
#define texelSize 0.0125

texture NoiseRealVertex;
sampler3D NoiseRealVertexSampler = sampler_state {
    Texture = <NoiseRealVertex>;
	AddressU = WRAP;
	AddressV = WRAP;
	AddressW = WRAP;
	MinFilter = Point;
	MagFilter = Point;
	MipFilter = Point;
};

// Vertex Noise Functions
float4 tex3D_trilinear(float3 t) 
{ 
	t -= halfTexelSize.xxx;
	float3 f = frac(t * textureSize);
	float4 x = float4(t, 0);

	float4 t000 = tex3Dlod(NoiseRealVertexSampler, x);
	float4 t100 = tex3Dlod(NoiseRealVertexSampler, x + float4(texelSize, 0, 0, 0)); 
	float4 t010 = tex3Dlod(NoiseRealVertexSampler, x + float4(0, texelSize, 0, 0)); 
	float4 t110 = tex3Dlod(NoiseRealVertexSampler, x + float4(texelSize, texelSize, 0, 0)); 
	float4 t001 = tex3Dlod(NoiseRealVertexSampler, x + float4(0, 0, texelSize, 0)); 
	float4 t101 = tex3Dlod(NoiseRealVertexSampler, x + float4(texelSize, 0, texelSize, 0)); 
	float4 t011 = tex3Dlod(NoiseRealVertexSampler, x + float4(0, texelSize, texelSize, 0)); 
	float4 t111 = tex3Dlod(NoiseRealVertexSampler, x + float4(texelSize, texelSize, texelSize, 0)); 

	return lerp(
		lerp(
			lerp(t000, t100, f.x), 
			lerp(t010, t110, f.x),
		f.y),
		lerp(
			lerp(t001, t101, f.x), 
			lerp(t011, t111, f.x),
		f.y)
	, f.z);
}

What should this gun shoot?

14 April 2013 - 01:28 PM

I built in some robust animation and targeting for the cannons on the large destroyer ship. This works quite and looks great, however, I seem to have developed the gamedev equivalent of writer's block and can't decide what kind of ordinance they should shoot!

 

While I could just regurgitate one of the existing weapons in my game (laser, plasma, rockets), I think it's about time to introduce something new... but I can't figure out what. These guns are some pretty big cannons. What do you think they should shoot?

 

Not sure if this helps, but I'm currently leaning towards a plot something along the lines of the player is a space privateer on a mission to disable and steal something from the mile-long imperial destroyer (the big ship with the cannons), but comes only to find it's already under attack by an alien force.

 

Additionally, part of the conundrum is since these guns are huge (the barrel is bigger than the player ship) presumably they must shoot something pretty powerful, likely meaning instant death if they shoot the player. In that case, can they be easily avoided like the easily dodgable, but powerful rockets that some of the smaller ships shoot? Do they take a long time between shots? Or do they simply not target the player most of the time? Maybe they just focus on the aliens?

 

Perhaps another annoyance with these cannons is if the player gets too close the barrel will swing around and smack the player ship. Think it should stop trying to target the player if you get too close? Or is it more realistic that the enemy using the cannon *would* try to smack the player with the cannon if you get too close?

 

Here's a screenshot of a battery of 3 of the cannons I'm talking about (there are 22 total, they are destructible):


Exported FBX Doubled Translations

06 April 2013 - 07:44 AM

Based on popular feedback I'm trying to animate the 100+ guns on the large ship model in my game. Conveniently, they're separate submeshes in the model I got from turbosquid, however the submeshes have no translation component and the submesh vertices appear to be offset from the model origin rather than the submesh origin. So any rotations I apply to the turrets are around the larger mesh center, rather than their local origin.

 

To work around this I tried the set origin command to set the origin for all the submeshes to be centered around their geometry. While this now allows me to rotate each turret submesh about its local origin, it doesn't have the desired effect because the translation transform appears to be applied twice. The guns for some reason appear to be double the distance from the larger mesh origin than they used to be and look like they're floating in space like asteroids rather than attached to the ship. They rotate around their local origin at this incorrect position in space.

 

I'm doing this work in blender, exporting to FBX for XNA. I've tried some different settings on the exporter, doesn't seem to make a difference, but maybe I just haven't found the right setting. In blender the turrets appear to be positioned in the correct place, but not once I export them. Any clue what might cause this?


PARTNERS