Sets entity base color RGB (0-255, affects material baseColorFactor).
Takes entity (mesh/billboard entity handle), red (0-255 int), green (0-255 int), blue (0-255 int).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
entityInt
redInt
greenInt
blueInt
Returns
Void
Quick Summary
Sets entity base color RGB (0-255, affects material baseColorFactor).
Takes entity (mesh/billboard entity handle), red (0-255 int), green (0-255 int), blue (0-255 int).
Returns nothing.
Technical Exegesis...
Sets entity base color RGB (0-255, affects material baseColorFactor). Takes entity (mesh/billboard entity handle), red (0-255 int), green (0-255 int), blue (0-255 int). Returns nothing. Converts RGB from 0-255 to 0.0-1.0 floats, updates material baseColorFactor (PBR albedo color) or billboard color. Works with mesh and billboard entities.
This function sets base color. Color conversion: RGB values 0-255 converted to 0.0-1.0 floats (shader-compatible format).
Sets entity base color RGB (0-255, affects material baseColorFactor). Takes entity (mesh/billboard entity handle), red (0-255 int), green (0-255 int), blue (0-255 int). Returns nothing. Converts RGB from 0-255 to 0.0-1.0 floats, updates material baseColorFactor (PBR albedo color) or billboard color. Works with mesh and billboard entities.
This function sets base color. Color conversion: RGB values 0-255 converted to 0.0-1.0 floats (shader-compatible format). Material handling: surface-based meshes (procedural shapes) update all surface materials directly, loaded meshes (GLB models) use material override system (clones base material for per-entity customization if entity.materialOverrideIndex < 0), billboard entities directly set billboard->color. Use cases: (1) Mesh tinting (red metal vs blue metal for same model), (2) Dynamic color (health bars, team colors, damage indicators), (3) Stylized rendering (cartoon color swaps), (4) Material variation (same model different colors without multiple textures), (5) Billboard colorization (colored particles, UI elements). Common patterns: red tint b3dSetEntityColorFX(entity, 255, 0, 0), green tint b3dSetEntityColorFX(entity, 0, 255, 0), gray scale b3dSetEntityColorFX(entity, 128, 128, 128), team colors for player in team then b3dSetEntityColorFX(player, teamRed, teamGreen, teamBlue). Typical usage: set model color without changing textures, tint entire entity with color multiplier, create color variations for same model (red car vs blue car from same mesh), colorize billboards for particle effects. PBR baseColorFactor: base color multiplied with baseColorTexture (if texture present color = texture * baseColorFactor, if no texture color = baseColorFactor), controls albedo (diffuse reflection color). Material override system: prevents shared material modification (entity A and B share material 5, setting color on A clones material to new index 42 for A, B still uses material 5 unmodified), clone-on-write pattern for per-entity customization. Surface-based vs loaded: surface-based (b3dCreateCube, b3dCreateSphere) have individual surface materials updated directly (no override needed), loaded meshes (b3dLoadEntity GLB) use shared material system (requires override cloning). Performance: O(1) for single surface mesh or billboard, O(N) for N-surface procedural mesh (all surfaces updated), material clone is one-time cost (subsequent calls modify existing override). Default values: likely white (255,255,255) if not set (verify during testing, white is neutral multiplier = no tint). Validation: silently returns if invalid handle, prints error for mesh entities without materials. Related: b3dSetEntityMetallicFX sets metallic property, b3dSetEntityRoughnessFX sets roughness property, b3dGetEntityRedFX/GreenFX/BlueFX read current color components, b3dSetEntityAlphaFX sets transparency.