Skip to content

Latest commit

 

History

History
2009 lines (1281 loc) · 41.9 KB

File metadata and controls

2009 lines (1281 loc) · 41.9 KB

Map

.. py:class:: map

Note

This page contains all Map properties references and short descriptions, and the Map definition itself.

Each section has a code block with a script reference and another code block with a Blender Python Data Path to access the value in Python. The map class can be accessed by the following expression, where __item_index__ is an index of a key in the List of Objects, __map_index__ is an index of a key in the List of Maps, :

map = bpy.context.scene.bm_aol[__item_index__].maps[__map_index__]

Further, the map will be mentioned as a reference to the initial Object's Map class.

BakeMaster Map is a BakeMaster List of Maps class unit. The Map is a Property Group holding child properties that are accessed in the Bake Operator.

...
class BM_Item_Map(bpy.types.PropertyGroup):
    ...
map

List of Maps Active Index

.. py:property:: object.maps_active_index

Active List of Maps key index is stored in this value. Not used in the UI.

...
maps_active_index : bpy.props.IntProperty
...
bpy.context.scene.bm_aol[__item_index__].maps_active_index

List of Maps

.. py:class:: maps

List of Maps is a bpy_prop_collection_idprop collection class that contains keys. The key is the Map Property Group class.

...
maps : bpy.props.CollectionProperty
...
bpy.context.scene.bm_aol[__item_index__].maps

Use Bake

.. py:property:: map.use_bake

use_bake defines whether to include the Map in the bake. If False, then the Map is excluded and appears greyed out in the UI.

...
use_bake : bpy.props.BoolProperty
...
map.use_bake

Map Type

Type of the Map Pass as a map bake type. There are 25 different map pass types available and listed in the table below:

PBR-based

  • Albedo
Color image texture containing color without shadows and highlights
  • Metalness
Image texture for determining metal and non-metal parts of the object
  • Roughness
Image texture for determining roughness across the surface of the object
  • Normal
Image texture for simulating high details without changing the
number of polygons
  • Displacement
Height map used for displacing mesh polygons
  • Opacity
Image texture for determining transparent and opaque parts of the object
  • Emission
Image texture for determining emissive parts of the object

Special Masks

  • AO
Ambient Occlusion map contains lightning data
  • Cavity
Image texture map to store small crevice details
  • Curvature
Image texture map to store object edge data
  • Thickness
Ambient Occlusion map that casts rays from the surface to the inside.
Often used for SSS or masking. Note that Thickness is scale-dependent,
meaning the map will be not visible for small-scale models
  • XYZ Mask
Contains data of rays that are casted from a particular axis
  • Gradient Mask
Black and white gradient mask for masking

Default Cycles

  • Combined
Bakes all materials, textures, and lighting contributions except specularity
  • Ambient Occlusion
Ambient Occlusion map contains lightning data
  • Shadow
Bakes shadows and lighting
  • Position
Indicates object parts' location in the UV space
  • Normal
Bakes normals to an RGB image
  • UV
Mapped UV coordinates, used to represent where on a mesh a texture
gets mapped too
  • Roughness
Bakes the roughness pass of a material
  • Emit
Bakes Emission, or the Glow color of a material
  • Environment
Bakes the environment (i.e. the world surface shader defined for the scene)
onto the selected object(s) as seen by rays cast from the world origin.
  • Diffuse
Bakes the diffuse pass of a material
  • Glossy
Bakes the glossiness pass of a material
  • Transmission
Bakes the transmission pass of a material

Baked Maps Examples

Below are presented baked maps of some map pass types:

AO Albedo
ao albedo
Cavity Curvature
cavity curvature
Gradient Metalness
gradient metalness
Normal Position
normal position
Shadow Thickness
shadow thickness
UV XYZMask
uv xyzmask

Tip

As long as adding a new map pass created a completely new instance of a map class, you can have multiple map classes with the same settings, for example:

.. py:property:: map.map_type

    You can bake an unlimited number of Cavity maps for the Object.

...
map_type : bpy.props.EnumProperty
...
map.map_type

Map Output Related Properties

Bake Target

.. py:property:: map.bake_target

Map's bake target, in Image Textures or Vertex Colors. Currently, only Image Textures are supported.

...
bake_target : bpy.props.EnumProperty
...
map.bake_target

Map Denoising

.. py:property:: map.use_denoise

Map's output denoising use. If True, all Object's maps will be denoised and despeckled.

...
use_denoise : bpy.props.BoolProperty
...
map.use_denoise

File Format

.. py:property:: map.file_format

Map's file format, in BMP, PNG, JPEG, TIFF, EXR.

...
file_format : bpy.props.EnumProperty
...
map.file_format

Resolution

.. py:property:: map.res_enum

Map's output resolution.

...
res_enum : bpy.props.EnumProperty
...
map.res_enum

Height Resolution

.. py:property:: map.res_height

If the res_enum value is custom, this property stores custom output image height.

...
res_height : bpy.props.IntProperty
...
map.res_height

Width Resolution

.. py:property:: map.res_width

If the res_enum value is custom, this property stores the custom output image width.

...
res_width : bpy.props.IntProperty
...
map.res_width

Margin

.. py:property:: map.margin

Map's margin value as a bake post-processing filter.

...
margin : bpy.props.IntProperty
...
map.margin

Margin Type

.. py:property:: map.margin_type

Map's margin type, in ADJACENT_FACES, EXTEND.

  • Adjacent Faces - Use pixels from adjacent faces across UV seams
  • Extend - Extend border pixels outwards.
...
margin_type : bpy.props.EnumProperty
...
map.margin_type

Use 32bit Float

.. py:property:: map.use_32bit

Map's 32bit Float color depth usage.

...
use_32bit : bpy.props.BoolProperty
...
map.use_32bit

Use Alpha

.. py:property:: map.use_alpha

Map's Alpha color channel usage.

...
use_alpha : bpy.props.BoolProperty
...
map.use_alpha

Map Source to Target Related Properties

Affect by Source to Target Settings

.. py:property:: map.use_source_target

If Source to Target settings are configured for the Object, each map will display affect by source target property. If it is True, Source to Target settings will affect the Map.

...
use_source_target : bpy.props.BoolProperty
...
map.use_source_target

Map UV Settings Related Properties

UDIM Start Tile

.. py:property:: map.udim_start_tile

UDIM tile index of UDIM tiles baking range. UDIMs' baking range is used for defining UDIM tiles' baking boundaries. The baked result will only affect a specified range of tiles (Start Tile Index - End Tile Index).

...
udim_start_tile : bpy.props.IntProperty
...
map.udim_start_tile

UDIM End Tile

.. py:property:: map.udim_end_tile

UDIM tile index of UDIM tiles baking range. UDIMs' baking range is used for defining UDIM tiles' baking boundaries. The baked result will only affect a specified range of tiles (Start Tile Index - End Tile Index).

...
udim_end_tile : bpy.props.IntProperty
...
map.udim_end_tile

Default Cycles Map Related Properties

Use Direct Pass

.. py:property:: map.cycles_use_pass_direct

Add direct lighting contribution.

...
cycles_use_pass_direct : bpy.props.BoolProperty
...
map.cycles_use_pass_direct

Use Indirect Pass

.. py:property:: map.cycles_use_pass_indirect

Add indirect lighting contribution.

...
cycles_use_pass_indirect : bpy.props.BoolProperty
...
map.cycles_use_pass_indirect

Use Color Pass

.. py:property:: map.cycles_use_pass_color

Color the pass.

...
cycles_use_pass_color : bpy.props.BoolProperty
...
map.cycles_use_pass_color

Use Diffuse Pass

.. py:property:: map.cycles_use_pass_diffuse

Add diffuse contribution.

...
cycles_use_pass_diffuse : bpy.props.BoolProperty
...
map.cycles_use_pass_diffuse

Use Glossy Pass

.. py:property:: map.cycles_use_pass_glossy

Add glossy contribution.

...
cycles_use_pass_glossy : bpy.props.BoolProperty
...
map.cycles_use_pass_glossy

Use Transmission Pass

.. py:property:: map.cycles_use_pass_transmission

Add transmission contribution.

...
cycles_use_pass_transmission : bpy.props.BoolProperty
...
map.cycles_use_pass_transmission

Use Ambient Occlusion Pass

.. py:property:: map.cycles_use_pass_ambient_occlusion

Add Ambient Occlusion contribution.

...
cycles_use_pass_ambient_occlusion : bpy.props.
...BoolProperty

Use Emit Pass

.. py:property:: map.cycles_use_pass_emit

Add emit contribution.

...
cycles_use_pass_emit : bpy.props.BoolProperty
...
map.cycles_use_pass_emit

Map Normal Settings Related Properties

Normal Space

.. py:property:: map.normal_space

Choose a normal space for baking in Tangent, Object.

...
normal_space : bpy.props.EnumProperty
...
map.normal_space

Red Channel Axis

.. py:property:: map.normal_r

Axis to bake in the red channel in +X, +Y, +Z, -X, -Y, -Z.

...
normal_r : bpy.props.EnumProperty
...
map.normal_r

Green Channel Axis

.. py:property:: map.normal_g

Axis to bake in the green channel in +X, +Y, +Z, -X, -Y, -Z.

...
normal_g : bpy.props.EnumProperty
...
map.normal_g

Blue Channel Axis

.. py:property:: map.normal_b

Axis to bake in the blue channel in +X, +Y, +Z, -X, -Y, -Z.

...
normal_b : bpy.props.EnumProperty
...
map.normal_b

Use Smooth Normals Bake

.. py:property:: map.use_smooth_normals

If True, faces smooth normals will be baked. A copy of the object will be made, smooth normals toggled and baked to the object as a Normal map.

Warning

Baking smooth normals for a high-resolution object might cause a freeze when copying.

!DANGER!

There is a known bug for smooth normals baking to crash blender due to STACK_OVERFLOW_EXCEPTION. Please make sure you saved your Blender file before the bake to exclude unexpected data loss.

If Blender keeps crashing but you want to bake smooth normals, try copying the object you want to bake smooth normals for to the new Blender file and restart the bake there.

...
use_smooth_normals : bpy.props.BoolProperty
...
map.use_smooth_normals

Normal Cage

.. py:property:: map.normal_cage

Inflate the active object by the specified distance for baking. This helps matching to points nearer to the outside of the selected object meshes.

...
normal_cage : bpy.props.FloatProperty
...
map.normal_cage

Map Displacement Settings Related Properties

Displacement Subdiv Levels

.. py:property:: map.displacement_subdiv_levels

The subdivision level defines the level of details. Keep as low as possible for optimal performance.

Warning

The higher the subdivision level, the longer it will take to subdivide the object when preparing multires data for Displacement Map Bake.

...
displacement_subdiv_levels : bpy.props.IntProperty
...
map.displacement_subdiv_levels

Map AO Settings Related Properties

Use AO Preview

.. py:property:: map.ao_use_preview

Preview the Map in real-time in the 3D Viewport.

...
ao_use_preview : bpy.props.BoolProperty
...
map.ao_use_preview

Use Default AO

.. py:property:: map.ao_use_default

Bake texture map using default settings.

...
ao_use_default : bpy.props.BoolProperty
...
map.ao_use_default

AO Samples

.. py:property:: map.ao_samples

racing samples count. Affects the quality. Keep as low as possible for optimal performance.

...
ao_samples: bpy.props.IntProperty
...
map.ao_samples

AO Distance

.. py:property:: map.ao_distance

Distance up to which other objects are considered to occlude the shading point.

...
ao_distance : bpy.props.FloatProperty
...
map.ao_distance

AO Black Point

