Jump to content
  • Advertisement
Sign in to follow this  
rein

Generating realistic 2d maps

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

hello I have a question that's been bugging me for some time now. Have any of you encountered any algorithms or editors that allow making photo-realistic satellite-like images? Not necessarily 3d terrain editors, 2 dimensional is what I seek - at best in realtime or semi-realtime let me illustrate what I mean: http://www.bf2benelux.com/page/maps/map_dragon_groot.jpg this is for example a map from Battlefield 2 made with 3d terrain editor - is there any program or a technique to draw similiar quality terrain maps using only raster graphics? I'd image it having a heightmap support, shading, water levels and rivers, perhaps roads, sun lighting and fooliage, brushes etc. I'm eager to write such editor myself, I need however some documentary on how to actually achieve these effects

Share this post


Link to post
Share on other sites
Advertisement
I don't have real experience with this, but I can imagine such maps are made by rendering the actual terrain 3D mesh from top.

I don't know which techniques BF2 uses, but some terrain renderers use 1 big "color/lightMap" as a base layer for the entire terrain (the Old BF did that, Farcry as well, maybe Crysis too). When running around in the game, nearby surfaces will get blended with detailed tiled textures, but distant geometry can do with the base layer. This map is made by "painting" low-res tiles on 1 image. Greyish low-res rock textures for cliffs and mauntains, greenish for grass, etc. Ussually terrain editors can store tile indices/blend values per vertex. With these values, the colorMap can be made, and also the proper detailed textures can be shoosen when rendering nearby geometry ingame.

The base layer basically contains all the terrain colors, and eventually also shadows if static lighting is choosen (the sun). When creating your radar image, you could render the terrain from top (orthogonal) with this map applied. You can also render the other geometry, like roads, buildings and water planes.

You don't need any algorithms for the map in that case, since your engine already has all the techniques to render geometry, terrain with base layer/lightmap, and water. Just render it from top. It takes some energy, but you only have to do that once. However, I can imagine the resulting map image needs some artistic hand to do some contrast adjustments, smooth area's where the tiling is too much visible, add some bumps and cracks to the cliff sides, etc.

Greetings,
Rick

Share this post


Link to post
Share on other sites
If performance isn't a huge issue, I think one of the easiest ways to go would be the "camera looking down on 3d world" approach mentioned. There is tons of information out there on how to do all kinds of goodies in 3d worlds.

For optimizing, one place to start would be things that are too small to make a significant impact. For example, if you are shrinking the resolution quite a lot, no point in having highly detailed and smoothed grass. Instead, a flat grass texture would probably suffice. Larger objects could contain very fast and sloppy shadows instead of pretty and smooth ones, etc.

The image you linked to looks pretty simple. To achieve a map like this with real-time performance, you can first generate the terrain layout using whatever kind of method you want. This could be done using a recursive if you wish, and there should be texts out there for realistic terrain generation. Once you have that, you can texture according to the elevation. Obviously stuff at sea level and lower will have water while above sea level can go from grass to mountains. Special cases can be made like if a given area is of reasonable size and contains minimal foliage, all foliage from that area is removed and it is turned into sand to become a beach.

As for the buildings, I'm sure you could come up with some way to automate the location of those, but ideally hand-selected location would be most believable. Buildings are made and placed by dudes, so being a dude, you should know where them dudes place them buildings. Dude.

I think the best way to approach this would be first clarifying to yourself (and everyone helping you) what you want. Do you want a HUGE, incredibly detailed map that can show you the babes hanging out on the nude beach? Or do you want something smaller and lightly detailed like the map you posted? Would the maps be a representation of an existing location (ie for a game of yours), or do you have to generate your own landscape? Once you decide what to do, approach it piece by piece. Get the base working (elevation generation), add in the basics of terrain, then foliage and specific cases. Generate some maps and see what they could use. If you think "Hmm, I think a beach should be here", then find out why YOU think the beach should be there and reflect your decision-making in your code.

Share this post


Link to post
Share on other sites
Quote:
The image you linked to looks pretty simple To achieve a map like this with real-time performance, you can first generate the terrain layout using whatever kind of method you want. This could be done using a recursive if you wish, and there should be texts out there for realistic terrain generation.


aye !!!????

methinks you havent tried this before :)
generating realistic terrain is extremely difficult. I had a search for the bf2, + it seems theyre using
http://www.cajomi.de/GeoControl/geocontrol.htm
Im curious to see how well it really is, ie how much artist input is needed

Share this post


Link to post
Share on other sites
I meant the technique and detail of the map itself looked simple, not the generation of such a map. I assume that, since its a snapshot of a much larger map, there's at least some (likely much more) hands-on work with the terrain.

Share this post


Link to post
Share on other sites
Quote:
Original post by rein
hello

I have a question that's been bugging me for some time now.

Have any of you encountered any algorithms or editors that allow making photo-realistic satellite-like images? Not necessarily 3d terrain editors, 2 dimensional is what I seek - at best in realtime or semi-realtime

let me illustrate what I mean:

http://www.bf2benelux.com/page/maps/map_dragon_groot.jpg

this is for example a map from Battlefield 2 made with 3d terrain editor - is there any program or a technique to draw similiar quality terrain maps using only raster graphics?

I'd image it having a heightmap support, shading, water levels and rivers, perhaps roads, sun lighting and fooliage, brushes etc.


I'm eager to write such editor myself, I need however some documentary on how to actually achieve these effects





A big issue is is this to be totally 'on-the-fly' random generation or can it be a preplanned (static) map which can have some human guidance to its shaping??? THe fine details could still largely be auto-generated on that second option, but a human could vet the patterns to discard obviously awful looking sets (its like chosing the best random seed visually ahead of time that is then used in the run-time generator function to create the map data...).

If its for a large world map which has to have some cohesions (natural patterns instead of alot of disjoint features) you would probably need a pre-created seed map (coeeficients controlling the generating function for the whole world).
Then you would have more local generators use that data to fill in from the rough/coarse detail.

Usually any objects like buildings are in very specific relations to other manmade objects and those would be placed in organized clusters using fitting rules (scripted logic) to adapt them to a specific location (AND to have variations that would make the pattern different each time). Clusters of clusters of varying objects with recursive placement logic can be used to make each site unique (enough) via combinatorics.


Share this post


Link to post
Share on other sites
Quote:
Original post by rein
Have any of you encountered any algorithms or editors that allow making photo-realistic satellite-like images? Not necessarily 3d terrain editors, 2 dimensional is what I seek - at best in realtime or semi-realtime

let me illustrate what I mean:

http://www.bf2benelux.com/page/maps/map_dragon_groot.jpg

this is for example a map from Battlefield 2 made with 3d terrain editor - is there any program or a technique to draw similiar quality terrain maps using only raster graphics?


Coincidentally, I stumbled across this really fascinating research software from SIGRAPH 2001 today. It is capable of painting new terrain images after being trained from an example terrain image.

So if you've got an example image that contains the features you want (mountains, rivers, urban areas, etc...), you can use that to easily paint your own terrain that is made up of those features.

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!