Blender: Dynamic Paint GuideCreation date: 2010-10-7
Last update: 2010-12-1
Dynamic Paint is a new tool for Blender I've been working on. It allows you to "paint" animated textures with other objects and particles. This guide explains what all those settings are for.
If you are new to Dynamic Paint and don't know how to get started, you should read my Dynamic Paint Basics tutorial. It should help you to get started. This guide helps you to fully use this feature.
Dynamic Paint isn't currently part of official Blender, so you have to use a special build that has it. You can download a Windows build and code patch from MiikaHweb Blender Builds page. GraphicAll.org has some builds for other OS. Check out my blog for more info about Dynamic Paint.
Note: This article isn't currently up-to-date with latest development. Some features may differ or be missing.
Tutorial contents1. Canvas: Main Settings
2. Canvas: Output Types
3. Canvas: Advanced Settings
4. Paint: Main Settings
5. Paint: Advanced Settings
6. Info and Samples
"Resolution" defines outputted texture dimensions. For example using 256 will lead to 256x256 image output. Doubling the resolution will likely quadruple baking time and vice versa.
"Antialiasing" does smoothen paint edges using a 5x multisampling method. It will also slightly increase baking time.
"Substeps" are extra frames calculated between "real" frames. This helps getting a smooth paint flow on fast moving objects, but also directly multiplies baking time.
For example if you set one substep, Dynamic Paint will calculate one extra sample between each frame, calculating following frames : 1.0, 1.5, 2.0, 2.5 etc. But only saves whole frames.
|This video shows a paint map of a fast moving object without substeps:||And now with 5 substeps:|
Frame "Begin" and "End" values can be used to define baking start and end frames.
"Bake Dynamic Paint" starts the baking process. Canvas must be UV-unwrapped and scene must have at least one active paint object. You can see bake process at console window and on mouse cursor. Pressing ESC will stop the bake.
Dynamic Paint system can output three different texture types: paint maps, wetmaps and displacement maps.
Paint map is the "color texture". It shows paint color and alpha.
"Premultiply Alpha" makes color values to be multiplied by alpha while saving the texture. This is usually recommended to be turned on.
This video shows how paint map looks like:
When added as a texture to the canvas object: you get paint colors.
Texture influence settings used in that render:
Wetmap is a black-and-white texture that visualizes paint wetness. White being maximum wetness, black being completely dry. Paint dries within defined time period. Some "paint effects" affect wet paint only.
Basically wetmap equals to a paint map of white paint with fading enabled. It is a separate output because you usually want to use both paint map and wetmap simultaneously.
This video shows a wetmap:
If you set wetmap to influence normal, specular and ray mirror, render should look something like this:
An example of wetmap influence settings:
If you use both paint map and wetmap, you can easily get a nice looking paint surface. You can also use any output texture as a mask for Blender's procedural textures etc. So keep playing with different combinations and you can get any kind of results.
Displacement map is a texture supposed to be used with "Displace" modifier or with texture displace. It is sort of depth map visualizing distance (or depth) of paint object intersection.
"Strength" value defines how deep intersection is considered as maximum displacement. Use same value on displace modifier strength or on texture displace "scale" value.
"Type" drop-box defines output texture type: "Displace" is the standard type used by Blender, it's directly compatible with Blender displace tools.
You can also choose output file format between PNG and OpenEXR. OpenEXR is a 32-bit per channel floating point texture, so displace result is likely be smoother when using it. You need, however, a build that supports OpenEXR.
This is an example of a dispalce texture:
And this is how it looks like when used to displace a mesh. Remember that you have to subdivide the mesh before you can displace it:
These texture influence and displace map output settings were used in the previous render:
Please note that enabling more output types doesn't cause a noticeable increase in bake times. So there is no need to disable texture outputs in terms of saving in bake times.
First three sliders let you to define paint drying, fading and flattening behavior. "Time" value defines number of frames it takes to revert from maximum value to zero. "Slow" drying enables logarithmic drying. Basically it makes high wetness to dry faster than low wetness.
Enabling "Paint Fade", makes paint to fade or disappear during time. "Flatten Displace" makes displace map to flatten back to zero depth during time.
"UV Layer" can be used to define the used UV-layer. If not defined or if mesh only has one layer, the active one is used.
"Paint Effects" is a Dynamic Paint sub-tool that generates animated movement on canvas surface.
In the "Effect" drop-box you can select different effects. This menu only defines which effect related settings are visible. To enable an effect, click the "Do Effect" checkbox below. You can also tweak effect speed from the value below.
"Spreading" makes wet paint to spread on mesh surface. Only wet paint moves, so as the paint dries, it's movement slows down and eventually stops.
This is how spreading effect looks like:
"Dripping" is similar to spreading effect, but only moves paint in gravity direction.
This is how dripping effect looks like:
"Shrinking" makes paint to disappear from edges, eventually completely vanishing.
This is how shrinking effect looks like:
Effect system is far from perfect, but it works well enough for most scenarios. You should try to unwrap UVs to as large pieces as possible and have at least two pixel space between each UV island. If you still experience strange behavior near UV island edges, try to use higher canvas resolution.
"Affect Paint" checkbox defines whether that paint object affects paint or wetmaps.
Paint Color selection box allows you to select color this object paints on color map.
Paint Alpha is the transparency of the paint. 1.0 means completely solid, while 0.0 is invisible.
"Use object material" makes Dynamic Paint to use the paint object material instead. Material and all it's textures are included. Final color equals the shadeless render color of the object. "Paint Alpha" value is used to multiply the material alpha value so you can still manually adjust the paint final alpha. You can even use alpha values greater than 1.0 to amplify faint textures etc.
Material can be either "Surface" or "Volumetric" type. All texture types are supported, but only those texture "Mapping" settings that don't require a camera.
This is an example of textured painting:
When using surface type materials, paint color is defined by the material diffuse color and alpha by material alpha. Following texture mapping types are supported. Other mapping methods will be simply ignored.
In case of a volumetric material, paint color is sampled from the volume at the exact point of the canvas pixel. Material "Transmission color" is used as paint color and "Density" as paint alpha.
To paint with smoke, you just have to use the smoke domain as a paint object. Just remember that domain has to have a renderable volumetric material.
"Absolute Alpha" defines how transparent paint is handled. When enabled, texture alpha will never go higher than the defined "Paint Alpha". Without it however, texture alpha is increased every frame, eventually leading to completely solid paint surface.
"Wetness" defines how wet the paint is. Basically how it's shown on the wetmap. Wetness is multiplied by paint alpha, so you can use textured painting but only get wetness on actually painted areas.
"Erase Paint" setting inverts the way paint object behaves. Making it to remove paint instead of adding it. You can use paint alpha to define erase strength. High alpha leads to more paint being erased.
You can also use textures on eraser. Just remember that alpha is what matters, not color.
Here is a comparison between textured and non-textured eraser: First a plain one.
And now with a noise texture affecting material alpha. Please note that you need lots of substeps to get a smooth track.
"Affect Displace" defines whether this object affects displace texture.
From the "Paint Source" list you can select how paint mesh intersection is handled or whether to use particles instead.
This is the default behavior. It makes Dynamic Paint to use mesh volume as paint source. Basically every pixel inside the paint object mesh will be painted. Object mesh has to be closed and have proper normals.
Mesh volume painting. Only pixels inside the paint mesh will be painted.
Mesh Proximity is used to paint with a distance to the mesh surface. You can define distance to paint with using the "Paint Distance" settings. This is the maximum distance to mesh surface to affect paint.
Proximity painting. Only pixels withing the defined distance to the paint mesh surface are painted. Notice how some areas inside the mesh are unaffected by the paint.
From the "Falloff" drop-box you can change proximity falloff type.
- "Sharp" paints solid paint within the defined distance.
- "Smooth" makes paint to linearly fade out until becoming completely invisible when it reaches the maximum distance.
- "Color Ramp" allows you to manually make a custom falloff behavior.
When using a color ramp falloff, the left side is color at right next to the paint object while right side is the maximum distance.
"Only Use Alpha" makes Dynamic Paint to only read color ramp alpha values. Then paint color remains unchanged.
This is an example of proximity painting. A following falloff color ramp is enabled to better illustrate the effect.
"Face Aligned" sets proximity painting to be processed only in the direction of canvas surface. This way only objects directly in front of the surface will be painted.
Here is an example of face aligned proximity painting using the same color ramp:
Mesh Volume + Proximity
This option enables both volume and proximity checking. Everything inside the mesh volume is painted but also objects within defined distance to the mesh surface.
Mesh volume+proximity painting.
This option can be useful for example when using Fluid simulation domain as a paint object. Fluid barely intersects the obstacles or domain walls so using low distance proximity painting is a good idea.
This option lets you use a particle system as paint source.
From the sliders you can adjust particle influence radius in global units. "Solid Radius" defines the distance, inside which paint is solid color. "Smooth Radius" is an additional radius outside Solid Radius to add a smooth falloff.
If you set "Smooth Radius" to zero, particle will be painted as a solid sphere. If you set "Solid Radius" to zero, it gets painted as a smooth halo.
- Like usually in Blender 2.5x, everything is animatable. This means you can freely animate Dynamic Paint settings. Every setting that accepts key frames can be freely animated to fit your purposes.
- Canvas object and mesh can be freely animated - as long as the vertex count and uv data remains the same.
- Paint object and mesh can be freely animated by all means. There are no limitations what-so-ever.
Here are some downloadable .blend file samples you can use to get started using Dynamic Paint. Please note that baking Dynamic Paint of these sample files may take a while on slower systems.
Paint and wetmaps rendering
This sample shows how to setup materials to render a nice looking paint material using both paint map and wetmap.
Download the .BLEND file.
This sample shows how to use Dynamic Paint to produce interactive displacement maps.
Download the .BLEND file.
Fluid simulation wetmaps
This sample shows how to use fluid simulation as a paint object to produce fluid wetmaps.
Download the .BLEND file.
Painting with smoke
This sample shows how to use smoke simulator domain as a volumetric paint object to paint with the smoke.
Download the .BLEND file.