Difference between revisions of "Use with World Composition"

From Open World Bakery
 
Line 15: Line 15:
  
 
Keep in mind you need to overlap one voxel for "World Composition" to work properly, so if you want to build 2*2 level setup 2048 voxels wide, you will want something like this:
 
Keep in mind you need to overlap one voxel for "World Composition" to work properly, so if you want to build 2*2 level setup 2048 voxels wide, you will want something like this:
#** Whole world of the size 2077*2077
+
# Whole world of the size 2077*2077
#** Level 1:1 will have area 15:15 - 1039:1039 area
+
# Level 1:1 will have area 15:15 - 1039:1039 area
#** Level 1:2 will have area 1038:15 - 2062:1039
+
# Level 1:2 will have area 1038:15 - 2062:1039
#** Level 2:1 will have area 15:1038 - 1039:2062
+
# Level 2:1 will have area 15:1038 - 1039:2062
#** Level 2:1 will have area 1038:1038 - 2062:2062
+
# Level 2:1 will have area 1038:1038 - 2062:2062
  
 
Then you will have 4 separately stored on disk, but equal Bakery instances with different fractions exposed to different levels.
 
Then you will have 4 separately stored on disk, but equal Bakery instances with different fractions exposed to different levels.

Latest revision as of 04:32, 4 September 2020

UE4 provides nice feature for building Open Worlds: World Composition. It allows you to connect several levels to one world (to put things simple, visit Epic for details).

So can you use Open World Bakery to fill not one level, but multiple? Yes.

How-to

  1. Establish the map setup, preview it, tune it, bake lo-res
    Worldsize.png
  2. When you are ready, go to "Open World Bakery" details, switch "Bake resolution" to "Manual"
  3. Set “World resolution” to the full world size, including all related levels. Bakery will prepare the whole world map of this size and save it when you save the level
  4. Define the part of the WHOLE map that will be visible to this level
  5. Bake the map
  6. Save the level (important!). Now this level's asset file contains not only partial data for this level, but also a fully-baked data of the whole world
  7. Save this level under another name, so then the new level file will represent another part of your world. Change "Area exposed as landscape" so that the second layer would take another part from the Bakery.
    1. In Details tab navigate to Open World Bakery / Internals / "Current Baking Task" and set in to "2". Alternatively you can turn on "Call In editor" for Bakery function BakeMapsOnly, which makes exactly that but is hidden by default, and then simply click the button.
    2. Repeat this as many times, as you need.

Keep in mind you need to overlap one voxel for "World Composition" to work properly, so if you want to build 2*2 level setup 2048 voxels wide, you will want something like this:

  1. Whole world of the size 2077*2077
  2. Level 1:1 will have area 15:15 - 1039:1039 area
  3. Level 1:2 will have area 1038:15 - 2062:1039
  4. Level 2:1 will have area 15:1038 - 1039:2062
  5. Level 2:1 will have area 1038:1038 - 2062:2062

Then you will have 4 separately stored on disk, but equal Bakery instances with different fractions exposed to different levels.

Performance notes

Open World Bakery has no limits on the map size as long, as your PC provides enough memory and CPU heat. Just keep in mind that map of the size 2048*2048 fits 16 maps 512*512, so it takes ~16 times longer to bake. And if you bake, say, 1024*1024 map for ~1 minute, 8192*8192 map will take about ~1 hour to finish.

If you are not going to fill some parts of the grid with real terrain, leave these spaces in Bakery empty. Areas without hills only take memory, but will not affect baking time significantly.