Texture Painting

From Serious Sam Wiki
Revision as of 14:13, 1 May 2016 by Innocentive (Talk | contribs) (changed category)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Painting

Creating test mesh

Insert static model ("Ins"). Enter mesh editing mode ("E"). Create box primitive ("Shift+X") and drag out the quad while holding the Ctrl key.

Preparing texture

Assign shader to the model: hold Ctrl+Alt and click LMB while mouse is over the model. Open polygon map named "Default". Select New->Shader Preset. Add one configuration by clicking onto "+" button. Browse standard shader. Under property named "base texture" select New->Static texture. Save the newly created texture by left clicking onto "local" and selecting "Save". Copy the link to the texture ("Ctrl+C"), we will need texture link later to tell paint tool what is our target texture. Open texture properties (press onto "+" in front of the texture name) and adjust width and height of the texture to your preference (e.g. 256x256). Select "Texture" under base uvmap property.

Note:  Texture dimenstions should be of power of 2 (2,4,8,16,....128,256,512,1024...)

Paint tool setup

Activate paint tool ("N"). Turn on tool properties ("Q"). Make sure that paint operation is "Texture RGBA", brush mode is "Blend". Click onto "Paint texture" property and paste texture link. Turn on texture vertex map mode (select buttons "VM" and "T") and select "Default" UV map. That's the UV map that will be used to define how 3D geometry we will be painting on is "mapped" onto newly created 2D texture (or vice versa, how 2D texture is wrapped over 3D geometry).

Hint:  It is handy to turn off auto exposure feature while painting ("Alt+Shift+A")

Paint tool shortcuts

    • "Alt+B" toggles brush/colors palette
    • "[" and "]" or "Ctrl+Shift+mouse wheel up/down" change current paint brush
    • "Ctrl+Shift+LMB" sizes brush
    • "Ctrl+mouse wheel up/down" cycles paint channels what is useful when painting crumbs or multilayer shader masks
    • "T" selects texture RGB painting
    • "Y" selects alpha channel painting
    • "D" selects vertex displace painting mode
    • "S" selects vertex smoothing mode
    • "mouse wheel up/down" changes opacity (power) of the brush
    • "mouse wheel click" toggles brush shape display
    • while holding "Ctrl" you will paint using background color


Warning::  There is no undo operation for the texture painting!
Hint:  There are two handy tool options that can help you yo paint only certain parts of the mesh: "Ignore backface polygons" (if you want to paint over foward facing polygons) "Only selcted" that will paint only over the selected polygons
Hint:  Compressed texture formats slow down painting process significantly because texture has to be compressed after each brush stamp operation, so keep textures uncompressed while painting.
Example:  Simple level that you can use to play with painting tool. File:Painting01.gro