.. py:property:: map.ao_black_point

Shadow point location on the map color gradient spectrum.

...
ao_black_point : bpy.props.FloatProperty
...
map.ao_black_point

AO White Point

.. py:property:: map.ao_white_point

Highlight point location on the map color gradient spectrum.

...
ao_white_point : bpy.props.FloatProperty
...
map.ao_white_point

AO Brightness

.. py:property:: map.ao_brightness

Map Color Brightness.

...
ao_brightness : bpy.props.FloatProperty
...
map.ao_brightness

AO Contrast

.. py:property:: map.ao_contrast

Map Color Contrast.

...
ao_contrast : bpy.props.FloatProperty
...
map.ao_contrast

AO Opacity

.. py:property:: map.ao_opacity

Map Color Opacity relative to a blank color.

...
ao_opacity : bpy.props.FloatProperty
...
map.ao_opacity

AO Use Local

.. py:property:: map.ao_use_local

Only detect occlusion from the object itself, and not others.

...
ao_use_local : bpy.props.BoolProperty
...
map.ao_use_local

AO Use Invert

.. py:property:: map.ao_use_invert

Invert the colors of the Map.

...
ao_use_invert : bpy.props.FloatProperty
...
map.ao_use_invert

Map Cavity Settings Related Properties

Use Cavity Preview

.. py:property:: map.cavity_use_preview

Preview the Map in real-time in the 3D Viewport.

...
cavity_use_preview : bpy.props.BoolProperty
...
map.cavity_use_preview

Use Default Cavity

.. py:property:: map.cavity_use_default

Bake texture map using default settings.

...
cavity_use_default : bpy.props.BoolProperty
...
map.cavity_use_default

Cavity Black Point

.. py:property:: map.cavity_black_point

Shadow point location on the map color gradient spectrum.

...
cavity_black_point : bpy.props.FloatProperty
...
map.cavity_black_point

Cavity White Point

.. py:property:: map.cavity_white_point

Highlight point location on the map color gradient spectrum.

...
cavity_white_point : bpy.props.FloatProperty
...
map.cavity_white_point

Cavity Power

.. py:property:: map.cavity_power

Cavity map color power value.

...
cavity_power : bpy.props.FloatProperty
...
map.cavity_power

Cavity Use Invert

.. py:property:: map.cavity_use_invert

Invert the colors of the Map.

...
cavity_use_invert : bpy.props.FloatProperty
...
map.cavity_use_invert

Map Curvature Settings Related Properties

Use Curvature Preview

.. py:property:: map.curv_use_preview

Preview the Map in real-time in the 3D Viewport.

...
curv_use_preview : bpy.props.BoolProperty
...
map.curv_use_preview

Use Default Curvature

.. py:property:: map.curv_use_default

Bake texture map using default settings.

...
curv_use_default : bpy.props.BoolProperty
...
map.curv_use_default

Curvature Samples

.. py:property:: map.curv_samples

Tracing samples count. Affects the quality. Keep as low as possible for optimal performance.

...
curv_samples: bpy.props.IntProperty
...
map.curv_samples

Curvature Radius

.. py:property:: map.curv_radius

Curvature Edge radius value. Defines how thick the edge is colored.

...
curv_radius : bpy.props.FloatProperty
...
map.curv_radius

Curvature Edge Contrast

.. py:property:: map.curv_edge_contrast

Curvature Edge color contrast value.

...
curv_edge_contrast : bpy.props.FloatProperty
...
map.curv_edge_contrast

Curvature Body Contrast

.. py:property:: map.curv_body_contrast

Curvature Body color contrast value.

...
curv_body_contrast : bpy.props.FloatProperty
...
map.curv_body_contrast

Curvature Use Invert

.. py:property:: map.curv_use_invert

Invert the colors of the Map.

...
curv_use_invert : bpy.props.FloatProperty
...
map.curv_use_invert

Map Thickness Settings Related Properties

Use Thickness Preview

.. py:property:: map.thick_use_preview

