AcademySoftwareFoundation / AcademySoftwareFoundation/MaterialX

Graph Editor: loading material with invalid connections / type mismatches

Open
#1,450 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.3k
Forks
451
Avg merge
6d 6h
Merged PRs (30d)
5

Description

Hi,

again codegen produced some invalid MaterialX code where we connect a color4 node to a color3 output.

The GraphView happily displays this connection when opening the file

![image](https://github.com/AcademySoftwareFoundation/MaterialX/assets/5083203/fb320504-ae7a-44b8-a989-0cfb1f4cbcf7)

I'm only getting an error when trying to pipe the output then into the shader

![image](https://github.com/AcademySoftwareFoundation/MaterialX/assets/5083203/30f1fd32-5f12-4f43-8984-ac9fb36ff071)

Problematic material:
```mtlx















```

Also attaching a video illustrating the issue
note that the invalid connection is correctly refused in the UI when trying to do it but not when loading the graph
also note that when I connect the subgraph output to the shader we get compiler errors and rendering breaks due to the type mismatch

https://github.com/AcademySoftwareFoundation/MaterialX/assets/5083203/62136046-aa6e-4142-b01c-cfd0ef7380e3

Contributor guide

Open the contributing guide

Research direction

Start by loading the problematic MaterialX document in the GraphView and trace the graph-loading path for connection validation. Compare its behavior with the UI's refusal of the same color4-to-color3 connection; done means invalid connections are rejected during loading before they reach shader compilation or rendering.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.