Sets brush base color (RGB 0-255), preserves alpha channel.
Takes brushHandle (brush handle from b3dCreateBrush), r, g, b (red, green, blue components, 0-255).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
brushHandleInt
rInt
gInt
bInt
Returns
Void
Quick Summary
Sets brush base color (RGB 0-255), preserves alpha channel.
Takes brushHandle (brush handle from b3dCreateBrush), r, g, b (red, green, blue components, 0-255).
Returns nothing.
Technical Exegesis...
Sets brush base color (RGB 0-255), preserves alpha channel. Takes brushHandle (brush handle from b3dCreateBrush), r, g, b (red, green, blue components, 0-255). Returns nothing. Validates brush handle, converts RGB from 0-255 to 0.0-1.0 float range, sets brush baseColorFactor.xyz (RGB), preserves baseColorFactor.w (alpha). Base color multiplied with texture color (if texture set) during rendering.
This function configures brush tint color for material template.
Sets brush base color (RGB 0-255), preserves alpha channel. Takes brushHandle (brush handle from b3dCreateBrush), r, g, b (red, green, blue components, 0-255). Returns nothing. Validates brush handle, converts RGB from 0-255 to 0.0-1.0 float range, sets brush baseColorFactor.xyz (RGB), preserves baseColorFactor.w (alpha). Base color multiplied with texture color (if texture set) during rendering.
This function configures brush tint color for material template. Base color: RGB color multiplied with texture color in shader, acts as color tint or solid color if no texture. r, g, b parameters: standard 0-255 integer values (Windows RGB convention), converted to 0.0-1.0 internally. Alpha preservation: updates RGB only, leaves alpha untouched (set separately via b3dBrushAlpha). Color behavior: if brush has texture (via b3dBrushTexture), base color tints texture (white=no tint, colored=tint), if no texture, base color used as solid color. Use cases: (1) Solid colored materials (no texture, pure color), (2) Texture tinting (white texture with colored tint), (3) Team colors (same texture, different tints), (4) Vertex color simulation (colored surfaces), (5) Material variation (slight color shifts). Common pattern: brush=b3dCreateBrush(), b3dBrushColor(brush, 255, 100, 100), creates pinkish/red brush. Default: white (255, 255, 255) after b3dCreateBrush. Tint examples: b3dBrushColor(brush, 255, 255, 255) = white (no tint, shows texture as-is), b3dBrushColor(brush, 255, 0, 0) = red tint (reddish texture), b3dBrushColor(brush, 128, 128, 128) = gray (darkens texture 50%). PBR workflow: base color is albedo in PBR (physically based rendering), represents surface diffuse reflectance. Shader multiplication: final color = texture color * base color * vertex color. Handle validation: invalid brush handles (negative or out of range) ignored silently. Property update: changes affect future b3dPaintSurface calls, not previously painted surfaces. Typical usage: set color once after creating brush, before painting surfaces. RGB conversion: r/255.0, g/255.0, b/255.0 -> XMFLOAT4.xyz. Related: b3dBrushAlpha sets transparency separately, b3dBrushTexture adds texture to be tinted by color, b3dPaintSurface applies brush with color to surface.