Jump to content
  • entries
    41
  • comments
    137
  • views
    107840

Dirt Roads

Sign in to follow this  
cameni

962 views

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.
Sign in to follow this  


8 Comments


Recommended Comments

Nicely done! Throw in some soft natural lighting and those scenes could fool me for photos.

Share this comment


Link to comment
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 :)

Share this comment


Link to comment
Astonishing work. Looks really good — I look forwards to reading more!

Share this comment


Link to comment
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

Share this comment


Link to comment
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.

Share this comment


Link to comment
Very cool. I'm wondering though - with that kind of detail with the vehicle suspension, how many vehicles can be on screen at once?

Share this comment


Link to comment
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]

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!