Preview the Map in real-time in the 3D Viewport.

...
thick_use_preview : bpy.props.BoolProperty
...
map.thick_use_preview

Use Default Thickness

.. py:property:: map.thick_use_default

Bake texture map using default settings.

...
thick_use_default : bpy.props.BoolProperty
...
map.thick_use_default

Thickness Samples

.. py:property:: map.thick_samples

Tracing samples count. Affects the quality. Keep as low as possible for optimal performance.

...
thick_samples : bpy.props.IntProperty
...
map.thick_samples

Thickness Distance

.. py:property:: map.thick_distance

Distance up to which other objects are considered to occlude the shading point.

...
thick_distance : bpy.props.FloatProperty
...
map.thick_distance

Thickness Black Point

.. py:property:: map.thick_black_point

Shadow point location on the map color gradient spectrum.

...
thick_black_point : bpy.props.FloatProperty
...
map.thick_black_point

Thickness White Point

.. py:property:: map.thick_white_point

Highlight point location on the map color gradient spectrum.

...
thick_white_point : bpy.props.FloatProperty
...
map.thick_white_point

Thickness Brightness

.. py:property:: map.thick_brightness

Map Color Brightness.

...
thick_brightness : bpy.props.FloatProperty
...
map.thick_brightness

Thickness Contrast

.. py:property:: map.thick_contrast

Map Color Contrast.

...
thick_contrast : bpy.props.FloatProperty
...
map.thick_contrast

Thickness Use Invert

.. py:property:: map.thick_use_invert

Invert the colors of the Map.

...
thick_use_invert : bpy.props.FloatProperty
...
map.thick_use_invert

Map XYZ Mask Settings Related Properties

Use XYZ Mask Preview

.. py:property:: map.xyzmask_use_preview

Preview the Map in real-time in the 3D Viewport.

...
xyzmask_use_preview : bpy.props.BoolProperty
...
map.xyzmask_use_preview

Use Default XYZ Mask

.. py:property:: map.xyzmask_use_default

Bake texture map using default settings.

...
xyzmask_use_default : bpy.props.BoolProperty
...
map.xyzmask_use_default

XYZ Mask Use X

.. py:property:: map.xyzmask_use_x

Enable/disable X coordinate mask filter. When enabled, each polygon of the object that is visible under the specified Axis Perspective View will be occluded.

...
xyzmask_use_x : bpy.props.BoolProperty
...
map.xyzmask_use_x

XYZ Mask Use Y

.. py:property:: map.xyzmask_use_y

Enable/disable Y coordinate mask filter. When enabled, each polygon of the object that is visible under the specified Axis Perspective View will be occluded.

...
xyzmask_use_y : bpy.props.BoolProperty
...
map.xyzmask_use_y

XYZ Mask Use Z

.. py:property:: map.xyzmask_use_z

Enable/disable Z coordinate mask filter. When enabled, each polygon of the object that is visible under the specified Axis Perspective View will be occluded.

...
xyzmask_use_z : bpy.props.BoolProperty
...
map.xyzmask_use_z

XYZ Maks Coverage

.. py:property:: map.xyzmask_coverage

Map range of coverage. The higher the coverage value, the larger the occluded area against its initial area.

...
xyzmask_coverage : bpy.props.FloatProperty
...
map.xyzmask_coverage

XYZ Mask Saturation

.. py:property:: map.xyzmask_saturation

Map color saturation value.

...
xyzmask_saturation : bpy.props.FloatProperty
...
map.xyzmask_saturation

XYZ Mask Opacity

.. py:property:: map.xyzmask_opacity

Map Color Opacity relative to a blank color.

...
xyzmask_opacity : bpy.props.FloatProperty
...
map.xyzmask_opacity

XYZ Mask Use Invert

.. py:property:: map.xyzmask_use_invert

Invert the colors of the Map.

...
xyzmask_use_invert : bpy.props.FloatProperty
...
map.xyzmask_use_invert

