Announcement

Collapse
No announcement yet.

Wolrd Machine to UE4 using World Composition

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Okay,

    so I'm able to import the heightmap without the Layers and it will work. But I can't import the layer files for the height/slope definiton. Here are some screenshots.

    Thanks

    Click image for larger version

Name:	Unreal_Landscape_Setup.png
Views:	1
Size:	792.4 KB
ID:	1053847
    Click image for larger version

Name:	Unreal_Material_Setup.png
Views:	1
Size:	324.5 KB
ID:	1053848
    Click image for larger version

Name:	WorldM_Note_Setup.png
Views:	1
Size:	156.6 KB
ID:	1053849
    Click image for larger version

Name:	WorldM_Note_Output.png
Views:	1
Size:	833.3 KB
ID:	1053850

    Leave a comment:


  • replied
    Originally posted by HendrykJ View Post
    Hey there,

    I'm trying to follow your process, but I get an error while importing my weight-layer. I've tried to export different sizes, my heightmap has a 2017x2017 resolution and my layerfiles.raw, too. But each time I get this error message: "sitze of layer file does not match sitze of heightmap". Any ideas?

    Best regards,
    Hendryk
    Can you post screenshots of your settings on WM and UE4? I will tell you if I can

    Leave a comment:


  • replied
    Hey there,

    I'm trying to follow your process, but I get an error while importing my weight-layer. I've tried to export different sizes, my heightmap has a 2017x2017 resolution and my layerfiles.raw, too. But each time I get this error message: "sitze of layer file does not match sitze of heightmap". Any ideas?

    Best regards,
    Hendryk

    Leave a comment:


  • replied
    I just followed your process, seems my material isn't HD

    Leave a comment:


  • replied
    Update,

    Here is a picture of a huge 16km x 16km terrain using the process above with a cel shader created by Antidamage here: https://forums.unrealengine.com/show...-of-cel-shader

    - Josh

    Click image for larger version

