3
\$\begingroup\$

I'm just doing some research before embarking on rendering a 3D map inside a wpf app. I've never delved into 3D before, and hence the question..

I have map data (in several formats, and many files) which I need to render - probably in a wpf viewport3D. All the map data is in 2D, but I can add a height-map and convert to 3D. This data can be altered (updated) by the user without my knowledge, but a bit of data-crunching can be done before application start, so it doesn't need to be entirely realtime.

I've googled around but can't find a framework for how to represent my world. Do I write a terrain-tile stream server to handle requests from the viewport about which area to display? Do I create a collossal map, and hope it fits into memory?

Are there tutorials about how to deliver large terrains for rendering? Most of them seem to be about building a world inside an editor..

My world could be about 1000km * 1000km, with roads, parks, forests, power lines, street addresses (etc) - it's going to be a fair bit of data..

The machines that this software has to run on are ruggedized laptops - so not terribly fast (Core 2 duo?) and probably without DX10, but we can insist on heaps of RAM and HDD (SSD?).

Thanks - I'm looking forward to getting into this project..

\$\endgroup\$
2
  • 1
    \$\begingroup\$ You realize that your proposed map is 1 million square kilometers, or 1 trillion square meters. If you use 1 byte of information for each 20 square meters, the map would be 50 GB. So I don't think you are going to be able to fit this into memory. And if you want a lot data, as it looks like you do then you are going to be looking at incredibly huge maps. \$\endgroup\$ Commented Mar 23, 2011 at 23:10
  • \$\begingroup\$ yep - there's a lot to draw, but only a little at once.. It will mostly be vector data, so while the object density in urban areas will be pretty high, it should be balanced out a bit by the (much larger) emptier rural areas. Point taken about the sheer impossibility of containing the whole data set in memory at once, though! \$\endgroup\$ Commented Mar 24, 2011 at 1:27

1 Answer 1

1
\$\begingroup\$

It sounds like there are several problems you need to solve so I would try to approach each problem at a time and slowly make my way to a working solution.

You said you don't have experience with 3D. There is this great tutorial that shows you how to render 3D shapes in WPF.
This will get you started with 3D and WPF, and it even shows you how to display a small terrain so you'll get a good idea of the type of data structure you need to store your terrain data.
Once you have the basic data structure you should be able to extrapolate how much memory your large terrains are likely to take up.

As for handling streaming terrain data you might want to pick up a good book on Game Engine development that addresses this topic.
For example Game Engine Architecture has a section (14.4) about this.

\$\endgroup\$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .