Search public documentation:
UE3 Home > Unreal Editor & Tools > Mesh Paint Reference
UE3 Home > Level Designer > Mesh Paint Reference
UE3 Home > Level Designer > Mesh Paint Reference
The Mesh Paint tool allows you to paint vertex colors on static meshes interactively in the level viewport.
Most of the vertex paint features are pretty easy to learn, so if you want to jump right in here are the basic steps:
- Activate the Mesh Paint Mode and select your mesh actor
- Make sure the material assigned to your mesh makes use of vertex color or alpha
- Set your paint color and adjust other brush properties appropriately
- While holding down the Ctrl key, click and drag on your mesh to apply paint!
In order to summon and use the Mesh Paint tool you'll need to enter Mesh Paint Mode. Just click the tool bar button on the left panel in the main editor frame. While in this mode, you can still perform most common editor actions like camera movement and selection, but certain features are disabled. Also, you'll notice that your perspective viewport will be forced to real-time mode which is a requirement of this system.
Painting on meshes is easy! The first thing to remember is that you can only paint on selected meshes. This helps you restrict painting to only specific objects, while still allowing you to paint across multiple selected mesh actors if necessary. While Mesh Paint mode is active, selected actors will appear with a crosshair around them instead of the regular selection cue. After selecting one or more meshes, when you move the mouse over them you should see your paint brush! You can think of the paint brush as a cylinder projected along the surface normal of the mesh geometry, centered at the point on the mesh under your cursor. The circular brush outline shows you the radius of the brush. The inner circle shows the brush's falloff (or inner radius.) You probably figured this out already, but the small line sticking out from center of the brush is the mesh surface normal. To paint, hold down the Control key, then click and drag over the mesh's surface. You can also hold down the Shift key to erase instead. Paint will be applied to the surface each time you click, and also each time the mouse position changes (dragging). Also, if brush flow is enabled, paint will be applied every time the scene is rendered. Note that you can only paint in perspective viewport windows. painting mode is set to colors you have these options available:
|"Fills" the mesh or instance being painted using the Paint color, respecting the Channels settings.|
|Copies the vertex colors from the selected instance(s) to the source mesh asset.|
|Imports a .TGA image file to use to populate the vertex colors of the selected instance(s).|
|The color that will be applied while painting (Ctrl + LMB + Drag). A swatch displays a preview of the current color. The color can be set using the Color Picker built-in to the tool.|
|The color to use as your "eraser" color while erasing (Ctrl + Shift + LMB + Drag). A swatch displays a preview of the current color. The color can be set using the Color Picker built-in to the tool.|
|Swaps the Paint color and Erase color.|
|These check boxes set which color/alpha channels should be affected by the paint brush.|
|Radius||The radius of the brush in Unreal units. In addition, the brush has a depth-based falloff that's equal to half of this radius.|
|Strength||Sets the amount of paint to apply each time you click or move the mouse cursor while painting is enabled. Also if brush flow is enabled, a percentage (flow amount) of the brush's strength will be applied to the surface.|
|Falloff||Sets how the brush's strength falls off with distance. A falloff value of 1.0 means that the center of the brush is 100% strong and fades linearly towards the radius of the brush. A falloff value of 0.5 means that the brush is 100% strong half way towards the radius, then falls off linearly. A falloff value of 0.0 means the brush is 100% strong over the entire radius. Note that depth-based falloff is always active, regardless of this setting.|
|Enable brush flow||This option configures the brush to apply paint every single render frame, even when you're not moving the cursor. It yields results similar to an airbrush.|
|Flow amount||When Enable brush flow is turned on, this sets the strength of the brush when paint is applied every render frame, as a percentage of the brush's strength.|
|Ignore back-facing||When enabled, triangles facing away from the camera are ignored and won't be affected by the paint brush.|
|Actor||Paints color data stored in the instance of the static mesh component in the level|
|Mesh asset||Edits the color data stored in the original mesh asset, potentially shared in many levels|
|Copy||Copies the instance vertex color data for the selected mesh. See Sharing Instance Color Data for more information.|
|Paste||Pastes instance vertex color data that was previously copied. See Sharing Instance Color Data for more information.|
|Remove||Discard the data for all selected meshes and restores the default vertex colors.|
|Fix||Attempts to match stored instance data on re-imported meshes with different vertex counts. See Vertex Color Matching for more information.|
- Select the instance that contains the color data to be copied and press the Copy button.
- Select the instance(s) to copy the color data to and press the Paste button.
- The color data should now be applied to all of the instances.
StaticMeshActor_73 (LOD 0) has hand-painted vertex colors that no longer match the original StaticMesh
|Texture count||Configures the blend weight "strategy" by setting the number of textures you're blending between in the material associated with the mesh. When you change this option, the choices available for Paint texture and Erase texture will update. See the section about Blend weight material setup for more information.|
|Paint texture||Selects the texture index to apply each time you click or move the mouse cursor while painting is enabled. (Ctrl+LMB+drag)|
|Erase texture||The texture index to use as your "eraser" texture while erasing. (Ctrl+Shift+LMB+drag)|
|Off||Restores default editor view mode|
|RGB||Displays static meshes unlit with only RGB vertex colors|
|R||Displays static meshes unlit with only red vertex color|
|G||Displays static meshes unlit with only green vertex color|
|B||Displays static meshes unlit with only blue vertex color|
|A||Displays static meshes unlit with only vertex alpha|
The mesh paint system requires the material of the mesh to contain a VertexColor expression as this is how the vertex color data is passed to the material. Please note that the VertexColor expression does not work if the material also contains a Transform expression unless the bPerPixelCameraVector property of the material is enabled. There are a few example materials provided in
EngineMaterials.upkthat demonstrate possible uses for the Mesh Paint tool. Use the Content Browser to search for TexturePaint or VertexPaint to see these. Here's an example of how you might use the vertex alpha value to blend between two diffuse textures in the material editor.
VertexPaint_2Tex_Color materialwhich can be found in
EngineMaterials.upk. It's an example material that does three special things:
- Modulates diffuse color by the painted vertex color (RGB)
- Blends between two separate diffuse textures (Diffuse, Diffuse2) using the blend weight stored in the vertex alpha channel (A)
- Blends between two separate normal textures (Normal, Normal2) using the blend weight stored in the vertex alpha channel (A)