• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Stainless

Terrain for flight simulators

9 posts in this topic

I've been thinking about this for a while and I am kinda getting to the "code something and see if it bloody works" stage, but I want to have a chat about it with youguys first.

 

The problem I am trying to get my head around is the shear scale of things. I've written planetary terrain systems in the past, but they don't require that Buckingham Palace is recognisable and in the correct place.

 

Say I want to be able to have a theatre of operation that covers western Europe in the 1940's. Your are looking at about 1000 miles by a 1000 miles.

 

That's a big area. Using a 4K texture gives me a resolution of about 0.25 miles per pixel. Not very nice.

 

So I started thinking about using the texture pixel as the base height and adding in pseudo random noise for detail. In effect turning every pixel into a CLOD (well I'm leaning towards ROAM) patch.

 

Then I can have the resolution I want at the cost of a lot more processing, but at first glance it looks possible.

 

The next thing I thought about was visibility. If I was at ground level, then it's not too bad. Maybe an 8 by 8 set of patches would suffice.

 

However at 35,000 feet. The visible range is huge and I'm having to handle huge numbers of patches. Admittedly all of them would be reduced to a single quad, or at least most of them, but it's still a lot of patches.

 

So I started thinking about organising sets of patches into region patches, and groups of region patches into sector patches, and sector patches into country patches, and about that point I decided to go for a beer instead.

 

Has anyone had any expierience with a system like this?

 

Anyone got a better idea (Please have a better idea, pretty please with sugar on)

 

 

0

Share this post


Link to post
Share on other sites

Create a quad tree for your terrain. Make each leaf contain a mesh fixed size such as 33x33 vertices (you can even use tesselation hardware for this). Subdive the quadtree nodes based on the distance from camera, for example : if camera distance to node bound is smaller than the bound size, subdivide (this may not be optimal algorithm).

 

WIth few hundred quad tree nodes you'll be able to simulate pretty huge terrains at variable resolution. Increasing the visible range gets cheaper and cheaper since bigger nodes cover bigger terrain areas. Of course you should try to keep the terrain triangles small enough so that the screen space error is small. This can be handled with a proper node subdivision algorithm. 

 

In the best case you'll have a height texture or texture array which contains 33x33 blocks.With a 1K x 1K height texture, you can have around 900 nodes in the GPU memory in the same time. When the camera moves, you'll need to update the height texture from system ram, or hard disk, or use any random terrain algorithm you find suitable.

 

Just some ideas,

 

Cheers! 

0

Share this post


Link to post
Share on other sites

35,000 feet ... in the 1940's. Your are looking at about 1000 miles by a 1000 miles

 

35,000 feet? Spacecraft in the 40s? wink.png You might consider revising your parameters before you design everything. A P15 Mustang had a maximum altitude ~10,000 feet. So maybe more like 125x125 miles. You can limit that even further by adding haze (fog/clouds) as, at high altitudes there wouldn't be a real use for a pilot to see more than (maybe) 10 miles.

 

EDIT: Oops. Misread some info. This post is bogus. sad.png

Edited by Buckeye
0

Share this post


Link to post
Share on other sites

 


35,000 feet ... in the 1940's. Your are looking at about 1000 miles by a 1000 miles

 

35,000 feet? Spacecraft in the 40s? wink.png You might consider revising your parameters before you design everything. A P15 Mustang had a maximum altitude ~10,000 feet. So maybe more like 125x125 miles. You can limit that even further by adding haze (fog/clouds) as, at high altitudes there wouldn't be a real use for a pilot to see more than (maybe) 10 miles.

 

 

The Me-262 had a service ceiling of 37,565 ft, and the P51 Mustang had a service ceiling of 41,900 ft.... what are you talking about?

0

Share this post


Link to post
Share on other sites

Thanks ferrous, that doc really has given me a few ideas.

 

I don't want the whole Earth. I want to be able to have theatre's of operation and expend more resources to make that much smaller area as high detail as I can.

 

Despite that , the techniques in the doc are very close to what I have bouncing around in my skull.

 

It's food for thought.

 

When I'm doing a whole planet I use six quadtrees arranged as a cube them deform them to a sphere in the vertex shader, I don't want to do that here.

0

Share this post


Link to post
Share on other sites
I had to write something like this in my first job, it was about WinXP times, with ~128MB ram and GPUs with 4MB-32MB, artist drew a map of about 16384*12288+mips in DXT3 which was quite a chunk of a CD.

My pragmatic way to solve it was to divide the map into a simple Grid, every Grid entry with tiles of 256x256 which led to 64x48 for maintainance, which really isn't much to worry about (that's why I didn't go for quadtree or something). The grid entry was a struct, having the offset of the zipped texture in the archive, a 2d distance to the player and a pointer for the device texture.

depending on your hardware (or rather your settings), there were some 256x256 textures allocated, some 128x128, and most 64x64. On initialization, the distance to the player was calculated for every grid entry, then those 3k cells were sorted and initialized the textures by picking the highest available.

every frame the distance was re-evaluated and an iterator was increased, doing like a simple bubble-sort pass.
the iteration was interrupted for the frame either if the interator looped through all grid entries or if two entries with a different texture resolution needed to be swapped. in that case the pointers were swapped and the textures were uploaded (that way there was no dynamic allocation fragmenting the GPU mem and the framerate was quite stable as the amount of uploads was limited). At that time there was no multicore (maybe there was a Pentium D already, dunno), everything had to run single thread so there was no smart streaming going on. The map archive was installed on HDD, it was read only memorymapped by windows, but access could still stall and drop a frame or two.

Yet in general it was running quite smooth. I could imagin you could nowadays go to 4096x4096 tiles, if DXT+zip is not enough, even transcode those from jpg to have more space -> more tiles on disc. that would be 262144x196608 pixel ;)

(btw. I had no heightmap, just flat terrain, but you could get it working with CLOD terrain I if the border of your Grid entries meet, that would barely reduce the resolution.)
0

Share this post


Link to post
Share on other sites

I suggest using quad tree for geometry management and procedural virtual texturing for texturing.

 

Lots of good information is here:

http://dice.se/publications/terrain-in-battlefield-3-a-modern-complete-and-scalable-system/

 

My implementation results:

https://www.youtube.com/watch?v=t7CiyT1RNUY

 

I tested this approach to terrain sizes of 1000 km x 1000 km (with 10m elevations sampling span) and texture sizes

up to 256M x 256M pixels (this gives you denisty about 200 pixels per meter).

 

If you want to play with my implementation in realtime, you can grab it here (there is readme file, which

should help you get it running):

 

https://drive.google.com/file/d/0B1nsNgFzDF54SGx3alN5WEZHWjQ/edit?usp=sharing

 

This is slightly older build which does not support async streaming, but still should represent the potential of used

techniques :)

 

Cheers

P.

2

Share this post


Link to post
Share on other sites

That looks really nice, I'll grab a copy and have a play. Thanks.

 

I will have to think about handling buildings etc as well.

0

Share this post


Link to post
Share on other sites

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