Name:	Terrain with Cel Shade in UE4.jpg
Views:	2
Size:	741.9 KB
ID:	1053550

    Leave a comment:


  • replied
    Originally posted by Chance Ivey View Post
    +1 for the wiki this is great stuff man!
    Thanks! I didn't think about the wiki. I will work on getting this up there.

    - Josh

    Leave a comment:


  • replied
    Originally posted by HeadClot View Post
    DUDE - Put this up on the WIKI - this needs to be up there
    +1 for the wiki this is great stuff man!

    Leave a comment:


  • replied
    DUDE - Put this up on the WIKI - this needs to be up there

    Leave a comment:


  • replied
    Alex,

    I will have to look into that tool when I get home. That could be another way to do the tiled build. I also forgot to mention that World Machine exports tiles in this format:

    (0,3) (1,3) (2,3) (3,3)
    (0,2) (1,2) (2,2) (2,3)
    (0,1) (1,1) (1,2) (1,3)
    (0,0) (1,0) (2,0) (3,0)

    Were UE4 imports tiles in this order:

    (0,0) (1,0) (2,0) (3,0)
    (0,1) (1,1) (2,1) (3,1)
    (0,2) (1,2) (2,2) (3,2)
    (0,3) (1,3) (2,3) (3,3)

    That is for a 4x4 grid. That is why I flip the y on the output of World Machine. So when you save your tiles be aware of how UE4 imports them.

    - Josh

    Leave a comment:


  • replied
    Thank you very much for this. I am near to have to work with this and this guide is very useful.
    I have the World Machine standard version, which not supports tiles.
    However searching I found this:

    http://scrawkblog.com/2013/02/18/aut...g-imagemagick/
    (not yet tested by me)

    Perhaps it is also useful to prevent erosion probem / tiles of world machine until it is resolved.

    Alex.-

    Leave a comment:


  • replied
    I do the same thing, that is exactly why I started documenting things as I went. Even while writing the above the process changed a few times.

    I have experienced the tile issues you mentioned. What I did was crank up the belnding percentage on the tiled build options tab. It is under tiles per side. Then I just made sure everything being exported was blended across tiles. I have had issues since I started doing those steps. I started with 4033 size landscape tiles and it would take forever to build so I increased the tiles and dropped the resolution to 2017 and it all builds out in 2 hours if not a little less. Not that I have the process down I'm going to experiement with exporting the perfect weightmaps so everything flows better. The cool thing about doing weightmaps is I can go back and paint over the landscape.

    - Josh

    Leave a comment:


  • replied
    I like the way you have documented your process, I need to do something similar. I usually get a process and settings figured out, then get distracted and have to come back to it months later and basically figure it out all over again.

    I dont see any seams/lines in the images, you must have the tiling working nicely. Last time I had a chance to generate some landscapes in WM there were some issues with some erosion effects not crossing tile edges. the solution was to perform the erosion on a large untiled map,save it, then open it back up in a tiled build and then save the tiles. Have you experienced this?

    Marvin

    Leave a comment:


  • started a topic Wolrd Machine to UE4 using World Composition

    Wolrd Machine to UE4 using World Composition

    For the longest time I have been trying to figure out the best process to integrate World Machine tiled worlds into UE4. I think I have come across a good solution so far. I have attached my process. This is from my Technical Design Document so if you need anything explained just let me know!

    -- EDIT --

    I created a wiki with the same info located here: https://wiki.unrealengine.com/World_...ld_Composition

    World Machine to UE4

    1. World Creation

    1.1. Overview
    Creating worlds for the game will be a detailed and long process. With the right steps the time it takes to create worlds should be lessened. The next sections will layout the process in detail.

    1.2. Terrain Creation
    Terrains are created using World Machine. Below is the process of creating terrains and setting the terrain size up.
    1.2.1. Generators
    In world Machine there are multiple ways to create terrains. One way is a paramatized way using perlin or any other kind of noise generators.
    Another way is to import a heightmap created in another program as a basis.
    1.2.2. Natural Processes
    Erosion is a huge positive of using World Machine. It creates lifelike erosion. The outputs of the erosion process can be used to create flow maps and more.
    Another Process is Thermal Weathering.

    1.3. Terrain Export
    To export the terrain from World Machine follow below. The export process is ran once exporting multiple files used for weightmaps for textures as well as the main heightmaps.
    1.3.1. World Machine Setup
    Below is the process to export the heightmap.
    1.3.1.1. Tiled Build Setup
    Under "World Extents and Resolution" you will see a "Tiled Build Options" tab. Set the following options.
    • Tile Resolution - Custom 2017 x 2017
    • Tiles per Side - 4 x 4
    • Blending Percentage - 100%
    • Share edge vertices - tick
    • Flip Y-axis orientation - tick
    Click image for larger version

Name:	Tile Build Options.png
Views:	2
Size:	33.9 KB
ID:	1137375
    1.3.1.2. General Setup
    Under the "General Setup" tab make note of the maximum elevation used. You can change this to your needs but remember that number it will be used when importing into UE4.
    Click image for larger version

Name:	World Machine General Settings.png
Views:	1
Size:	43.0 KB
ID:	1137407
    1.3.1.3. Height Output Setup
    Ensure the final height output is attached to a Height Output node. Ensure the settings follow the settings below:
    • Filename - Filepath/Planet_Name
    • Participate in tiled builds - tick
    • High Precision - RAW16
    Click image for larger version

Name:	Height Output Settings.png
Views:	1
Size:	11.6 KB
ID:	1137376
    1.3.1.4. Weightmaps Setup
    Setup whatever weightmap selections you wish to use. Follow the steps below to setup weightmaps based off terrain angle.
    • Create 3 Select Slope Nodes
    • Attach the Primary Output node to each select slope input node.
    • Set the angle selections for each select angle nodes.
    • Attach the outputs from the select angle nodes to a height output node.
    • Set a distinct name for each output and make sure it is tileable. Below are some screen shots for each step.
    Click image for larger version

Name:	World Machine Node Setup.png
Views:	1
Size:	55.7 KB
ID:	1137377
    Click image for larger version

