Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MaterialX Graph Editor #1169

Merged
merged 40 commits into from Jan 27, 2023

Conversation

lfl-eholthouser
Copy link
Contributor

The MaterialX Graph Editor is an example application for visualizing, creating, and editing MaterialX graphs. It utilizes the ImGui framework as well as ImGui extensions such as the Node Editor and File Browser.

@lfl-eholthouser
Copy link
Contributor Author

MaterialXGraphEditor_Marble
Here's an example image of the MaterialX Graph Editor with a procedural marble material.

This changelist implements a handful of minor simplifications to graph editor dependencies, removing the unused gl3w library and disabling installation steps for glfw.
Copy link
Contributor

@kwokcb kwokcb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lfl-eholthouser,

This is really great work and kudas for figuring out all the graph traversal logic :).

I've left a bunch of small nitpicks to peruse as you see fit.

In general, one thing I found was it was really hard to read the Graph code since it contains logic for handling many different areas: property editor, ui nodes, placement, node creation.
My general suggestion is that it would be great to have this separated out a bit more.

A related suggestion / query is I think the model is that the "model" is embedded with the "view" and things occur on both at the same time (is this correct?)

So it seems some things done many times since the MaterialX Data model needs to be constantly revisited (e.g. input / output information extraction). So related to the first comment is perhaps making UiNode more than just a dumb wrapper but have logic inside and enough cached information to avoid possible repetitive calls. e.g. it seems there is enough information cached for pins to perform traversal but the MaterialX datamodel still needs to be accessed.

For @jstone-lucasfilm , a general question is should Material and parts of RenderView be consolidated with what in MaterialXView even if just for maintenance purposes as it seems a lot has been copied over.

Thanks for your patience with my comments :). Again it's all small stuff.

documents/DeveloperGuide/GraphEditor.md Show resolved Hide resolved
documents/DeveloperGuide/GraphEditor.md Show resolved Hide resolved
documents/DeveloperGuide/GraphEditor.md Show resolved Hide resolved
documents/DeveloperGuide/GraphEditor.md Show resolved Hide resolved
documents/DeveloperGuide/GraphEditor.md Outdated Show resolved Hide resolved
source/MaterialXGraphEditor/Material.h Show resolved Hide resolved
source/MaterialXGraphEditor/Graph.cpp Show resolved Hide resolved
source/MaterialXGraphEditor/UiNode.h Show resolved Hide resolved
source/MaterialXGraphEditor/Graph.cpp Show resolved Hide resolved
source/MaterialXRenderGlsl/GLFramebuffer.cpp Outdated Show resolved Hide resolved
jstone-lucasfilm and others added 26 commits December 19, 2022 17:57
This changelist reorders the draw calls in the editor render loop, allowing a workaround in the framebuffer destructor to be removed.  Additional minor improvements include the storage of screen dimensions as unsigned integers rather than floats, aligning them with the storage in the framebuffer classes.
This changelist updates getDefaultSearchPath in MaterialXGraphEditor to match the latest, simplified version in MaterialXView.
* Remove copy of ImGui 1.88

* Add submodule for ImGui 1.88

* Update CMake for submodule
* Remove code for ImGuiNodeEditor

* Add submodule for ImGuiNodeEditor

* Update CMake for submodule
* Remove code for ImGuiFileBrowser

* Add submodule for ImGuiFileBrowser

* Update CMake for submodule
jstone-lucasfilm and others added 12 commits January 25, 2023 18:22
This changelist fixes minor issues flagged by PVS-Studio in Graph.cpp, including:
- Fix a duplicate null check in Graph::updateMaterials.
- Fix a mismatched empty string test in Graph::propertyEditor.
- Remove unused variables.
Signed-off-by: Jonathan Stone <jstone@lucasfilm.com>
Signed-off-by: Jonathan Stone <jstone@lucasfilm.com>
Signed-off-by: Jonathan Stone <jstone@lucasfilm.com>
@jstone-lucasfilm jstone-lucasfilm changed the title Adding MaterialX Graph Editor Add MaterialX Graph Editor Jan 27, 2023
@jstone-lucasfilm jstone-lucasfilm merged commit a9fd85f into AcademySoftwareFoundation:main Jan 27, 2023
Michaelredaa pushed a commit to Michaelredaa/MaterialX that referenced this pull request Oct 21, 2023
The MaterialX Graph Editor is an example application for visualizing, creating, and editing MaterialX graphs. It utilizes the ImGui framework as well as ImGui extensions such as the Node Editor and File Browser.
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.

None yet

4 participants