Dirt Roads

Published June 09, 2010
Advertisement
In the previous post about roads in Outerra I mentioned that different road types can be created by using road profiles. Here comes one example.

Dirt roads are using the very same mechanism as normal roads, in fact the only difference is that road nodes here contain a different road type identifier. That is used to look up the corresponding road profile in shaders that generate the roads, and it determines other things as well - the pavement and border materials, for example.

Road profile specifies "exactness" values across the road width, in range from 0 to 1. Normal roads have value 1 across the whole road width, meaning that the elevation given by the road spline interpolation is exact and the resulting surface will be smooth and level. Values less than 1 will cause that the computed surface elevation is blended with the actual underlying terrain elevation with given blending coefficient. Additionally, the less exact the road surface elevation is, the more it is randomized by fractal to make it rougher.



The roughness created by the fractal noise can vary with the road type. The depth of the furrows can be determined by setting road surface under the terrain by a specific amount, and it can change node by node. On the sample road above it creates deeper or shallower parts. Or even a ridge when the way points are not set densely enough to follow the terrain accurately.

Here is a road that was created from way points lying 0.4m (on average) below the terrain surface with high roughness:




Another one that was put only slightly under the terrain and the roughness is low:



Lastly, few screen shots how it all looks in the terrain.





In order to utilize the generated detail we also set a finer level to be used for vehicle physics. In the previous
">video with Tatra truck the resolution for physics was around 1.2m, and it was quite visible. In the following video the resolution for physics is around 0.15m, 8 times better. The wheels are simulated as simple ray casts so it may be occasionally visible. Also, Angrypig toyed with the suspension and I left it in for the video; Tatra truck now sways way too much, but at least it serves to show the response to the terrain shape.

">


Forum topic here.
0 likes 8 comments

Comments

LogicalError
Wow. That's some pretty awesome stuff that you did there!
June 09, 2010 03:55 AM
Staffan E
Nicely done! Throw in some soft natural lighting and those scenes could fool me for photos.
June 09, 2010 09:51 AM
tamat
really nice, they only thing I miss right now on those screenshots are the bushes and some dirt patches spread, and it will be perfect :)
June 09, 2010 10:12 AM
benryves
Astonishing work. Looks really good — I look forwards to reading more!
June 09, 2010 10:13 AM
Tomat
is it possible to use such kind of shader on vegetation? to lift leafs off the ground surface, because it looks not very good when fir intersects ground
June 10, 2010 01:32 PM
cameni
Quote:Original post by Tomat
is it possible to use such kind of shader on vegetation? to lift leafs off the ground surface, because it looks not very good when fir intersects ground

The trees are just billboards now, and additionally it's just a single image. Since they are scaled down and sunk to ground at forest borders to make appearance of smaller trees there, the branches intersect with the ground. Later there will be separate models for these outer trees because they are in fact different, so the problem should go away.
June 11, 2010 02:42 AM
Moe
Very cool. I'm wondering though - with that kind of detail with the vehicle suspension, how many vehicles can be on screen at once?
June 14, 2010 01:21 PM
cameni
Quote:Original post by Moe
Very cool. I'm wondering though - with that kind of detail with the vehicle suspension, how many vehicles can be on screen at once?

Well, a better detail used for collisions means more memory used on CPU to store the collision height fields (fetched from GPU). But apart from the higher memory thrashing it's not very different from when the coarser fields are used. For raycast wheels, at least [smile]
June 14, 2010 02:38 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement