# Heightmap Import (16 bits Raw/PNG)

## A  blueprint tool in BP folder of ShaderWorld plugin content

Drag and drop in your world the blueprint tool to import heightmaps, located inside ShaderWorld plugin content folder, at the root of the BP subfolder.

Simply Locate Heightmap File you wish to import, currently supported formats are 16 bits RAW and PNG. If your file format is RAW then you need to specify the dimension of the texture as this format does not hold this information. If your file format is PNG the heightmap dimensions should be automatically defined.\
&#x20;       Specify an output folder and a name for the heightmap and then press Import. The output file will split the 16 bits information between two channels. You can use\
BP/ToolBox/UVing/MF\_BicubicPackedHeightmap to make a high quality bicubic read of this heightmap as featured in the Heightmap Brush BP/Brushes/Heightmap/M\_HeightMapBrush<br>

## Heightmap Brush

A  new brush has been added to Shader World: the heightmap brush ! [Youtube Teaser](https://www.google.com/url?q=https://www.youtube.com/watch?v%3DUYwX8Hv_Ego\&sa=D\&source=editors\&ust=1678962649021609\&usg=AOvVaw2ZS5b2IhASMJ_7KGN6fZgH) which showcases a new capability of the brush system: to write into the data layers of the terrain.

While the brush system was previously able to only move the terrain around given the shader deformation defined in the material of the brush (read a texture to make a road, flatten a terrain, add a noise,  etc…) brushes are now able to write into the landscape data layers.

As a reference implementation you can check.. Maps/Map\_Reference !

The landscape BP\_ShaderWorld\_Reference has a dummy data layer named HeightLayer which doesn’t do anything (we could derive the normal map to generate curvature information?!) while the brush BP\_Heightmap\_Brush has specified this precise layer as a target in its Details panel Layer Write tab, as well as provided a material which will draw a flow map into this layer.

Examining BP/Brushes/Heightmap/M\_HeightMapBrush\_layer reveals that the flowmap is read as well as faded away at brush influence radius borders, and used to change the material of the terrain by editing the material ID stored in the Red Channel of the HeightLayer landscape layer. If Flowmap > 0.5 draw material 1, otherwise material 0.

This layer is then read in the landscape material as any layer BP\_ShaderWorld\_Reference: Cached Material, and we use its value to change the index of the material we’re reading from the ground material texture 2D arrays. (GroundDiffuse/GroundORDisp/GroundNormal).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://universgen.gitbook.io/shader-world/fundamentals/kick-start/heightmap-import-16-bits-raw-png.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
