Jump to content
  • Advertisement
Sign in to follow this  
Aragon

Streets on Terrain

This topic is 4812 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

hi all last night playing the battlefield2 demo i was wondering all the time how did they put thoose curved streets with that detail at the landscape. i got an terrain of 400x400 working very well with 5 layer of texture tiling, fast and good looking.. but i also want to implement some streets like in BF2 and i wonder how to implement this, cause the streets are detailed at ground so that it cant be a simple texture layer with one prepainted texture but they follow across the map not in an quad/block style... hmmmm any ideas? greetings

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Aragon
hmmmm any ideas?

Might not be exactly what you want, but VertexNormal has been going on about his implementation of terrain and roads for a while [smile]

It looks like quite a good technique to me.

Have a look at his journal here.

hth
Jack

Share this post


Link to post
Share on other sites
that is not that what i mean,

that road/street got an wheel profile texture on it that
follow the curves of the road..not just simple tiling like
in that tutorial


---......-
----....--
...------
....----

the wheels follow the road at the terrain
___
___\...../
...\\___//
....\___/

Share this post


Link to post
Share on other sites
hi,

I may say something stupid here, as I'm not really sure to understand your question. But couldn't it simply be a mesh lying on the heightmap (like the buildings, etc.) ??

I'm working on a simulator, and we have a heightmap. And we can't do the streets via the heightmap since we need some texturing that cannot be done in heightmap (the marks on the middle of 2 roads, at a stop, etc.) So we simply build them as regular meshes that we put on top of the heightmap. You just have to be carefull with LODs and how the border of the road's mesh blend with the heightmap (quite easily solved with alpha blending)

I don't know if they use that method in BF2 (played it during lunchtime, but I was more concerned about the tank driving toward me than by the streets it was driving on ^^) but they surely use similar methods in other games (I think FlatOut use that kind of method)

Share this post


Link to post
Share on other sites
You could use decals, sort of like the stuff they use for blood in most games, except larger, and more... roadlike.

Share this post


Link to post
Share on other sites
Of course I could use decals, stuff like that. But I'd still have a problem of resolution. Even if my heightmap is at 1 meter per vertex, it's not enough to have smooth roads. I'm speaking of roads with pavements, and the pavements can't be done with heightmap geometry (too low resolution)

Share this post


Link to post
Share on other sites
Yes I could ... and I said i'm working on a SIMULATOR. If I use a normal map, when the user will drive on the pavement, their will be absolutely no feedback (the geometry is just plain, although the image show a pavement, and the car's movement will not be the one excpeted by the user)

Anyway, heightmaps are good, but you don't have enough resolution in the mesh to put everything in it. Roads can be included in the heightmaps using different techniques, but it's not sufficient for simulation (we're in a "real life" city here, not in a track like in NFS or other games)

Share this post


Link to post
Share on other sites
do you want something lişke this:

or it should not tile neither in horizontal nor vertical? i mean the detail textures have to follow the road? do you mean that? batlefield's roads are just simple textures, i mean turning road, straight road.. all these are discrete images. i think they put them like tiling and mix with the back color.
and the image above uses simple pixel shader. just has a b&w image for roads and calculates detail coordinates itself.
or i misunderstood something?.. :)

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.

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!