Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 30 Sep 2007
Offline Last Active Mar 29 2014 10:50 AM

Posts I've Made

In Topic: camera problem

07 May 2013 - 10:39 AM

Never mind.  It was a problem with my matrix multiply function.  Nothing to see here, move along.  -_-

In Topic: Smooth Voxel Terrain Generation

31 December 2012 - 09:10 AM

That's a good point.  Have you looked at marching cubes?  The algorithm will help you generate just the smooth parts of the actual terrain, then you'd have to add the flat sides of the cubes yourself.  It isn't too hard, but it can be slow for large terrains.

In Topic: Smooth Voxel Terrain Generation

28 December 2012 - 10:04 AM

Changing the noise function won't do anything to solve the problem.  It may or may not make it less noticeable, but the actual problem will still be there.  What does it look like without clamping the values to [0, 1]?  I expect it would smooth out the terrain, but then some of the blocks would extend a bit past their grid spot.  But is that really a problem?


The other suggestion I can make is to look into an algorithm like marching cubes.  This lets you extract a polygonal mesh that describes the surface defined by your noise function.  A little extra work will make it generate the cubed pieces you're looking for.

In Topic: Shooting in 3D world where mouse clicked

18 December 2012 - 06:18 PM

Ok, you're normalizing the direction vector, right? But when you calculate the direction, it looks like you're subtracting a normalized vector from an unnormalized vector. Have you tried it without that inner call to normalize? Unproject should return a point in world space, and your model coord should also be in world space, so I suspect that normalize call is messing you up.

In simpler words, try something like this:
Game1.Instance.ModelManager.addModel("Arrow", (ModelPosition + new Vector3(0, 40, 0)), Vector3.Normalize(farPoint-(ModelPosition+new Vector3(0,40,0)*2.0f)));

In Topic: Using the Correct Data Structure

18 December 2012 - 05:59 PM

Have you considered removing all optional parameters from constructors and setting their values after object creation?