Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 1 more developer from Canada and 12 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


Member Since 24 Apr 2001
Offline Last Active Sep 16 2013 07:57 AM

Posts I've Made

In Topic: Triangulating a polygon region over terrain

18 February 2013 - 01:10 PM

Yeah, no worries about z-fighting - Generically, the tessellated area forms the cap of a 'terrain following vertical extrusion' - in the first case I'm using it for the top of a region of trees, with a terrain-following strip around the outside with appropriate textures for trunks, possibly another strip around the edge for foliage, the top will be textured, probably displaced slightly on top of following the terrain, with a bit of paralax mapping for relief. Should look pretty effective for what I want to achieve.


I've got some other ideas for using the functionality it once I have it in the toolbox :)



In Topic: Triangulating a polygon region over terrain

18 February 2013 - 09:15 AM



This was largely what I was intending to do, I was just trying to think of an approach that reduced the complexity from test everything against everything else. Probably still the top on the list.




'Ear-clipping, then split by grid' would not generate a particularly nice triangulation as a pair of adjacent ears that completely contain a grid square can actually end up bisecting it into more triangles, especially if any of the ears were 'thin' (see below). Though as you suggest, its probably fairly easy to get that scheme working. Already have the ear clipping code in there for one.


Delaunay could be nice, hadn't thought of just triangulating the contour and the grid points from a single point set.


Attached File  PolygonRegionEarThenClipBadTriangles.png   32.96KB   13 downloads



In Topic: Efficient Smoke Trail Rendering

24 February 2010 - 06:28 AM

Instead of rendering particles, you could render a trail, you would need less vertices to get a consistent line:

So instead of individual quads:

[] [] [] [] [] [] [] >====>

Generate a strip:
with a smoke trail texture that does something like:

| |

You might need two strips, each at 90 degrees to the other, so the cross section of the strip would probably need to look like a + or X. You could also still draw some particle sprites as well (but much lower frequency than you do now) so that it looks round when you view it head on.

[EDIT] Just noticed you said its a 2d game, in that case, drop the particles, and you'll only need one strip [/EDIT]


Alex (I'm in an ascii art kinda mood!)

In Topic: Skeletal animation equation

24 February 2010 - 01:39 AM

You could have a look at the archives of the SWEng-Gamedev mailing list, there have been a good few threads on there about animation, usually with some comments about hot it is done in Granny, which seems to be a pretty comprehensive package.


In Topic: Skeletal animation equation

24 February 2010 - 01:26 AM

You could save some space using quaternions for rotation, and possibly only a couple of translation terms - scale and complicated translation are often not required in skeletal animation - This might save you both data size and computation time.