Painting Objects In Unreal Engine 4: A Step-By-Step Guide

how to paint an obj in unreal engine 4

Unreal Engine 4's Paint Mode allows users to adjust the colour and texture of their Mesh's Materials. To use Paint Mode, the Mesh's Material must contain a Vertex Colour node, which is how vertex colour data is passed from the Mesh to the Material. Paint Tools are similar to Sculpting Tools but are used to manipulate the weight of layers instead of the heightmap. There are two kinds of layer info objects: Weight-Blended and Non Weight-Blended. Painting a weight-blended layer will decrease the weight of all other weight-blended layers. For example, painting mud will remove grass, and painting grass will remove mud.

Characteristics Values
Painting mode Choose the layer you want to paint and paint additively instead of painting layers away
Layer info object Every landscape layer must have a layer info object assigned to it or it cannot be painted. There are two kinds: Weight-Blended and Non Weight-Blended
Weight-Blended layers Painting a weight-blended layer will decrease the weight of all other weight-blended layers. E.g. painting mud will remove grass, and vice-versa
Non Weight-Blended layers Painting a non weight-blended layer does not affect the weights of the other layers. These are used for more advanced effects, such as blending snow onto other layers
Mesh Paint mode A quick way to adjust colour and texture on your Mesh's Materials
Mesh Paint system requirement The Mesh's Material must contain a Vertex Colour node to pass vertex colour data from the Mesh to the Material

cypaint

Mesh Paint Mode

The Mesh Paint Tool is a brush-based system, allowing customisation of brush settings to cater to wide areas or fine details. Users can adjust settings based on vertex density to ensure precise colour application. The Mesh Paint panel provides easy access to various mesh painting methods, tools, and settings, enhancing the overall painting experience.

To activate Mesh Paint Mode, users need to select "Mesh Paint" from the Modes dropdown selection in the main toolbar of the level viewport. Once activated, the Mesh Paint panel becomes accessible, offering a range of painting methods and their respective tools and settings. It is important to note that certain features, such as translating and scaling, are disabled while Mesh Paint Mode is active.

cypaint

Weight-Blended Layers

When creating a Landscape Layer in Unreal Engine 4, you have the option to choose between a "Weighted (normal)" Layer and a "No Weight-Blend" layer.

The Weight-Blended Layers are the most commonly used type of layer info object. Painting a weight-blended layer will decrease the weight of all other weight-blended layers. For example, painting mud will remove grass, and painting grass will remove mud.

Non-weight-blended layers, on the other hand, do not affect the weights of the other layers. These are used for more advanced effects, such as blending snow onto other layers. Instead of having grass, mud, rock or snow, you would use a non-weight-blended snow layer to blend between "grass, mud, or rock" and "snowy grass, snowy mud, or snowy rock."

To create a layer info object, you can either create it from the layer itself or reuse an existing layer info object from another Landscape. Every Landscape layer must have a layer info object assigned to it; otherwise, it cannot be painted.

The Landscape Layer Blend node blends together multiple per-layer values, such as texture samples or materials. Layers with higher blend weights have more influence on the blended result. By chaining multiple Landscape Layer Weight nodes together, you can produce a weighted sum that blends between the specified layers.

cypaint

Non Weight-Blended Layers

When creating a landscape layer in Unreal Engine 4, you have the option to choose between a "Weighted (normal)" Layer and a "No Weight-Blend" layer. Painting a weight-blended layer will decrease the weight of all other weight-blended layers. For example, painting mud will remove grass, and painting grass will remove mud. This is the most commonly used type of layer info object.

On the other hand, painting a non-weight-blended layer does not affect the weights of the other layers. These are used for more advanced effects, such as blending snow onto other layers. For instance, instead of having grass, mud, rock or snow as separate layers, you would use a non-weight-blended snow layer to blend between "grass, mud, or rock" and "snowy grass, snowy mud, or snowy rock".

To paint textures on different Landscape Layers, it is important to understand the differences between Blend Types (LB Weight Blend, LB Height Blend, and LB Alpha Blend) and the difference between Layer Infos (Weight-Blended Layer Normal and Non Weight-Blended Layer). When assigning a Layer Info for a texture, choose "No Weight-Blend". If you use LB Weight Blend or LB Height Blend and Layer Info is set to Weight-Blended Layer (Normal), then the effect will not be what you intend.

When using the LB Height Blend mode for multiple Landscape layers, you may encounter black spots where different layers meet. This occurs because the layers are simultaneously given a 0-height value, resulting in a blend factor of 0 for each layer. To address this, paint the area with a material that has a non-zero weight.

The Landscape Layer Blend node blends together multiple per-layer values, such as texture samples or materials. Layers with higher blend weights have a greater influence on the blended result. You can use the Landscape Layer Weight node to access layer weights and implement custom blending solutions in the material graph. By chaining multiple Landscape Layer Weight nodes, a weighted sum can be produced, blending between specified layers.

cypaint

Vertex Colour Node

When painting an OBJ in Unreal Engine 4, you will need to use a Vertex Colour Node. This is because every item in Unreal Engine has a Material, which is where the shaders and their technical details are packaged. Without this, the engine would not be able to render the object.

The Vertex Colour Node is added to the Base Colour, and you can optionally plug a constant into Roughness to tweak the settings. This will give you a lightweight shader. If you want something even more lightweight, you can lose all lighting and shadow by setting the Material to Unlit.

To get the vertex colours to work, you need to intercept the Base Colour connection and multiply it by a Vertex Colour expression's RGB value. Within the commented area, you will see where you have added a Multiply node and a corresponding Vertex Colour node.

There are an infinite number of ways to use the colours from a Vertex Colour material expression. You can keep things simple and multiply the colours into an existing material. This allows you to have the original texture in place but tint it with the Mesh Paint tool.

cypaint

Landscape Edit Layers

To use Landscape Edit Layers, you must first create a new landscape. You cannot add layers to an existing landscape retroactively. When creating a new landscape, check "Edit Layers" under the "Manage" tab. You will then be able to add new layers by right-clicking on the existing layer and selecting "Create". You can also rename layers from this menu, which is recommended so that you can keep track of which is the base layer and which are the additional layers.

There are two types of layer info objects: Weight-Blended and Non Weight-Blended. Painting a weight-blended layer will decrease the weight of all other weight-blended layers. For example, painting grass will remove mud, and vice versa. Non Weight-Blended layers do not affect the weights of other layers and are used for more advanced effects, such as blending snow onto other layers.

You can also reserve a layer for splines, which enables you to add and edit splines non-destructively. This means that you can edit, change, and move splines, and the landscape will terraform automatically.

Frequently asked questions

Painting a weight-blended layer will decrease the weight of all other weight-blended layers. For example, painting grass will remove mud, and vice versa. Non weight-blended layers do not affect the weights of other layers. They are used for more advanced effects, such as blending snow onto other layers.

You can create layer info objects from the Landscape panel. Every Landscape layer must have a layer info object assigned to it, or else it cannot be painted.

Instead of painting layers away, choose the layer you want to paint in its place and paint that additively.

Mesh Paint mode provides a quick way to adjust colour and texture on your Mesh's Materials. It requires the Mesh's Material to contain a Vertex Colour node, as this is how the vertex colour data is passed from the Mesh to the Material.

Written by
Reviewed by

Explore related products

Share this post
Print
Did this article help you?

Leave a comment