Jump to content
  • Advertisement
  • entries
  • comments
  • views

Accidental and stuff

Sign in to follow this  


With this latest Accidental article (and some revisions/addendums I am fiddling around with for it) I've been really annoyed by the limits of 2D tilebased stuff, since a lot of the usefulness of a technique such as discussed in the article (using noise to apply turbulence to a pattern) really comes in handy when working with height-map based generated terrain.

Right now, I'm working on some methods for building roads on heightmap generated terrain. I start with a series of randomly located points, and I tesselate a curve connecting these points. From this curve, I build a quadstrip, then iterate the strip plunking down quads. (I made a modification to the float buffer class to provide functions for triangle rasterization; new version of Accidental to reflect the changes should be up some time soon.) The values rasterized by the quadstrip are elevation values. The result is something like this:

I can superimpose this road on generated terrain, then use a mask buffer to keep subsequent noise perturbations from affecting it too greatly, and the result is a smooth and sensical road through the wilderness. It's hard to demonstrate some of these techniques using only a limited 2D based engine.

At some point in the future, I may want to rebuild Accidental, or build an Accidental 2 and base it on something like the Golem3D basecode so I can demonstrate techniques involving heightmap stuff.
Sign in to follow this  

1 Comment

Recommended Comments

Neat idea for the roads! I wonder though, if it might be possible to use shaders and the GPU to decal the texture onto the terrain rather than the CPU. Hmmm, I'll have to ponder that one.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!