Jump to content
  • Advertisement
Sign in to follow this  
pcwlai

How to render a road in terrain imlpemented in height map?

This topic is 3076 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I would like to know how to render (or blend nicely) a road or some other details on a terrain using height map implementation.

The best exampple is those in WoW. After using tools to turn WoW into wire frame mode, you will find there is only triangles (forming squares) for terrain and no other polygons rendering the roads and so on.

Maybe there are multiple rendering of the terrain meshes, first with the low frequency basic land type and then the high frequency road? But if so, then, this seems better to render with only detail textures as the terrain is already streammed in?

Share this post


Link to post
Share on other sites
Advertisement
Shader's Multi texturing is the #1 way to go.


#2 way to go would be to have LOTS of different textures (one texture per "block")

Share this post


Link to post
Share on other sites
Wouldn't it be too costly to store so many detail textures as there are so many blocks on screen at the same time?

Share this post


Link to post
Share on other sites
Using multitexturing, it is very cheap :
1-Use a few high rez images (ie : grass, rocks ... etc) that you will be reusing on hundreds of terrain blocks
2-Use a different low-rez texture that says how much of each texture to use for a pixel (ie : each channel of this texture will tell how much of "grass" or how much of "rocks" that pixel will have).

Multitexturing will be very memory friendly. It will obviously cost more GPU, but this cost is still pretty damn low.




The second solution; having a different texture for every terrain block; will cost a LOT in memory. Both storage memory AND video memory. But at least :
-it is very GPU friendly
-it will allow you to draw whatever you want on the terrain

Share this post


Link to post
Share on other sites
Thanks for the reply! I have been curious on how to create terrains with high details.

There are many articles on terrain generation and rendering methods but a lack of how to texture them especially when artificial items and regular items are to be painted on the terrain.

Share this post


Link to post
Share on other sites
Maybe you should consider using a separate mesh for the road(curved over and bellow the terrain) and then align the terrain mesh to that road.
Something like this ?
http://vimeo.com/9122230

Share this post


Link to post
Share on other sites
Quote:
Original post by solenoidz
Maybe you should consider using a separate mesh for the road(curved over and bellow the terrain) and then align the terrain mesh to that road.
Something like this ?

+1.
Here is another example of a road made by mesh: http://pc.ign.com/dor/objects/14327511/tropico-3/images/tropico-3-screens-20090610000645685.html?page=mediaFull

Share this post


Link to post
Share on other sites
Yep. Looks like a Crysis editor. It would be nice if you say few words of how exactly you model the road mesh around the spline, and is there any difficulties with the UV generation. I tried Tropico game demo once. Good job.

Share this post


Link to post
Share on other sites
I've also seen this done in screen space with a fragment shader, surprisingly... Very crisp road. You lose AA though, and it doesn't seem like the most flexible solution. But very nice for what it does.

Share this post


Link to post
Share on other sites
if you add geometry, it will z fight like a bastard at distance, and you will fight with that forever, until you wished you had done it all in the shader.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!