Sets brush metallic factor (0.0=non-metallic/dielectric, 1.0=metallic/conductor, clamped 0.0-1.0). Takes brushHandle (brush handle), metallic (metallicness, clamped 0.0-1.0). Returns nothing. Validates brush handle, clamps metallic to 0.0-1.0 range, stores in brush.metallicFactor. Controls whether surface behaves as metal or non-metal in PBR rendering (affects specular color and reflectance).
This function sets material metalness for physically based rendering. Metallic parameter: 0.
Sets brush metallic factor (0.0=non-metallic/dielectric, 1.0=metallic/conductor, clamped 0.0-1.0). Takes brushHandle (brush handle), metallic (metallicness, clamped 0.0-1.0). Returns nothing. Validates brush handle, clamps metallic to 0.0-1.0 range, stores in brush.metallicFactor. Controls whether surface behaves as metal or non-metal in PBR rendering (affects specular color and reflectance).
This function sets material metalness for physically based rendering. Metallic parameter: 0.0=non-metallic/dielectric (wood, plastic, stone, skin), 1.0=metallic/conductor (iron, gold, copper, chrome). Intermediate values possible but rarely realistic (0.5 = mixed, uncommon). Clamped to 0.0-1.0. PBR behavior difference: non-metals (metallic=0) have white/colorless specular highlights, diffuse reflection tinted by base color. Metals (metallic=1) have no diffuse reflection, specular highlights colored by base color, high reflectance. Physical basis: metals conduct electricity (free electrons), absorb light and re-emit as colored specular reflection. Non-metals (insulators) have white specular from surface Fresnel, colored diffuse from subsurface scattering. Use cases: (1) Metal objects (swords, armor, coins) metallic=1.0, (2) Painted metal (car paint) metallic=0.0 (paint is dielectric), (3) Rusty metal metallic=0.5-0.8 (mixed), (4) Stone/wood/plastic metallic=0.0, (5) Gold/silver/copper metallic=1.0 with appropriate base color. Common pattern: brush=b3dCreateBrush(), b3dBrushColor(brush, 212, 175, 55), b3dBrushMetallic(brush, 1.0), b3dBrushShininess(brush, 0.9), creates gold material (yellow base, full metallic, shiny). Default: 0.0 (non-metallic) after b3dCreateBrush. Typical values: pure metal=1.0, pure non-metal=0.0, avoid intermediate unless physically justified. Base color interaction: non-metals use base color for diffuse (surface color), white specular. Metals use base color for specular (reflectance tint), no diffuse. Examples: gold metallic=1.0 + yellow base = yellow reflections, plastic metallic=0.0 + blue base = blue diffuse + white highlights. Roughness interaction: works with b3dBrushShininess, smooth metals=mirror-like, rough metals=brushed/oxidized, smooth non-metals=glossy plastic, rough non-metals=matte/chalk. Handle validation: invalid brush handles ignored. Property update: affects future b3dPaintSurface calls only. Storage: metallic stored in brush.metallicFactor, copied to material.metallicFactor during paint. Binary recommendation: use 0.0 or 1.0 for most materials (physically accurate), intermediate only for transitions (rust, weathering). Related: b3dBrushShininess sets roughness (works with metallic for full PBR), b3dBrushColor sets base color (diffuse for non-metals, specular tint for metals), b3dPaintSurface applies metallic brush to surface.