This project creates a Monument Valley-style terrain by composing and transforming terrain generators, and painting a mask to form a road in the terrain.

Select Help > Samples to open your local folder where the samples are installed.
You can also watch a video tutorial on creating a Monument Valley-style terrain on our YouTube channel.

Several groups of nodes are used in this project to help you understand better the different effects of the procedural process. See Grouping nodes for details on how to create groups of nodes.

  • Road mask: The project begins by painting a mask that will define the shape of the road in the terrain. With this node, the mask is painted directly in the Viewport and you can see the results immediately on the terrain. The Painted mask acts like all other masks, but you can edit it in real time as often as you want.
  • The mask is linked to an Export mask node to allow you to export the painted mask. This node exports a mask in the form of an image file. The resulting image is gray scale and the gray level of each pixel depends on the value of each vertex (always between 0 and 1).
  • Mask composition: This group transforms the Road mask by a series of mask transformation nodes:
    • An Invert mask node simply inverts the values of a mask: the black parts of the mask become white and the white parts become black. Note that this node has no properties.
    • The Smooth mask node smooths the values of the mask to introduce a blur.
    • A Scale & offset node sets the mask's height and offset.
  • Mask scattering: Another painted mask is created to form the base of the terrain.
  • Base group: The Base group defines the shape of the terrain in which the road is placed.
    • Both output masks in the Mask composition group are composed using an Average node, which calculates the average between two masks: at each vertex, the value of the output mask is the average of the values of both input masks.

    Click on the Full composition with mask node and use the translate, scale, and rotate gizmos to transform the terrain.

    • The result is composed with another terrain generator, the Slope node, which creates a terrain plane with an editable inclination and orientation either by specifying the minimum and maximum height values or by adjusting the slope angle, and the averaged mask using an Alpha blend terrain composition node. This node creates an alpha composition between two terrains at locations defined by the mask.
  • Curve: Next, an Apply curve terrain generator carves the terrain elevation. This node modifies the terrain profile by changing the height of each input vertex vertices on a curve that define the terrain heights.
  • Slice: Two sets of terrain transformation nodes are composed in series and composed using a Full composition node. This node gives maximum freedom to compose two terrains. The second terrain can be translated in the X and Y axes, scaled, and rotated before composing it with the first terrain. The heights of this composed terrain are constrained using a Min & max heights node.
  • Slope: A Mask from slopes is created from the Slice group output terrain. This node creates a mask from the slopes of a terrain. The mask created has the same size and resolution as the input terrain. The mask is inverted and smoothed. This mask will be used in the final composition.
  • Base road: The Base road group composes the following using an Alpha blend terrain composition node:
    • A smoothed Road mask (created from a painted mask at the start of the project)
    • Perlin noise of which the heights are constrained using a Min & max heights node and the height of each input vertex that defines the terrain's heights is controlled by an Apply curve node
    • A Slope node terrain generator
  • Final composition: A Composition with mask node to create a linear composition between the Base road output terrain and the Slice group output terrain at locations defined by the Slope group output mask is used to create the final terrain with the road.
  • The terrain can then be exported.
  • A Mask from slopes mask generation node creates a mask from the slopes of the final terrain with the same size and resolution as the final terrain.

Copyright © 2021 · All Rights Reserved · Wysilab