Export: emissive strength from each material's emissivemultiplier (SIX-208) #268
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/holdmysocks--SixNG!268
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/268/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@holdmysocks on GitHub · 2026-11-25 13:03 UTC · original
holdmysocks:six-emissive-strength→master· +275 −4 · 9 files · 1 commits · merged 2026-11-25 13:49 UTCEvery emissive material in a GLB lit at
emissiveFactor[1, 1, 1]. The game stores how bright each one is in the material constantemissivemultiplier, which #262 put in model.json. The GLB now uses it.Mapping
The values read like luminance in nits: 5 on glass railings, 628 on bulbs, 1000 on LED sign displays, 3225 on a circular LED sign.
emissiveFactor. Above 1, the factor is 1 andKHR_materials_emissive_strengthholds the strength, as that extension asks. It is listed inextensionsUsed.materials[]and the GLB material extras getemissive_strength:{multiplier, strength, source}.sourceismultiplier,capped,default(no multiplier) orruntime(multiplier 0). It is null for materials that do not light. The model.jsonmaterials_noteexplains it.Viewer
Emissive materials are now scaled by the square root of their glTF strength, kept between 0.25 and 3. A linear scale would turn the dim lights black and the bright signs flat white at the viewer's fixed exposure. Exports without the extension look as before. The Metal 4 renderer is not changed.
Checked
extensionsUsed.cargo check --workspace --all-targetsandcargo test -p sixng-core -p sixng-gui --releasepass. New tests cover the mapping (railings, bulb, LED sign, 0, missing or invalid values, the cap), reading the constant from a material,extensionsUsed, and the viewer's scale.Not done
emissive. Emissive shaders in another class (the bulbs'standard_emissive_layer_inst, which is cutout, and the neon signs) are lit in the GLB but not in the viewer. This is not new.strength = multiplier / 100 (1.0 = 100 nits), at most 100. Up to 1 it is the emissiveFactor; above 1 the factor is 1 and KHR_materials_emissive_strength holds the strength (listed in extensionsUsed). A multiplier of 0 (switched on at run time) stays lit at strength 1. model.json, materials.json and the GLB extras get emissive_strength {multiplier, strength, source}. The viewer scales emissive materials by the square root of the strength, kept in 0.25..3.