Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/source/_static/visual_materials/AsphaltDark.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/BrickRed.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/CeramicTileWhite.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/ChromePolished.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/CopperPolished.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/FabricGray.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/GlassClear.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/GlassClearSurface.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/GlassFrosted.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/GlassFrostedSurface.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/GlassSmoke.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/GoldMetal.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/GoldPolished.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/LeatherBrown.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/MarbleWhite.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/MirrorMetal.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/PlasticABSBlack.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/PlasticGlossyRed.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/PlasticMatteBlue.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/RubberBlack.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/SkinHumanLight.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/SoapBubble.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/SteelBrushed.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/WoodOak.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/advanced-materials.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/visual_materials/builtin-materials.webp
Binary file modified docs/source/_static/visual_materials/default-materials.webp
Binary file modified docs/source/_static/visual_materials/surface-materials.webp
23 changes: 21 additions & 2 deletions docs/source/guides/preview_material.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,32 @@ Each renderer must run in a separate process. `--gallery` requires Pillow and
matplotlib; install those packages if they are absent. Gallery composition runs
after native renderer cleanup and uses the saved captures.

## Studio lighting

The default `material-studio-v2` recipe uses the same lighting for every preset
so material appearances can be compared:

| Setting | Value |
| --- | ---: |
| Linear exposure multiplier | 1.6 |
| Environment emission intensity | 48 |
| Key rectangle light intensity | 150 |
| Fill rectangle light intensity | 120 |

Light colors, geometry and camera poses are fixed by the preview scene.
These settings are recorded in `results.json` under `lighting`, alongside the
`scene` recipe identifier. The catalog images use this recipe at 640×640,
six accumulation frames and 12 render iterations per frame. Material parameters
remain the authored preset values.

## Outputs and direct-native verification

Every render writes `<PresetName>_preset.png` and `results.json` under
`--output` (default `outputs/default-materials`). Use a separate directory per
variant or renderer to retain previous results. The report records the scene
recipe, renderer and DexSim version, capture settings, material source/revision,
serialized configuration, geometry choice, parameter readback and exclusions.
recipe and lighting, renderer and DexSim version, capture settings, material
source/revision, serialized configuration, geometry choice, parameter readback
and exclusions.
Unspecified configuration fields stay `null`; authored resource defaults are
not expanded into explicit overrides.

Expand Down
8 changes: 5 additions & 3 deletions docs/source/overview/sim/sim_manager/rendering/materials.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ EmbodiChain provides **24 public material presets** through one
material supplies the inward-facing interface for the bubble preview.

The images below are actual DexSim **0.5.1rc1 OfflineRT** renders. All presets
use the same studio lighting and exposure; a checkerboard and colored cards
make reflection, transmission and roughness visible. Click a material name in
a table to open its individual image.
use the same `material-studio-v2` lighting recipe: linear exposure 1.6,
environment intensity 48, key light intensity 150 and fill light intensity 120.
A checkerboard and colored cards make reflection, transmission and roughness
visible. Click a material name in a table to open its individual image. See the
{doc}`preview guide </guides/preview_material>` for reproduction settings.

## Create and override a material

Expand Down
32 changes: 27 additions & 5 deletions embodichain/lab/scripts/preview_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@

__all__ = ["main", "cli"]

_STUDIO_LIGHTING = {
"exposure": 1.6,
"environment_intensity": 48.0,
"key_intensity": 150.0,
"fill_intensity": 120.0,
}


def _positive_integer(value: str) -> int:
number = int(value)
Expand Down Expand Up @@ -344,7 +351,7 @@ def _render_materials(
min_bounces=3,
max_bounces=14,
tone_mapping_enabled=True,
tone_mapping_exposure=0.9,
tone_mapping_exposure=_STUDIO_LIGHTING["exposure"],
denoising=DenoisingCfg(window="optix", offscreen="optix"),
),
)
Expand All @@ -355,7 +362,9 @@ def _render_materials(
rows: list[dict[str, Any]] = []
try:
sim.enable_physics(False)
sim.set_emission_light([0.85, 0.9, 1.0], 24.0)
sim.set_emission_light(
[0.85, 0.9, 1.0], _STUDIO_LIGHTING["environment_intensity"]
)
# Independent, fixed scene: colored cards reveal transmission, broad
# rectangular lights reveal roughness and normal-map direction.
for index, (x, color) in enumerate(
Expand All @@ -381,8 +390,20 @@ def _render_materials(
texture = env.create_color_texture(pixels, has_alpha=False)
card_material.inst.set_base_color_texture(texture_obj=texture)
for name, location, direction, color, power in (
("key", (-2, -2, 3), (2, 2, -2), (1, 0.85, 0.7), 90),
("fill", (2, 0, 3), (-2, 0, -2), (0.6, 0.8, 1), 60),
(
"key",
(-2, -2, 3),
(2, 2, -2),
(1, 0.85, 0.7),
_STUDIO_LIGHTING["key_intensity"],
),
(
"fill",
(2, 0, 3),
(-2, 0, -2),
(0.6, 0.8, 1),
_STUDIO_LIGHTING["fill_intensity"],
),
):
light = env.create_light(name, render.LightType.RECT)
light.set_location(*location)
Expand Down Expand Up @@ -612,7 +633,8 @@ def capture(label: str) -> Any:
print(json.dumps(row), flush=True)
report = {
"schema_version": 1,
"scene": "material-studio-v1",
"scene": "material-studio-v2",
"lighting": dict(_STUDIO_LIGHTING),
"renderer": args.renderer,
"dexsim": version("dexsim-engine"),
"size": args.size,
Expand Down
Loading