Name:	Select Angle Node.png
Views:	1
Size:	7.6 KB
ID:	1137378
    Click image for larger version

Name:	Weightmap Output Settings.png
Views:	1
Size:	11.5 KB
ID:	1137379


    1.3.1.5. Build
    Click the tiled build button and wait for all the heightmaps to populate.

    1.4. Terrain Material Setup
    The material for the terrain should be setup first. Follow the steps below to setup a terrain ready to accept the weightmaps exported earlier.
    • Create a new material in UE4.
    • Create a Landscape Layer Blend node. Add a layer element for each weightmap you exported.
    • Name the Layers something you will remember and can associate with the weightmaps exported from World Machine.
    • Drag the textures you want to use for each layer into the material editor.
    • Connect the outputs of the textures to the associated "Layer" input on the landscape layer blend node.
    • Add a Landscape Layer Coords and attach the output to the "UVs" input of each texture node.
    • In the Landscape Layer Coords set the tiling to whatever you want. Start with 25 and go from there.
    • If you wish to use Normal Maps for the textures duplicate the process above. Instead of connecting the output of the layer blend node to the "Base Color" input, connect it to the "Normal" input on the material node.
    • Below is an example node structure.

    Click image for larger version

Name:	LandscapeMat.jpg
Views:	1
Size:	530.3 KB
ID:	1155211

    1.5. World Composition in UE4
    World composition allows smaller chunks of the planet be loaded at runtime when the player is close enough to that chunk. Below are the steps to get the terrain into the world.

    1.5.1. Persistent Level Setup
    To setup the persistent level follow the steps below:
    • Create a new level with a sky-box pre-built or not.
    • Save the file with the Planet or location name.
    • Open the world settings and check the box labeled "Enable World Composition"
    Click image for larger version

Name:	UE4 World Settings.png
Views:	1
Size:	17.6 KB
ID:	1137381
    1.5.2. Tiled Landscape Import
    To import a tiled landscape follow the steps below
    • Open the levels window.
    • Click the Levels drop down menu in the upper-left of the levels window.
    • Select "Import Tiled Landscape..."
    • Click the "Select heightmap Tiles..." button.
    • Navigate to the folder where you saved the raw heightmap images from World Machine
    • Select all the tiled files. (e.g. Planet_Name_x0_y0)
    • Change the Z scale. Times the world height used from World Machine by 0.1953125 and enter that number in Z scale.
    • Select the Material created earlier. Once selected it should give you the weightmaps option.
    • Now click the "Select Weightmap Tiles..." button.
    • Navigate to the folder where you saved the raw weightmap images from World Machine
    • Select all the tiled files for each weightmap. (e.g. Planet_Name_HighAngle-x0_y0)
    • Then click "Import"
    • Select all the Planet_Name_x#_y# levels in the Levels window
    • Right click and select load to see if the imported properly.
    • Below are some images of the process.

    Click image for larger version

Name:	UE4 Levels Window.png
Views:	1
Size:	25.0 KB
ID:	1137382
    Click image for larger version

Name:	UE4 Tiled Landscape Import.png
Views:	1
Size:	24.5 KB
ID:	1137383
    Click image for larger version

Name:	UE4 Tiled Landscape Import Final.png
Views:	1
Size:	42.1 KB
ID:	1137384
    Click image for larger version

Name:	UE4 Levels Window Level Load.png
Views:	1
Size:	70.6 KB
ID:	1137385

    1.6. Terrain in UE4
    Below are some images from the terrain created above in the UE4 engine.

    Click image for larger version

Name:	UE4 Terrain in Engine 2.jpg
Views:	1
Size:	221.6 KB
ID:	1137390
    Click image for larger version

Name:	UE4 Terrain in Engine.jpg
Views:	1
Size:	254.4 KB
ID:	1137391
    Click image for larger version

Name:	Terrain with Cel Shade in UE4.jpg
Views:	2
Size:	741.9 KB
ID:	1137472
    Attached Files
    Last edited by Lyons Den; 07-09-2015, 01:30 PM. Reason: Updated to work with 8.1
Working...
X