Jump to content
  • Sign Up

    Welcome to CANOPY.

    Browse the Forums, read articles in the Library, share your work in the Gallery, get the latest in Downloads

    Want more? Subscribe and get all our assets for a fraction of their asset store purchase price!

  • 2. Stamper Introduction


    Bryan

    The Stamper is one of the Gaia core tools that helps you shape your terrain with mountains and valleys. This article explains how to operate the stamper in detail.

    1. Stamper Basics

    The Stamper is a tool designed to manipulate the heightmap of your terrain: Unity terrains are heightmap based, which means that the overall shape of the terrain - where a high or a low, a mountain or a valley would be - is determined by height values across the terrain plane. Each X and Z coordinate on the terrain can have exactly one height value, and the combination of these heights makes the overall terrain shape. You can manipulate this heightmap to a certain degree with the built in Unity terrain inspector tools, but creating an entire terrain with these tools can be tiresome, and it can be difficult to sculpt realistic shapes out of the terrain by hand. 

    The stamper solves this problem by letting you design a terrain manipulation with a preview until you are satisfied with the operation to then apply - or stamp - this operation onto the terrain. Realistic shapes are defined by stamp images which contain common terrain shapes in heightmap format.
    Optionally you can also fire certain spawners automatically so that e.g. the terrain is textured correctly on the fly while you are working on it.

    In a nutshell, to operate the stamper you need to perform the following steps:

    image.png
     

    1. Position the stamper on the terrain where you want to operate (you can use the regular transform controls and the scene view Gizmos for this)

    2. Select an operation from the available operation types

    3. Set up the operation parameters to your liking

    4. Click the stamp button to apply the operation (as seen in the preview) to the terrain

    The following sections describe the stamper operations and functionalities more in detail.

    2. Positioning and Scaling the Stamper

    You can position and scale the stamper like you would do for any other object in your scene using the transform component and the scene gizmos:

    image.png
     

    Note that the effect of positioning, scaling and rotation might be different for the different operation types: You can increase the effect of the "Raise Height" operation by scaling on the Y-axis, but the scaling Y-axis will have no effect on the smoothing operation for example.

    Please also note that there is an upper limit on how far you can scale up the stamper until it does not scale up anymore and that working on larger areas does slow down the performance of the stamp preview rendering as well. If you need to work beyond those limits, you would need to consider stamping multiple times, or use the World Designer to export a single stamp image onto multiple target terrains.

    In the "Operation settings" panel of the stamper you can also find a few helpful buttons that can help you with positioning the stamper:

    image.png

    * The "Ground" button will reset the stamper y-coordinate to the y-coordinate of the terrain, useful to quickly bring a floating stamper down to the bottom.
    * "Fit To Terrain" will align the stamper dimensions with the terrain the stamper is currently hovering over.
    * "Fit To World" will align the stamper dimensions with all the terrains in the scene - granted the combined heightmap resolution of the terrains does not exceed the stamper size limits (if this is the case, the button is grayed out and not available)

    3. Stamper Preview

    The stamper preview displays the operation you are about to perform on the terrain, and always takes the current settings, the stamper position and the already existing terrain heightmap into consideration. The stamper preview has two different colors that indicate whether the operation will raise the terrain, or will lower the existing terrain. Additionally it also tints the areas that will be below the sea level in a blue tone:

    image.png
     

    The colors for the stamp preview can be adjusted to your liking in the Gaia Settings. You can also enable and and disable the sea level display in the advanced settings of the stamper.


    You can switch on and off the preview altogether by pressing the "Preview" button at the bottom of the stamper. The button color indicates if the preview is currently enabled or not. Note that it is possible to have the preview enabled, but the current operation does simply not create any changes to the existing terrain - in this case the preview would not display anything on the terrain either.

    4. Operation Settings

    image.png
     

    The most important setting for the stamper is selecting an Operation Type - the operation type defines in which way the stamper manipulates the heightmap. There are operations for basic stamping operations, special effects and erosion.
    Each of the different operation types has their own settings, which will be explained in the next chapter.

    The Sea Level is a scene-wide setting that determines the Y-position of the water plane in the scene. This is a fairly important setting because the position of the water plane has a high impact on the overall look of the terrain and spawner settings can be dependent on the sea level as well. When you change the sea level here, it will be changed in all other tools as well automatically.
    If you have not created water yet, you will see a blue sea plane preview in the scene until the actual water is being created from the Gaia Manager.

    The Mask Settings Stack allows you to reduce the impact of the operation to a certain area according to the masks you add here. Masking is a complex topic that has its own article in the knowledge base: Using Masks In Gaia

    Note that using masks in the stamper is a very versatile feature: It allows you to greatly influence the look of your stamps and even create new stamps of your own, e.g. by mixing two different stamp images.

    5. Operation Types

    The available operation types are:

    5.1 Raise Height

    image.png

    This operation will raise the terrain height in the shape of the source stamp image. This operation will only raise the existing terrain, parts of the stamp preview that go under the existing terrain height will simply be ignored. You can use this to your advantage to create mountain peaks on an existing terrain without worrying about creating a valley elsewhere.

    The operation will take the y-position and scale of the stamper into account - so you can "lift up" the stamp preview or scale it up to create a steeper terrain feature.

    Parameters:
     

    image.png

    5.2 Lower Height


    image.png
     

    This operation will lower the terrain height in the shape of the source stamp image. This operation will only lower the existing terrain, parts of the stamp preview that go higher than the existing terrain height will simply be ignored. You can use this to your advantage to create valleys or chasms in the terrain without worrying about creating a mountain elsewhere.

    The operation will take the y-position and scale of the stamper into account - so you can "lift up" the stamp preview or scale it up to create a steeper terrain feature.

    Please Note: Make sure the stamper is positioned low enough on the y-axis so that the operation has an effect on the terrain - with this operation it is easy to have the stamper positioned in such way that it looks like the preview would not be working (when in reality the stamper is so high above the terrain that it simply does not show any effect at this height)

    Also note that mountain stamps are generally unsuitable for that operation, but you can turn any mountain into a valley for the sake of this operation by clicking the "Invert" button on the strength transform:"

    image.png

    Parameters:

    image.png

    5.3 Blend Height

    image.png
     

    This operation will blend in the stamp shape with the height of the existing terrain. You can freely adjust the strength of this blend operation to favor the shape of the existing terrain vs. the "new" shape from the stamp image.


    Please Note: You can lift up the stamper, but the blending effect works best if you use the "Fit To Terrain" button to sync the stamper with the terrain dimensions / height.

    Due to the nature of the operation, this will usually affect the entire terrain unless you use masks to restrict the operation to a certain area of the terrain only, e.g. with a distance mask.

    Parameters:


    image.png

    5.4 Mix Height

    image.png

    This operation is similar to the blend operation since it mixes a stamp image with the existing terrain, but has a very different impact overall. It allows you to:

    * select a stamp image
    * select the mid point of the stamp image (where 0 is the lowest, 1 the highest point of the stamp)
    * transfer all areas of the stamp that are above that midpoint as height addition to the existing terrain, while all areas below that midpoint will be subtracted from the existing terrain.


    This operation can be useful to add more interesting features to plain parts of your terrain (granted you can mask those plain parts down with a fitting mask in the stamper. Due to the nature of the operation, this will usually affect the entire terrain unless you use masks to restrict the operation to a certain area of the terrain only, e.g. with a distance mask.

    Parameters:

    image.png

    5.5 Set Height

    image.png

    This operation will set the terrain to the shape of the supplied stamp image at the given height- with 0 consideration for the existing terrain. This is useful when you want to apply the shape of a stamp 1:1 to the terrain without keeping any of the existing terrain height.


    Due to the nature of the operation, this will usually affect the entire terrain unless you use masks to restrict the operation to a certain area of the terrain only, e.g. with a distance mask.

    Parameters:

    image.png

    5.6 Add Height

    image.png

    This operation will add the heights in the supplied stamp image on top of the terrain shape of the existing terrain.

    Parameters:

    image.png

    5.7 Subtract Height

    image.png

    This operation will subtract the heights in the supplied stamp image from the terrain shape of the existing terrain.

    Parameters:

    image.png

    5.8 Transform Height

    image.png

    This operation allows you to shift the heights of the existing terrain around - you can turn mountains into valleys, or tune the steepness of your terrain. To do so, you can use the transform curve.
     

    You can read this curve as follows:
    The X axis represents the terrain height before the transformation, the value on the Y axis represents the terrain height after the transformation. In other words, the left side of the curve window represents the lower parts of the terrain, the right side the highest parts, and the green curve that runs over it represents how high or low these parts will be after the transformation.

    A straight line upwards from 0 to 1 would mean no changes to the existing terrain, while a straight line downwards would mean the inversion of the current terrain height.

    If you are still unsure how this curve works, double click in the curve to create a few extra nodes and adjust their height - you can see the outcome in the preview directly, and you are making no changes to your terrain yet as long as you don't stamp.

    Note that this operation needs some diversity in terrain height first to make sense, you will not get any meaningful results on a flat terrain.

    Parameters:

    image.png

    5.9 Power Of

    image.png

    This operation will apply the mathematical Exponentiation / "Power Of" function to the existing terrain height. This can be useful to make your complete terrain steeper or more moderate.

    Parameters:

    image.png

    5.10 Smooth

    image.png

    This operation will apply smoothing to the existing terrain, removing smaller terrain features to return a more even and smooth surface.

    Please note that at a certain blur radius you might be seeing artifacts in the preview / on the terrain, in this case it might be better to apply the smooth operation multiple times with a smaller blur radius instead.

    Keep in mind that you can limit where this operation is being applied by using a mask, you can smooth out beaches by applying a height mask while keeping the mountains higher up intact.

    Parameters:

    image.png

    5.11 Contrast (Gaia Pro only)

    This operation will increase the height difference in opposing terrain features, increasing the "ruggedness" of the terrain. Thanks to the feature size slider you can decide whether to concentrate on smaller nooks and crannies on the terrain, or target bigger features only.

    Parameters:

    image.png

    5.12 Sharpen Ridges (Gaia Pro only)

    This operation will sharpen the ridges on mountain backs, or can turn softer hills into dunes / mountains.

    Parameters:

    image.png

    5.13 Terraces (Gaia Pro only)

    This operation will turn the terrain into flat terraces at fixed height levels. This can be useful when your gameplay requires rather flat areas, or you want to make a plateau style terrain. The terrain that comes out of this operation looks rather artificial, but can be made more natural by other follow-up operations (e.g. Smoothing, mixing a stamp in with "Mix Height")

    Parameters:

    image.png

    5.14 Hydraulic Erosion(Gaia Pro only)

    This operation will simulate the flow of water and the terrain changes due to erosion on your terrain.

    Parameters:

    image.png

    6. Advanced Stamper Features

    In the Advanced Panel of the Stamper you can find settings for the stamper appearance in the scene view, plus additional features for more advanced users.

    6.1 Appearance / Gizmos / Tools

    image.png

    This panel mostly holds settings that control the stampers appearance in the scene view, but also the "Base Level" feature. The settings are as follows:

    Auto Load Terrains: Controls if and how the stamper should load terrain tiles within its range of influence. This is only relevant for the Terrain Loading feature in Gaia Pro, without terrain loading you can ignore this setting.

    Show Bounding Box: Displays a blue bounding box around the stamper's area of influence in the scene view.

    Base Level Settings: The Base Level Feature allows you to "cut off" the lower part of the stamp to only apply the more prominent, higher features to the terrain.

    Please Note: This feature is only available for select stamper operations. (e.g. for blend height, mix height, set height it is not available and will be inactive in the GUI)

    The Base Level feature is best explained in an example. Imagine you have a mountain stamp:

    image.png


    A Base Level setting of 0.5 would cut it off at half its height, replacing all lower parts with a flat base socket:

    image.png

    If you did not want to stamp the base on the terrain, you can remove the flat base by disabling the "Stamp Base" setting:

    image.png

    Depending on the Y-Position of the Stamper there can be a significant gap between terrain and the feature that you cut out with the base setting. Using the "Adaptive Base" feature fixes that by closing the gap and "sticking" the feature directly on the terrain below:

    image.png

    Last but not least the remaining "Show Base" setting disables the red plane in the scene view which serves as a visual representation of the height of Base Level

    Please Note: You can also use this feature for to cut out pits / valleys from stamps the same way for the "Lower Height" operation mode.

    The last two remaining settings in the Advanced Panel are related to visualizing the current Sea Level.

    Show Sea Level Plane: Displays a transparent blue plane where the sea level will be in the final scene. (As soon as you create water from the Gaia Manager the water plane will be created at this height)

    Sea Level In Stamp Preview: Displays the underwater portions of the stamp preview in a blueish tone if enabled. This makes it easier to recognize which parts of the sea level will be under water. The color of this tint can be changed in the Gaia Settings.

    6.2 Auto Triggers

    image.png

     

    Auto Triggers are Spawners or Mask Map Exporters (Gaia Pro) that are triggered automatically whenever you stamp the terrain. 

    Auto Spawners

    Usually it is convenient to run the texture spawners after stamping as it gives you a quick first impression how your final terrain will look like. To switch on and off an auto-spawner, just click the checkbox on the left side of the entry. You can add or remove entries to the list with the "+" and "-" button on the bottom right of the list. Note that you can only add references to spawners that exist in the scene hierarchy.
    The "Area" selection on the top right corner allows you to switch the area that will be auto-spawned: "Local" will run the spawner only in the influence area of the stamper, "Global" will always populate the entire scene. When working with a large scene usually selecting "Local" is enough to get a good first impression of the stamped terrain as selecting "Global" might take a longer time to spawn the entire scene after each stamp.

    There are multiple ways to influence / set up the list for auto-spawners:

    You can control the setup for the auto-spawners in the stamper before creation from the Advanced Biome Settings in the Gaia Manager Tools tab:

    image.png

    Click the "S-Checkbox" to activate the spawner in question for auto-spawning. This choice will be remembered for future usage of that biome.
    While the stamper is set up, you can adjust the list by editing it manually, adding and removing or deactivating entries. If you are using multiple biomes in your scene, you can add all spawners that are part of that biome to the spawner with a button on bottom of the Biome Spawner list:

    Auto Mask Map Exports

    image.png
     

    The Mask Map Exports are a Gaia Pro feature that allow you to export terrain information into an image so it can be used in a different subsystem by a script, or a shader, etc. You can choose to automatically run that mask map exporter every time you stamp the terrain in a similar fashion as you would with the texture spawner. You currently need to set this up manually by adding another entry to the list with the small "+" button in the lower right corner of the list, and then set the reference to the mask map exporter in the scene.
    The selection for "Local" and "Global" on the top right side of the list works in a similar fashion as for the texture spawners: "Local" will export the current terrain the stamper is positioned over when stamping, "Global" will perform a mask map export for all terrains in the scene.

    6.3 Save Settings / Export


    image.png

     

    This section on the UI lets you save the Stamper Settings so you can use them again in a different scene / project, and offers options to export the current stamper setup or the terrain as a reusable stamp.

    Save and Load Settings


    Use the "Load From File..." and "Save To File..." buttons to save the stamper settings as an asset file into your project. You can then load up the saved settings any time from the same or another stamper. It is also possible to copy this file over in another project to carry over stamper settings between projects.

    Stamp Preview & Export

    image.png

    This panel shows the current operation as a stamp image - this includes the operation and all the mask data that currently contributes to the shape of the stamp preview in your scene. You can save this image as a reusable stamp. This allows you to remix or create stamp images of your own. You can for example combine different noise masks, and if you like the result, you can save this as a re-usable stamp image.

    The "Export Terrains as Stamp" button does a very similar thing, but instead exports all terrains of the scene as stamp images.

    To sum it up again, use the "Export Operation as Stamp" button if you want to export what you currently see in the stamp preview, and the "Export Terrain(s) as Stamp" when you want to export the terrains as they are in the scene.

    Using the Undo Feature

    The stamper tool comes with an undo feature which allows you to quickly turn back changes on the terrain heightmap.

    image.png
     

    To use this feature, make sure you have the "Record Undo" checkbox activated - this will record the heightmap states as you are using the stamper. If you want to Undo a step, you can use the Undo and Redo buttons to step through the previously recorded operations.

    The undo feature has some limitations:

    - The undo data on the stamper will not survive closing the scene or a recompilation of scripts - you should not rely on the data being persistent, but rather use the undo feature while you are using the stamper until you are satisifed with the result.

    - Undo / Redo will not influence the terrain texturing

    - When using the stamper in a multi-terrain scene, undo and redo will only work within the same collection of terrains that were influenced by an operation. If you e.g. record 5 undo steps in one corner of the world, click undo twice and then continue stamping in a different corner of the world, this will result in the first three undo steps being lost, since they are part of a different collection of terrains.

    image.png

    image.png

    image.png

    • Like 2

    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...