I’m currently working on a game that requires massive worlds.
I’ve actually written my own terrain generator that can support terrains of any size (Technically up to 1 billion by 1 billion pixels if you have enough hard drive space!), by dividing the terrain into segments (Tiles) and only keeping the segments in memory as it processes them. This means that RAM is not a limitation, but rather hard drive space is.
Other than being able to generate massive terrains, my generator doesn’t have many features, and rather than spend a lot of time adding new features I thought I’d look and see if any existing terrain generators would provide what I need. The most promising of which is World Machine.
However, its not clear if it supports all the features I need, and therefore I’d be grateful if you could answer the following couple of questions:
Are tiled terrains limited in size by the amount of available RAM or the amount of hard drive space? For example, would it be possible to create a terrain of size 1,048,576 x 1,048,576 split into 1024 x 1024 tiles on a machine with say 4Gb RAM?
Given the size of he terrains I wish to create, its not practical for me to use a high resolution mega texture across the terrain, so in my game I’d like to use a single texture Atlas for the terrain (8192x8192 texels), with the atlas containing areas for grass, snow, rock, sand etc. Does WM support this, or does it only support mega textures?
The answer is Yes and Yes*, with more detailed notes below
Your machine must have enough memory to build a single tile (or multiple at a time, if conducting multiple tile builds in parallel). Each tile is then written to disk so you do not need to have the entire tileset in RAM at once. You do however need somewhat more memory than you might expect since many WM device networks will have many heightfields in-flight at once. But 4GB is more than sufficient to build 1024x1024 tiles!
This is definitely possible, but is not as seamless an experience as I’d like. There was a texture atlas device that was specifically intended for this purpose but it didn’t make the cut into the last release for time constraint reasons.
Currently you would first build your world heightfield as a Tiled world, then do a second Normal build at the target resolution to create the single atlas file.
The atlas file itself is currently not particularly automated – there is no basic device that lets you define it in one swoop – but by choosing target colors and using the texture network tools already in WM, you can create the desired result. If you haven’t already downloaded the Basic Edition, I would recommend doing so and opening up a couple of the Example worlds under texturing to see how the selectors work.
I could whip up an example file that shows how you could use the network for atlas output – if this is interesting let me know!
Yes I’ve downloaded the Basic version but haven’t had a chance to get to grips with all the features yet.
I’m glad to hear that the Texture Atlas is possible, although I didn’t 100% understand the steps you described. Maybe all will become clear once I’ve had more time to learn the features, although if you really don’t mind creating an example then I’d be extremely grateful.
It definitely sounds like I tool I want to purchase!
Here’s an example world that I’ve created to show how you would use a texture atlas. It looks a touch complicated at first, but in fact its quite logically arranged.
There is a block where terrain is created, and one where the final combined terrain is viewed or exported. In the middle, the texture is created.
The Color Definitions allow you to setup the RGB triplet that for each texture will define where it is placed in the world. Set these up according to whatever system you have or wish to use.
The texture is synthesized based upon a cascade of Choosers that, well, choose between two different colors based upon a mask input. The final terrain is built up in several steps, where each step adds a new type of texture.
Notice how the order of the Choosers defines the priority of the textures; also see how the “Grass Variation” block puts down a random pattern of two different types within its larger area.
The only considerations you need to have with texture atlases is that WM should never introduce “in between” colors as obviously they have no meaning for a texture atlas. That is the purpose of the Terrace device inserted after the Grass Variation perlin noise, for example. A Terrace device set to have 1 terrace in Simple mode forces the mask to have only two values (and thus the Chooser its connected to will only have two values)
Thinking about it more, it might be very handy to abstract a lot of this away into a macro, like the “Basic Coverage” macro but for atlases.
I’ll be the first to admit that complex textur-ing networks can be confusing, so anything that modularized them is a plus. I’ll post something up soon because I’m sure there’s plenty of people who are in the same boat as you!