Author Topic: Building a Detailed Open World  (Read 12194 times)

0 Members and 1 Guest are viewing this topic.

Lagoonate

  • Community Member
  • **
  • Posts: 2
    • View Profile
Building a Detailed Open World
« on: March 20, 2013, 11:16:48 AM »
Hey Guys!

I was wondering if any of you could give me the scoop on how to merge different height maps before exporting them into a game engine. I'm trying to make a wildlife open world of around 30km2, the work flow I use for the individual terrains, is the one described by Wenda on his tutorials: http://www.youtube.com/watch?v=p0o3bqoM0Qg As in: first I build a basic layout of the terrain using Mudbox, then I export the height map into WorldMachine for the erosion effects, and color map. Using Photoshop I can tweak the textures and finally the height map and color map are imported into the Engine, in this case CryEngine 3. Now, that's all well and good, but what I can't figure out is how can I make a huge terrain and edit it's different sections separately, for example: plains, a coastal area and some hills. Should I make it entirely on MudBox in one go? Or in WorldMachine first, then detailed it on MudBox? In WorldMachine there's a Tiled Input, maybe that's the answer. I know you can't import more than one heightmap per project in the CryEngine 3, so I need a way to combine them earlier in the process, I want to be able to apply the effects that WorldMachine provides across the whole terrain and make it feel seamless, but been able to imported into the engine separately, or at least as I combined them in another program, update my height map as I create new sections, areas o zones.

I hope I didn't ramble to much, any help would be greatly appreciated, cheers! =D

Remnant

  • Author
  • World Machine Guru
  • *****
  • Posts: 2311
    • View Profile
    • http://www.world-machine.com/
Re: Building a Detailed Open World
« Reply #1 on: March 20, 2013, 02:02:29 PM »
Hi there,

Let me break down your question a bit to make sure I"m addressing what you need properly.

1) What is the best workflow for large open worlds with different terrain characters.
2) How do I combine multiple sections of terrain
3) How do I export it


1) For workflow, it really depends on where you are most comfortable working to design the initial layout -- you can do all the layout purely in WM which makes the rest of this post have no meaning -- you would just use layout generators and different chains of generators and filters to produce different terrain character. There is actually a device in the shortly upcoming WM 2.3 that really helps out with this! And doing so means you have fewer things to worry about with transitions between different terrain types.

However, it is absolutely no issue to do the initial work in mudbox and import it. Doing so just leads to a few further questions...


If you don't want or can't put everything on a single heightfield, then consider how these regions are separated -- are all of each terrain zone neatly packed into a compact region, or is it sprinkled in several places throughout the map? If the former it might be quite feasible to make each in a separate height field, whereas in the latter case you might be better off making one giant map.

2) There is one basic question when it comes to importing multiple heightfields:
 
"Are my multiple input files arranged strictly in a grid, or do I want to scatter an irregular number around at different locations?"

YES) If you have multiple input files, and they fit neatly onto a grid, you can use a Tiled File Input device to bring the entire set of heightfields into World Machine in one swoop. They just need a naming structure something like this: mytile_x0_y0, tile_1,4, etc. Where the first and second numbers are X and Y grid coordinates of the heightfield. This works great for sliced terrain datasets, but if you want to have more loosly-defined locations (perhaps with overlap) then you will need to do something else...

NO) This is *probably* the option you wanted. You can use multiple File Input devices and adjust the world placement values so that the heightfield only covers a certain region of your world. Then take all the outputs and run them through a chain of Chooser devices to combine them together. The attached graphic shows how this is done -- the key here is that each File Input also provides a mask that shows where it has valid data, and that mask can even be automatically softened for your convenience (and you can of course further muss it up as you wish). You can have your regions overlap each other to provide a transition area between the terrain types.

3) If what you need to do is export a single heightfield, then this one is easy -- just build and export like normal from WM. The above has taken care of all the other issues.
-- Stephen Schmitt
- Creator of World Machine

ivanhawkes

  • World Machine Veteran
  • ***
  • Posts: 19
    • View Profile
Re: Building a Detailed Open World
« Reply #2 on: March 22, 2013, 04:11:15 AM »
Hi Lago!

I'm pretty new here but I'm working on something that has exactly the same issues as you, since I am targeting CryEngine and want to have a large 'open' world.

