Sets entity emissive glow (RGB 0-255, intensity 0+, self-illumination no light casting).
Takes entity (mesh/billboard entity handle), red (0-255 int), green (0-255 int), blue (0-255 int), intensity (0+ double).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
entityInt
redInt
greenInt
blueInt
intensityDouble
Returns
Void
Quick Summary
Sets entity emissive glow (RGB 0-255, intensity 0+, self-illumination no light casting).
Takes entity (mesh/billboard entity handle), red (0-255 int), green (0-255 int), blue (0-255 int), intensity (0+ double).
Returns nothing.
Technical Exegesis...
Sets entity emissive glow (RGB 0-255, intensity 0+, self-illumination no light casting). Takes entity (mesh/billboard entity handle), red (0-255 int), green (0-255 int), blue (0-255 int), intensity (0+ double). Returns nothing. Converts RGB from 0-255 to 0.0-1.0 floats, clamps intensity to positive values (minimum 0.0), updates material emissiveColor and emissiveIntensity or billboard emissive properties. Self-illumination effect.
This function sets emissive properties.
Sets entity emissive glow (RGB 0-255, intensity 0+, self-illumination no light casting). Takes entity (mesh/billboard entity handle), red (0-255 int), green (0-255 int), blue (0-255 int), intensity (0+ double). Returns nothing. Converts RGB from 0-255 to 0.0-1.0 floats, clamps intensity to positive values (minimum 0.0), updates material emissiveColor and emissiveIntensity or billboard emissive properties. Self-illumination effect.
This function sets emissive properties. Emissive meaning: self-illumination that makes material glow (object appears to emit light, not affected by scene lighting, does NOT cast light on other objects like real lights). Color conversion: RGB values 0-255 converted to 0.0-1.0 floats (shader-compatible format). Intensity clamping: intensity clamped to positive values (negative becomes 0.0, no upper limit for creative HDR glow effects). Material handling: surface-based meshes (procedural shapes) update all surface materials directly, loaded meshes (GLB models) use material override system (checks entity.materialOverrideIndex, uses override if exists else uses mesh.materialIndex), billboard entities directly set billboard->emissiveColor and billboard->emissiveIntensity. Use cases: (1) Glowing objects (1.0-2.0 intensity for neon signs, LED displays, magic runes), (2) Hot surfaces (red/orange emissive for lava, fire, heated metal), (3) Sci-fi effects (blue/cyan emissive for energy shields, holograms), (4) Indicator lights (bright emissive for buttons, switches, status LEDs), (5) Night lighting (low emissive to simulate self-lit objects in dark scenes). Common patterns: neon sign b3dSetEntityEmissiveFX(entity, 0, 255, 255, 2.0), lava b3dSetEntityEmissiveFX(entity, 255, 100, 0, 1.5), magic rune b3dSetEntityEmissiveFX(entity, 128, 0, 255, 1.0), pulsing light emissiveIntensity = 1.0 + mathSin(time) (oscillate 0.0-2.0). Typical usage: set for glowing objects that should be visible in dark (signs, displays, lava), animate intensity for pulsing/flickering effects, use bright intensity (2.0+) for HDR bloom effects, combine with low baseColor for pure glow look. PBR emissive: added directly to final pixel color (finalColor = litColor + emissiveColor * emissiveIntensity), bypasses lighting calculations (always visible regardless of scene lights), useful for objects that should glow in darkness. Emissive vs lights: emissive does NOT illuminate other objects (purely visual self-glow), lights (b3dCreateLight) DO illuminate other objects but don't self-glow, combine both for glowing lamp (emissive on lamp model + light entity at same position). Intensity ranges: 0.0 = no glow (off), 0.5-1.0 = subtle glow (slight self-illumination), 1.0-3.0 = strong glow (bright HDR, bloom-capable), 5.0+ = extreme glow (overly bright, creative effects). HDR and bloom: high intensity values (2.0+) trigger bloom post-processing (bright areas bleed light, realistic glare), creates halo effect around bright emissive objects. Color application: emissiveColor tints the glow (red emissive = red glow, blue emissive = blue glow), intensity scales brightness (color * intensity = final emission). Material override: uses same clone-on-write pattern as SetEntityColorFX (prevents shared material modification). Billboard emissive: directly sets billboard fields (simpler than mesh materials). Performance: O(1) for single surface mesh or billboard, O(N) for N-surface procedural mesh, emissive rendering cheap (simple color addition in pixel shader). Default values: likely black (0,0,0) with intensity 0.0 if not set (no glow, verify during testing). Validation: prints error if invalid entity handle, prints error for mesh entities without materials, silently returns for billboard entities (sets billboard fields if billboard exists). Related: b3dSetEntityColorFX sets base color (different from emissive, affected by lighting), b3dCreateLight creates real lights (illuminate other objects, complementary to emissive), b3dGetEntityEmissiveIntensityFX reads current emissive intensity.