Map Gradient Mask Settings Related Properties

Use Gradient Mask Preview

.. py:property:: map.gmask_use_preview

Preview the Map in real-time in the 3D Viewport.

...
gmask_use_preview : bpy.props.BoolProperty
...
map.gmask_use_preview

Use Default Gradient Mask

.. py:property:: map.gmask_use_default

Bake texture map using default settings.

...
gmask_use_default : bpy.props.BoolProperty
...
map.gmask_use_default

Gradient Mask Type

.. py:property:: map.gmask_type

Map Style of color blending.

  • Linear - Create a linear progression
  • Quadratic - Create a quadratic progression
  • Easing - Create progression easing from one step to the next
  • Diagonal - Create a diagonal progression
  • Spherical - Create a spherical progression
  • Quadratic Sphere - Create a quadratic progression in the shape of a sphere
  • Radial - Create a radial progression
...
gmask_type : bpy.props.EnumProperty
...
map.gmask_type

Gradient Mask X Location

.. py:property:: map.gmask_location_x

Gradient location by the local axis X.

...
gmask_location_x : bpy.props.FloatProperty
...
map.gmask_location_x

Gradient Mask Y Location

.. py:property:: map.gmask_location_y

Gradient location by the local axis Y.

...
gmask_location_y : bpy.props.FloatProperty
...
map.gmask_location_y

Gradient Mask Z Location

.. py:property:: map.gmask_location_z

Gradient location by the local axis Z.

...
gmask_location_z : bpy.props.FloatProperty
...
map.gmask_location_z

Gradient Mask X Rotation

.. py:property:: map.gmask_rotation_x

Gradient rotation by the local axis X.

...
gmask_rotation_x : bpy.props.FloatProperty
...
map.gmask_rotation_x

Gradient Mask Y Rotation

.. py:property:: map.gmask_rotation_y

Gradient rotation by the local axis Y.

...
gmask_rotation_y : bpy.props.FloatProperty
...
map.gmask_rotation_y

Gradient Mask Z Rotation

.. py:property:: map.gmask_rotation_z

Gradient rotation by the local axis Z.

...
gmask_rotation_z : bpy.props.FloatProperty
...
map.gmask_rotation_z

Gradient Mask X Scale

.. py:property:: map.gmask_scale_x

Gradient scale by the local axis X. The larger the scale, the smoother the gradient.

...
gmask_scale_x : bpy.props.FloatProperty
...
map.gmask_scale_x

Gradient Mask Y Scale

.. py:property:: map.gmask_scale_y

Gradient scale by the local axis Y. The larger the scale, the smoother the gradient.

...
gmask_scale_y : bpy.props.FloatProperty
...
map.gmask_scale_y

Gradient Mask Z Scale

.. py:property:: map.gmask_scale_z

Gradient scale by the local axis Z. The larger the scale, the smoother the gradient.

...
gmask_scale_z : bpy.props.FloatProperty
...
map.gmask_scale_z

Gradient Maks Coverage

.. py:property:: map.gmask_coverage

Map range of coverage. The higher the coverage value, the larger the occluded area against its initial area.

...
gmask_coverage : bpy.props.FloatProperty
...
map.gmask_coverage

Gradient Mask Contrast

.. py:property:: map.gmask_contrast

Map Color Contrast.

...
gmask_contrast : bpy.props.FloatProperty
...
map.gmask_contrast

Gradient Mask Saturation

.. py:property:: map.gmask_saturation

Map color saturation value.

...
gmask_saturation : bpy.props.FloatProperty
...
map.gmask_saturation

Gradient Mask Opacity

.. py:property:: map.gmask_opacity

Map Color Opacity relative to a blank color.

...
gmask_opacity : bpy.props.FloatProperty
...
map.gmask_opacity

Gradient Mask Use Invert

.. py:property:: map.gmask_use_invert

Invert the colors of the Map.

...
gmask_use_invert : bpy.props.FloatProperty
...
map.gmask_use_invert