First thing you need to know, and you most likely know it by now is that CryEngine is limited to 4K maps and has no real ability to stream a larger map for you. I say 4k, even though it can do 8k technically, because there are floating point accuracy issues with 8K maps making them all but useless.

As Rem said, you can either cluster all the zones together in one pretty little grid and swallow the bitter pill of having to hide the zone transitions...or, you can scatter them over a larger map and have pretty much the same issue. I've gone for building an entire world map and placing a cluster of 9 in one grid spot, and will place singles and pairs around the rest of the map as I develop the idea. For me the hardest part is accepting that using Cry will mean I can't stream one large open map. The good news is that it will be easier to develop your idea with smaller maps as there will be less fighting for control of the map to place resources or make changes.

My main zone will be made up of a grid of 3x3 4K chunks. I am looking at using 'valleys' etc to separate them all, disguising it as best I can. I generally work up the entire area at once, building, checking output, etc...and when I have it looking the way I want I do a grid build at say 2k/4k and check it inside Cry.

Cry only needs (can use) your heightmap and your coverage map. Spew them out to disk with a file output device and read it into Cry and you're halfway home. You still need to paint the terrain textures, but a lot of the hard work is done.

My current flow is:

  • Fractal Terrains 3 - generate the world map and export the main locations out as heightmaps in PNG
  • World Machine 2 - import the maps, do crazy cool stuff, spool out a mass of files out the other end
  • CryEngine 3 - import height and coverage, fly about looking for the next thing to fix, dream of day when it's done :D

I know the Wenda tutorial and his method. It was very much like the approach I was trying. I don't use Mudbox though because it tends to flake out on import and export of the displacement maps - which is a shame, since I'd love to use it.

FT3 generates my main land mass now, and most importantly, the coastline. World machine takes a low res file and gives it life, trying to preserve the coastline (so I can make a cool looking map with it that matches the output of WM)

It's a simpler workflow, and thus, fewer things go wrong :D

Lagoonate

  • Community Member
  • **
  • Posts: 2
    • View Profile
Re: Building a Detailed Open World
« Reply #3 on: March 27, 2013, 06:56:56 PM »
Wow Guys! Thanks for your replies, very detailed answers.
Basically what we want to do, is a single continent with notably different areas, similar to the mmo archetype. In a way that they feel seamlessly combined but in reality they wouldn't be so close to each other, like plains, mountains, jungles and volcanoes. We probably want to have one of each, rather than having several of them randomly distributed thought the map. That's why I would like to be able to develop this areas separately, and later on combined them in a single big map.

Now, what you said ivanhawkes, has me a little confuse. When you say CryEngine 3 isn't able to stream maps bigger than 4/8k, you mean in the SandBox Editor only, when you're editing them? or in the game once your project is finished? I always had this doubt. I know that there are a couple of mmo's been develops right now that use the engine (ArchAge, Allegra and a few others), if this is the case I don't know how are they doing it. I read something in passing about level streaming in the documentation of the engine, when I was searching for an answer, maybe that's the solution.

Anyway, thanks again for all the info, if you could give me any additional insight I would gladly read it! :D

ivanhawkes

  • World Machine Veteran
  • ***
  • Posts: 19
    • View Profile
Re: Building a Detailed Open World
« Reply #4 on: May 05, 2013, 04:21:08 PM »
I forget to set notify me on reply, so I missed this so this answer is really late :D

There are two licenses for the CryEngine, there's the free one which only comes with source code for the game DLL, and the full and quite expensive one with the full source code you can modify to your needs.

Like you, I'd like to have an open streaming world with mixed terrains, on a smaller bunched up scale, similar to most MMOs today so I totally know where you are coming from. The problem I think is that if you are using just the free SDK I am not sure it is achieveable since it requires you to seemlessly load in and unload areas according to position, line of sight, etc. That would need a full source licence I believe (but might be wrong). The games you mention will all be using that full licence and forking the code.

Sandbox and the other tools can't handle maps above 4k too well from all reports. It theoretically will do maps of 8k in size but things crash a lot, require huge amounts of memory and are subject to jitter due to loss of precision in the floating point maths.

As much as I want huge open worlds, Cry does not handle them well without modifications. I believe UDK and Unity can both do it, but I refuse to sit and watch a Lightmass progress bar.

For now, I am going to create 4k tiles for each zone and settle for the compromise of mountains, oceans, portals and the like. Those are pretty large areas to run around in and although you need to zone from one to the other it's the price I pay for all the other goodies in the FreeSDK.