Skip to content

Add parameterized whitewater and Blender rendering tools - #1334

Draft
svchb wants to merge 16 commits into
integration/press-surface-fsi-prfrom
tools/foam-blender-rendering
Draft

svchb wants to merge 16 commits into
integration/press-surface-fsi-prfrom
tools/foam-blender-rendering

Conversation

@svchb

@svchb svchb commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add tools/rendering/ as a reusable, parameter-only CLI with separate whitewater and Blender stages; no per-case config file. tools/rendering/README.md documents setup, quick starts, options and limitations.
  • Select each rendered material independently: --liquid-material turbulent-water|clear-water|heavy-oil|melted-plastic, --solid-material anodized-copper|steel-uncoated|steel-white-semigloss|concrete, --glass-material low-iron-glass, --floor-material dark-metal|neutral-stress, --foam-material whitewater-froth, --spray-material water-droplet, --bubble-material submerged-air, and optional --ghost-material v03-ghost-water. Explicit property flags override any one selected material. No aggregate scene-material preset mixes floor, water, glass and geometry; tank walls, bevels, camera and lights stay CLI scene parameters. The v03 liquid is turbulent-water; the other liquids and new solids are render-only illustrative options for other cases.
  • Render PR Add 2D/3D particle surface reconstruction and callback #1329 PLY/VTP series, zero or more solids, optional whitewater and multi-solid vertex-colored stress views. Concrete uses three small CC0 scanned PBR maps (color, roughness, height) from Poly Haven gravel-embedded concrete, compared with rough concrete. American Concrete Institute aggregate guidance, microscopy and ASTM C457 informed the sparse shader-only void scale. These maps are functional material inputs in the PR, not example renders. Keep the v03-used material values but remove the rejected legacy-cyan and redundant foaming-water code paths.
  • Include a pinned SPlisHSPlasH 2.18.1 patch and parameterized build script under tools/rendering/build/ for headless operation, velocity-bearing VTK, explicit RNG seed and zero-range potential handling. Include portable tests, optional FoamGenerator/Blender integration tests and scoped CI.

Stack and scope

Base: draft #1333 (integration/press-surface-fsi-pr). The approved v03 press scripts, media and deliverables are unchanged. The CLI handoff records accepted v03 settings and representative-frame parity. Full 601-state FoamGenerator regeneration and 601 newly rendered frames remain unverified.

Verification

  • Ten local tests pass with Python 3.9, meshio 5.3.5, NumPy 2.0.2, Partio 1.0.0, patched FoamGenerator and Blender 5.2.2. Tests cover material independence and overrides (including floor, the new solids and liquid choices), deterministic seed behavior, translated domains, Blender liquid/whitewater, multi-solid stress, Eevee and resume.
  • Local comparison against immutable v03 provenance checked 28 fluid/foam/spray/bubble values; copper, low-iron glass, floor and ghost-water values were checked against frozen renderer code. The pinned patch applies to upstream and produces the compiled test binary.
  • Portable CI, spelling, format, local Ruff and diff checks are required.

v03 CLI handoff and representative validation

tools/rendering/V03_MIGRATION.md gives CLI-only commands for accepted clean, foam and stress scenes. The renderer reads legacy foam metadata directly with source/manifest identity and PLY-hash checks; stress exports are checked against their recorded inventory. CLI geometry flags reproduce the approved pedestal and glass geometry.

All 601 existing foam records and hashes were audited, and source frame 0 converted to byte-identical Partio data between old and new converters. Three 3840x2160, 96-sample v03 stills were compared with approved PNGs: clean frame 174 mean absolute RGB error 0.0814/255 (91.94% exact pixels), foam frame 174 0.0653/255 (93.38% exact), and stress frame 179 0.000029/255 (99.991% exact). Ten local tests pass with Blender and the patched FoamGenerator. These representative checks do not imply a full re-generation or 601-frame image parity; the approved release and historical scripts remain provenance.

Material previews

Illustrative render-only appearances, generated using temporary meshes outside the PR. Steel uses −1.5 EV, concrete uses a cast-block preview at −2.25 EV to reveal its scanned aggregate and fine-grain maps, melted plastic uses −0.75 EV, and oil uses 0 EV; image brightness is not a calibrated albedo comparison. The few extra concrete voids are shader shading rather than mesh holes. The preview PNGs are hosted on the separate assets branch; no example input or example images are in the PR diff.

Steel — uncoated

Steel — uncoated

Steel — white semi-gloss

Steel — white semi-gloss

Concrete

Concrete

Heavy oil

Heavy oil

Melted plastic

Melted plastic

@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.11%. Comparing base (88ce290) to head (fa95f7f).

❗ There is a different number of reports uploaded between BASE (88ce290) and HEAD (fa95f7f). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (88ce290) HEAD (fa95f7f)
total 1 0
Additional details and impacted files
@@                         Coverage Diff                          @@
##           integration/press-surface-fsi-pr    #1334      +/-   ##
====================================================================
- Coverage                             91.35%   84.11%   -7.24%     
====================================================================
  Files                                   182      182              
  Lines                                 16548    16527      -21     
====================================================================
- Hits                                  15117    13902    -1215     
- Misses                                 1431     2625    +1194     
Flag Coverage Δ
total ?
unit 84.11% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

1 participant