Skip to content

render: persist and consume opaque PBR in product preview and PNG - #1046

Merged
bherbruck merged 54 commits into
tangency-labs:mainfrom
selun3:codex/opaque-product-pbr
Oct 14, 2026
Merged

bherbruck merged 54 commits into
tangency-labs:mainfrom
selun3:codex/opaque-product-pbr

Conversation

@selun3

@selun3 selun3 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Opaque metallic fraction, roughness and dielectric IOR persist on existing looks and change the integrated product viewport and CPU PNG. Optical edits preserve geometry and assigned density/mass; scalar looks retain their response. This consolidated PR carries R3 (#706), R4a (#800) and the opaque scalar PBR consumer. Refs #1004/#813/#620/#842/#922; the broader render/material roadmaps remain open.

Current integration and review state

The maintainer has advanced the published head to c369d7a, integrating main through a629236. The PR remains open and ready for review, not merged. Fresh remote checks are running; the earlier green results below belong to 7ed302a and are not relabelled as this new head's validation.

Previously validated head 7ed302a includes the maintainer's current-main integration, merged R2 #667 and texture input #909. That revision was marked ready for review. All 14 enabled remote checks on that revision succeed, with zero pending/failing checks: four Linux test shards, reference/doc tests, strict Clippy, repository checks and Windows shaders/startup are included. Dependency advisories, manual wasm/RISC-V and the optional action matrix are skipped; skipped checks are not passes. Current aggregate CI.

The maintainer's integration report documents shared format 21 for render setups and opaque PBR looks, preserving main's cached Design-scene blocks while uploading sc_pbr alongside them, token-checked library-editor callbacks, deduplicated locales and regenerated command inventory. Source inspection confirms FORMAT = 21. Format20 shipped with v0.11.0; the earlier experimental format 20 artifacts below are historical, not current format 21 reopen evidence. The maintainer reports the integrated web build compiles; manual wasm is not enabled in this remote run.

The agreed route is to squash R3/R4a/PBR together here. Keep #706/#800 open until this merge is actually confirmed, then mark them superseded while preserving their review/media history. Engineering-card persistence #1060 and rich library transport #1086 remain separate subsequent units.

Behavior and boundaries

  • Body/component/face and material-default PBR, undo and independent copies use the existing appearance precedence and application commands. Scalar-library application explicitly selects scalar shading and keeps one undo step; v1 catalog export refuses unsupported PBR in all appearance locations without replacing files or mutating history. Rich transport remains library: transport PBR and engineering cards without lossy copies #1086.
  • Shared original GGX/Smith/Schlick CPU/GPU contract, fixed three-light studio, linear lighting and explicit sRGB transfer. Only actual installed consumers advertise PBR. Design retains upstream tessellation and safe-mode behavior.
  • Render drafts, jobs and hosts remain per document. The merged Keep Open and Save asynchronous to prevent macOS resize crashes #1127 file-picker service holds model/tab/control mutations while a picker waits; resize/inspect/screenshots continue. Export callbacks preserve job, overwrite and editor identity; cancellation writes nothing, stale/evicted images cannot substitute a newer result, and a changed document snapshot refuses export. file_dialog_open remains an inspection alias of file_picker_busy.
  • PBR labels cover en/ja/zh/de/ko/ru. No new external asset or dataset, commercial CAD content, Bevy or competing renderer is added.

Historical local validation and native evidence

Earlier e8321b6, parent upstream 37547f8, passed 713 UI tests (including 14 Render and 5 library tests), 5 engine PBR and 7 library engine tests, strict all-target engine/UI Clippy and 11 wasm builds. Vulkan CPU/GPU product parity covered four metallic/roughness cases and both attachment color spaces, excluding silhouettes. These counts/evidence are pinned to that source and are not relabelled as new-head local validation. Compilation is not browser-interaction certification.

That older full local CI stopped at historical Windows MCP unused_mut errors #907, already fixed on main. A remote registry failure was corrected by c2efa0c with a focused passing registry test. These are historical failures, not current 7ed302a CI results. The older native app run passed 26 assertions then aborted in the AMD OpenGL driver; three parallel repeats and one diagnostic serial repeat passed 26 and exited0. Successful repeats were not a fix for intermittent #1156; current Windows startup CI is a separate scoped result.

Actual Windows Vulkan/MSAA4 evidence on e8321b62: Start Render completed, Export PNG opened the native picker, and three window-size captures showed the live app while the picker remained pending. Component properties before/after image generation match exactly. Captures exclude the OS dialog/private paths. No destination was chosen; the probe was stopped and is not counted as clean shutdown/save/cancel success. Temporary startup preferences were restored byte-for-byte and are absent from the PR.

Historical original product preview on e8321b62

Editable original format 20 study and verified public ZIP remains pinned to d335431/upstream d399eff. It is not current format 21 save evidence. Earlier format/scenario/catalog results retain their original pins in the discussion.

Remaining scope

No HDRI/IBL, texture/grain sampling, cast shadows, indirect bounces, spectral response, coatings, optical anisotropy, absorption, refraction or progressive/final renderer. Transparent legacy looks use alpha blending. Rough single-scattering metals can darken; studio radiance is relative. Synthetic optical values do not establish an engineering grade or universal device accuracy. Input normalization #1218 and mapping #1223 are separate foundations, not installed texture capabilities.

Private plan/ documents are unavailable; their content was not invented. Unrelated local changes and contributor branches remain preserved. Feedback on the supported behavior, limits and subsequent integration boundaries is welcome.

selun3 added 30 commits October 13, 2026 13:44
# Conflicts:
#	crates/doc/src/format.rs
#	docs/book/src/guide/files.md
# Conflicts:
#	crates/ui-egui/src/lib.rs
#	docs/features.md
@selun3

selun3 commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

Current native Windows evidence for e8321b6, upstream37547f8e. This branch now uses main’s merged #1127 file_picker service; the earlier #1114 runtime module is removed. Main’s policy holds model input/tab changes while a future is pending. Explicit job, overwrite, document-snapshot and editor guards remain around the consumer.

Actual Windows Vulkan/MSAA4, original five-body opaque study: clicked Start Render, observed Image ready to export, then clicked Export PNG. While the native destination picker remained pending, resize/inspect/screenshot succeeded at 1280×900, 1500×1050 and 1400×1000 logical points. Every inspection reported file_picker_busy=true, compatibility file_dialog_open=true, renderer=gpu and one document. Captures contain the app window; the separate OS picker is excluded.

Component properties before rendering and after the completed job match exactly: volume22241.972242190273 mm³ and mass28.692144192425452 g. The isolated pending-picker probe was stopped after capture; no native destination was chosen, and native save/cancel/clean-shutdown success is not claimed. Temporary startup-only preference isolation was restored byte-for-byte and is absent from the PR. No private settings, paths, tokens or crash logs are attached.

713 UI tests (including 14 Render and 5 library tests), strict scoped Clippy and 11 wasm builds pass. Old and new service test modules are not cumulative counts. The native app first reported 26 passed but exited abnormally in the AMD OpenGL driver; three complete parallel repeats and one diagnostic serial repeat exit successfully. This unresolved intermittent observation is #1156, not a claimed fix. Global CI still stops at #907; remote results must match the new head.

Opaque PBR remains fixed direct-light preview: no HDRI/IBL, grain textures, glass refraction or measured engineering-grade claims.

picker-native-completed

picker-native-pending-1280x900

picker-native-pending-1400x1000

@selun3

selun3 commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

The remote run for e8321b6 has now completed. Native Linux shard 1 fails tests::registry_is_consistent: 366 unique command IDs versus 369 registrations. The other three Linux shards, reference tests, doc tests, Clippy and Windows FXC shader checks pass; this is not a green overall run.

I traced this to our integration of the now-merged scalar library: libraries::COMMANDS was extended twice in cmd/mod.rs, once from the original library branch and once from its upstream merge. Current main registers it once. This is an integration error in this stack, not a new upstream bug or the historical Windows MCP lint failure #907 (now fixed upstream).

I have removed the duplicate in the local refresh and am validating the existing consistency regression plus the current material stack before publishing updated heads. The generated feature counts will also be refreshed; the earlier total of 369 included those three duplicate registrations. No test assertion will be weakened or skipped.

Remove the duplicate registry extension inherited from the scalar-library merge
and correct the inventory to360 implemented commands plus6 planned.

The existing registry consistency regression passes in the CI profile. Mandatory
full CI passes repository checks and stops at the historical Windows MCP unused_mut
warning in this old parent, already fixed upstream. No warning or test is suppressed.
Current-main and shared format21 integration remain with the maintainer's handoff.
@selun3

selun3 commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

Thank you for handling the main refreshes and landing order. The reserved #1046 correction is now published at c2efa0c (parent e8321b6).

It removes one duplicate libraries::COMMANDS registration and corrects the matching generated inventory rows (360 implemented, 6 planned). The exact-head registry consistency regression passes: 1 passed. Mandatory local cargo xtask ci passes formatting, assets, licence freshness and layers, then stops at the older parent's Windows MCP unused_mut failure, already addressed on main. No full green CI or fresh feature/native validation is claimed for this two-file correction; those earlier results remain pinned to e8321b6.

#1046 is handed back to you for main/format21 integration. I will not push further changes there without coordinating. It remains draft, with integration and fresh remote validation pending. The smaller physical-card prototype stays local while we await your preference on #1060; no replacement PR or closure has been made. The PR body now distinguishes the new correction from historical format20 and native evidence.

@bherbruck

Copy link
Copy Markdown
Collaborator

Thanks for the registration fix, @0xlillith. I've merged current main into this (7ed302a), which now includes #667 and #909, and CI is green.

What changed in the merge:

  • v0.11.0 shipped format 20, so render setups and opaque PBR looks are both saved under format 21. The PBR note now sits under 21 in format.rs, the PBR format test checks 20 → 21 and refuses 22/23, and the docs say 21.
  • gpu.rs: main now uploads the Design scene in cached blocks. I kept that and added the sc_pbr upload next to it.
  • dialogs_library.rs: I kept your token-checked editor() callbacks in place of main's with_state. The web build still compiles.
  • Locales: I kept your render/PBR keys and checked there are no duplicates. docs/features.md is regenerated (360 commands).

This branch also carries R3 (#706) and R4a (#800). Do you want those to land on their own first, or would you rather mark this ready and have me squash all three together here? I'm fine with either.

@selun3

selun3 commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

Thank you for doing the integration. I prefer landing R3, R4a and opaque PBR together through #1046. The combined tree already contains the intended standalone behavior, and your conflict resolutions and green exact-head CI make this a better landing unit than repeating the integration across #706 and #800.

I checked 7ed302a: all enabled remote checks pass, including the four native Linux shards, reference tests, Clippy, Windows shaders and Windows app startup. The manual/skipped jobs are not counted as passes. There is no unpublished feature work in my local #706 refresh that needs to be carried over; those commits are integration/documentation work superseded by this route. #800 has no additional unpublished refresh.

I am marking this ready for your squash merge. Please retain the format-21 boundary, cached Design blocks, token-checked library callbacks and the existing resource/job guards as integrated here. The screenshots and native examples retain their original source pins; I am not claiming a fresh GUI validation of 7ed302a.

Once this lands, #706 and #800 can be closed as superseded by #1046, with cross-links preserving their design and evidence history. #849 is also a historical integration vehicle rather than a prerequisite. Keep #1060 and #1086 separate and revalidate them against the merged result; this does not close the broader HDRI, texture or physical-material work.

Main added analysis colours to the viewport uniform; the product
viewport and the offscreen helpers pass them too.
@bherbruck
bherbruck merged commit a261aaa into tangency-labs:main Oct 14, 2026
18 checks passed
@bherbruck

Copy link
Copy Markdown
Collaborator

Merged as a261aaa. Thank you, @0xlillith! I closed #706 and #800 as superseded and linked them here. Next I'll merge main into #1060 and #1086 so you can carry your tests over against the format-21 tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants