Skip to content

[Render] Python renderer produces different results from C++ MaterialXTest for procedural/convolution/color_mgmt materials #27

Description

@ppenenko

Description

When comparing Python pytest renders against C++ MaterialXTest baselines (both using the same _options.mtlx scope), several material categories produce visually different results. These failures occur identically in both TestRenderStdlibMaterials (no overrides) and TestRenderMetashadePassthru, confirming they are Python/C++ renderer differences, not Metashade override issues.

Failing materials

Material Subtest Mean FLIP Category
standard_surface_onyx_hextiled M_OnyxHextiled 0.1813 Non-deterministic procedural
flake test_flake2d 0.0742 Non-deterministic procedural
blur blur_cellnoise/out 0.3178 Convolution
heighttonormal vec_out 0.1496 Convolution / normals
heighttonormal ss_out 0.0997 Convolution / normals
heighttonormal usd 0.0623 Convolution / normals
color3_vec3_cm_test height_to_normal_cm/out 0.1338 Color management

Observations from visual inspection

  • heighttonormal subtests show what appears to be inverted or flipped normals relative to the C++ baseline
  • hextiled and flake show random pattern differences (likely non-deterministic seeds)
  • blur_cellnoise shows a completely different noise pattern
  • color3_vec3_cm_test failure is in the height_to_normal_cm subtest (same normal issue)

Potential causes

  1. Convolution / heighttonormal: fileTextureVerticalFlip or coordinate convention difference between Python mxrenderer.py and C++ ShaderRenderTester
  2. Procedurals (flake, hextiled): GPU-side random seeds differ between render sessions — inherently non-deterministic
  3. Color management: may involve unsupported color space transforms (C++ logs show "Unsupported color space transform" warnings)

Note on add_additional_test_streams

The Python implementation of add_additional_test_streams differs from C++ in 10/11 stream fill algorithms, but none of the failing materials use those streams. They only depend on i_texcoord_0 from the OBJ loader. The stream differences would affect geompropvalue.mtlx and streams.mtlx (not in _options.mtlx scope).

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions