Edit → Texture tab: "Synchronize colors" checkbox to keep Blinn-Phong and PBR tint in sync #516

Closed
opened 2026-10-07 02:16:58 +00:00 by sky_line · 1 comment
Owner

Idea from the owner.

What

Add a "Synchronize colors" checkbox to the Texture tab of the Build/Edit floater (panel_tools_texture.xml, next to the colour swatch). When it's on, setting a tint on one side carries the same colour to the other:

  • Blinn-Phong tint (the face colour swatch, colorswatch / LLPanelFace::onCommitColor) → also sets the PBR material's base colour tint (the GLTF base-colour-factor override on that face).
  • PBR base colour tint (from the material editor / override) → also sets the Blinn-Phong face colour.

So a face looks the same tint whether someone sees it with PBR or on a viewer that falls back to Blinn-Phong, without tinting twice.

Details

  • Colour space: the Blinn-Phong face colour is sRGB; the PBR base colour factor is linear. Convert both ways (srgbColor4 / linearColor4), like the existing "Copy PBR to Blinn-Phong" button does (llpanelface.cpp ~3973).
  • Alpha / transparency: decide whether "Transparency %" syncs too (probably yes, kept consistent with the base colour alpha), and how it interacts with the PBR alpha mode.
  • Live preview: the colour picker previews immediately (setCanApplyImmediately); the sync should follow the preview and revert correctly on Cancel.
  • Multiple faces / mixed selections: apply per face; faces with no PBR material only get the Blinn-Phong colour.
  • Permissions: writing a PBR override needs modify permission on the object, same as the tint; no-mod material assets are fine because overrides live on the face.
  • Persisted: remember the checkbox between sessions (a Slipstream* setting); off by default.
  • Related: the existing one-shot Copy PBR to Blinn-Phong button (copy_pbr_to_bp) copies textures, tint and transforms once; this checkbox keeps the tint in sync continuously.

Done when

  • With the box on, changing either tint updates the other on every selected face, including Cancel/revert in the picker.
  • With it off, behaviour is unchanged.
  • Checked on PBR-only, Blinn-Phong-only and mixed selections.
Idea from the owner. ## What Add a **"Synchronize colors"** checkbox to the **Texture** tab of the Build/Edit floater (`panel_tools_texture.xml`, next to the colour swatch). When it's on, setting a tint on one side carries the same colour to the other: - **Blinn-Phong tint** (the face colour swatch, `colorswatch` / `LLPanelFace::onCommitColor`) → also sets the **PBR material's base colour tint** (the GLTF base-colour-factor override on that face). - **PBR base colour tint** (from the material editor / override) → also sets the **Blinn-Phong face colour**. So a face looks the same tint whether someone sees it with PBR or on a viewer that falls back to Blinn-Phong, without tinting twice. ## Details - **Colour space:** the Blinn-Phong face colour is sRGB; the PBR base colour factor is linear. Convert both ways (`srgbColor4` / `linearColor4`), like the existing "Copy PBR to Blinn-Phong" button does (`llpanelface.cpp` ~3973). - **Alpha / transparency:** decide whether "Transparency %" syncs too (probably yes, kept consistent with the base colour alpha), and how it interacts with the PBR alpha mode. - **Live preview:** the colour picker previews immediately (`setCanApplyImmediately`); the sync should follow the preview and revert correctly on Cancel. - **Multiple faces / mixed selections:** apply per face; faces with no PBR material only get the Blinn-Phong colour. - **Permissions:** writing a PBR override needs modify permission on the object, same as the tint; no-mod material assets are fine because overrides live on the face. - **Persisted:** remember the checkbox between sessions (a `Slipstream*` setting); off by default. - **Related:** the existing one-shot **Copy PBR to Blinn-Phong** button (`copy_pbr_to_bp`) copies textures, tint and transforms once; this checkbox keeps the tint in sync continuously. ## Done when - With the box on, changing either tint updates the other on every selected face, including Cancel/revert in the picker. - With it off, behaviour is unchanged. - Checked on PBR-only, Blinn-Phong-only and mixed selections.
sky_line added this to the Slipstream project 2026-10-07 02:16:58 +00:00
Author
Owner

Implemented and verified by the owner on 2026-10-10 (commits b75ef3f0b5 and 608f69ceab, pushed to main). There is a "Sync tints" checkbox in the Edit > Texture PBR area (setting SlipstreamSyncFaceColors, off by default). With it on, a Blinn-Phong tint change also sets the PBR base color tint, and the other way round. Cancel reverts both sides.

Implemented and verified by the owner on 2026-10-10 (commits b75ef3f0b5 and 608f69ceab, pushed to main). There is a "Sync tints" checkbox in the Edit > Texture PBR area (setting SlipstreamSyncFaceColors, off by default). With it on, a Blinn-Phong tint change also sets the PBR base color tint, and the other way round. Cancel reverts both sides.
sky_line 2026-10-10 10:31:30 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#516
No description provided.