How does WoW's terrain generation work?

Started by
17 comments, last by Beather 14 years, 3 months ago
Hello, I'm very curious how World of Warcraft implements the terrain rendering. It does not need to load terrains while you are playing, why is this? I would be very grateful if someone could explain this concept to me! Thank you in advance.
Advertisement
probably they are using some kind of terrain lod based on quadtrees or clipmaps.
"A human being is a part of a whole, called by us,universe, a part limited in time and space. He experiences himself, his thoughts and feelings as something separated from the rest... a kind of optical delusion of his consciousness. This delusion is a kind of prison for us, restricting us to our personal desires and to affection for a few persons nearest to us. Our task must be to free ourselves from this prison by widening our circle of compassion to embrace all living creatures and the whole of nature in its beauty."A. Einstein
some form of LOD heightmap.

Everything is better with Metal.

With streaming, so that chunks are continuously being loaded as you move around.
Exactly, just because there isn't a loading screen doesn't mean it's not loading. It's just loading slowly in the background so the experience for the user seems smooth.
-----------------------------------------------“The best, most affordable way to save the most lives and improve overall health is to increase the number of trained local, primary healthcare workers.”Learn how you can help at www.ghets.org
Thank you for your response!

I have a few more questions:

Does this mean that WoW uses multithreading to load the maps in the background?

What happens when you change from chunk?

What's the best way for me to visualize these chunks?

Do you know of an example that use these chunks to generate seamless terrain?

Thank you.
Quote:Original post by Beather
Does this mean that WoW uses multithreading to load the maps in the background?

I don't know WoW (i know it, but never played it), but i know it must use multithreading for loading in the background, otherwise the main thread would stall when there is a huge chunk to load.

Quote:Original post by Beather
What happens when you change from chunk?
What's the best way for me to visualize these chunks?

??? I don't know what you mean.

Quote:Original post by Beather
Do you know of an example that use these chunks to generate seamless terrain?

There was a nice article about Dungeon Siege's seamless terrain (from 2002) describing it in detail. I don't find it anymore, but Google gave me links to the slides at least.
The Continuous World of Dungeon Siege - Powerpoint slides
Thanks a lot Anntor, I read the slides and that cleared things up a lot!

What I wanted to ask:

Suppose I have a heightmap, and I generate terrain from it.
What happens when I reach the border of that terrain?

I guess there should always be another thread running to load all adjacent maps.
This would mean there are 9 height maps loaded at all times.
9 height maps means 9 meshes in memory. Am I correct? This seems a lot of memory to me. Especially because WoW's zones are very big and the game runs very smooth.

My other question: What happens to my coordinate? How do I represent my character's coordinates?

I would say, to measure one's coordinates, that you have four members;

float X;
float Y;
float Z;

int mapID;

In this case mapID would be the current height map where the player is standing on. The other thread reads this mapID and loads all adjacent maps in silence. Is this correct?


Thank you again!
Nick
Quote:Original post by Beather
...I guess there should always be another thread running to load all adjacent maps.
This would mean there are 9 height maps loaded at all times.
9 height maps means 9 meshes in memory. Am I correct? This seems a lot of memory to me. Especially because WoW's zones are very big and the game runs very smooth.

At first, yes, you have to load the adjacent nodes/maps/chunks/whatever. Hold them in memory and unload them, when you get to far away from the particular chunks.
Now to the memory size. Don't overestimate the needed size per chunk data. If its still to big, make your map chunks smaller! For a huge terrain, you just have the terrain mesh in memory (thousands of vertices still needs less memory than some big textures), but not the texture on a particular map patch far far away. You won't see it on your screen, so you don't need it in memory! You have to do the right partitioning of your data (textures eat up most of available memory)!

Quote:Original post by Beather
My other question: ...
I would say, to measure one's coordinates, that you have four members;
...
The other thread reads this mapID and loads all adjacent maps in silence. Is this correct?

Sounds okay. But take notice of the following:
If you move from one mapID to another, you load the 3 new adjacent map chunks, but wait with unloading of the old 3 chunks behind you. The usual approach is that the circle around you, where to start loading new map chunks is smaller than the one which determines when to unload a map chunk. That is because of the fact, when you are standing close to a mapID border and moving back and forward (hence passing over the border again and again), you would continually load and unload the same map chunks.
Quote:Original post by Anntor
There was a nice article about Dungeon Siege's seamless terrain (from 2002) describing it in detail. I don't find it anymore, but Google gave me links to the slides at least.
The Continuous World of Dungeon Siege - Powerpoint slides
All hail the Wayback Machine: The article.

This topic is closed to new replies.

Advertisement