"A peculiar alliance has recently come into life. Forces from the extreme left, the extreme right, environmentalist groups, trade unions of developed countries and some self-appointed representatives of civil society, are gathering around a common endeavour: to save the people of developing countries from... development."
- Ernesto Zedillo, former President of Mexico

New demo
Monday, October 4, 2010 | Permalink

It's been a year since I posted the last demo, in fact exactly one year it turns out, but I'm still in the game, and here's finally a new demo. This illustrates a technique for applying roads on top of terrain without the use of any depth biases, vertical shifts or other hacks usually needed to make roads not cut into the terrain and other geometry. It also solves the problem of computing gradients in deferred techniques where the original gradients are lost and discontinuities exist in the buffer.




Enter the code below

Monday, October 4, 2010

Nice demo, however right click works, but settting new road did not.

Monday, October 4, 2010

Move to start position, push and hold left button, move end position, release button. Road will update as you move. See if this works. If you just click start and end will be same position, so there will not be any visible road.

Tuesday, October 5, 2010

Nice demo - good to have something new to play with.

1) Why do the roads clip through the terrain if I position them when the camera is high? (same road can be placed when the camera is near the ground with no clipping?)

2) What sort of gradient issues occur from sampling the depth buffer to calc texture coordinate? I have used something like this in some games (only for blob shadows however) without caring about gradients. I commented out the gradient code in your demo and could not see any artefacts (Nvidia 260 based card)

Tuesday, October 5, 2010

1) The demo places the box from your start position to your end position. The box has a fixed size, so if you're too high it will not encapsulate all terrain. A complete solution should scan the terrain in the area and select an optimal box, but that was too much work for this demo. Instead the box is rather high. Thinking more about it, a solution for this demo would have been to just clamp the y coordinate to maximum terrain height.

2) I'll post a picture of the artifacts later (I'm at work now). You may not always notice them if you don't know what to look for.

Saturday, November 6, 2010

What system is used in games like Crysis? they use some kind of sheet which generate some road or this is same?