user: Show practical ways to work with Surface in a Blender add-on or script – include code.

assistant: [image reference removed]

Canvas advanced panel.

From *Surface* panel you can adjust surface type and related settings.

### Surface Type

Each surface has a “type” that defines what surface is used for.

#### Paint

[[image reference removed]](../../_images/physics_dynamic-paint_canvas_surface-type-paint.jpg)

Paint Surface.

Paint is the basic surface type that outputs color and wetness values.
In case of vertex surfaces, results are outputted as Color Attributes.

A wetmap is a black-and-white output that visualizes paint wetness. White being maximum wetness,
black being completely dry. It is usually used as mask for rendering.
Some “paint effects” affect wet paint only.

Dry
:   Completely disable drying is useful for indefinitely spreading paint.

    Color Dry
    :   It can be used to define wetness level when paint colors start to shift to surface “background”.
        Lower values can be useful to prevent spreading paint from becoming transparent as it dries,
        while higher values give better results in general.

#### Displace

[[image reference removed]](../../_images/physics_dynamic-paint_canvas_surface-type-displace.jpg)

Displace Surface.

This type of surface outputs intersection depth from brush objects.

Incremental
:   A new displace is added cumulatively on top of an existing displace.

Max Displace
:   The maximum level of intersection depth, larger values will be clamped to this value.

Displace Factor
:   The multiplier for the intersection depth.
    You can use it to adjust final displace strength or use negative values to paint bumps.

#### Waves

[[image reference removed]](../../_images/physics_dynamic-paint_canvas_surface-type-waves.jpg)

Waves Surface.

This surface type produces simulated wave motion. Like displace,
wave surface also uses brush intersection depth to define brush strength.

Open Borders
:   Allows waves to pass through mesh “edges” instead of reflecting from them.

Timescale
:   Directly adjusts simulation speed without affecting simulation outcome.
    Lower values make simulation go slower and otherwise.

Speed
:   Affects how fast waves travel on the surface.
    This setting is also corresponds to the size of the simulation.
    Half the speed equals surface double as large.

Damping
:   Reduces the wave strength over time. Basically adjusts how fast wave disappears.

Spring
:   Adjusts the force that pulls water back to “zero level”.

Smoothness
:   Limits the maximum steepness of the wave slope between simulation points.
    This greatly helps getting rid of the “noise” that occurs
    when using objects with sharp edges (like cubes) as a brush.
    The default value should be enough to only get rid of the sharpest spikes,
    in order to get even smoother waves use higher values at the expense of reduced detail.

#### Weight

[[image reference removed]](../../_images/physics_dynamic-paint_canvas_surface-type-weight.jpg)

Weight Surface.

This is a special surface type only available for vertex format.
It outputs vertex weight groups that can be used by other Blender modifiers and tools.

### Common Options

For each surface type there are special settings to adjust.
Most types have the settings *Dissolve* and *Brush*:

Dissolve
:   Used to make the surface smoothly return to its original state during a defined *Time* period.

Brush Collection
:   Used to define a specific collection to pick brush objects from.

Influence Scale, Radius Scale
:   For tweaking brush settings individually for each surface.