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

LOOKDEVX-470 : Initial support for export. #1177

Merged
merged 4 commits into from
Apr 29, 2021

Conversation

feldstj
Copy link

@feldstj feldstj commented Apr 27, 2021

No description provided.

@@ -11,5 +11,5 @@
<look name="defaultLook">
<materialassign name="defaultMaterialAssign" collection="defaultCollection" material="defaultMaterial"/>
</look>
<lookgroup name="defaultLookGroup" looks="defaultLook" activeLook="defaultLook" />
<lookgroup name="defaultLookGroup" looks="defaultLook" enabled="defaultLook" />
Copy link
Author

Choose a reason for hiding this comment

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

defaultLook.mtlx fix

@@ -0,0 +1,48 @@
<?xml version="1.0"?>
Copy link
Author

Choose a reason for hiding this comment

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

Needed for test case.

source/MaterialXRuntime/RtFileIo.cpp Show resolved Hide resolved
source/MaterialXRuntime/RtFileIo.cpp Show resolved Hide resolved
source/MaterialXRuntime/RtFileIo.h Show resolved Hide resolved
@@ -2719,3 +2719,54 @@ TEST_CASE("Runtime: duplicate name", "[runtime]")
REQUIRE(graph1.getOutputSocket(ADD5));
REQUIRE(duplicateCount(ADD5) == 1);
}


TEST_CASE("Export", "[runtime]")
Copy link
Author

Choose a reason for hiding this comment

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

Simple test case.

Copy link

@bernardkwok bernardkwok left a comment

Choose a reason for hiding this comment

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

Some logic comments and also that we require export at the core level and not inside runtime
for general usage.

source/MaterialXRuntime/RtFileIo.cpp Show resolved Hide resolved
source/MaterialXRuntime/RtFileIo.cpp Show resolved Hide resolved
source/MaterialXRuntime/RtFileIo.cpp Show resolved Hide resolved
source/MaterialXRuntime/RtFileIo.cpp Show resolved Hide resolved
source/MaterialXRuntime/RtFileIo.cpp Show resolved Hide resolved
source/MaterialXRuntime/RtFileIo.cpp Show resolved Hide resolved
@bernardkwok bernardkwok added this to In progress in Develop via automation Apr 27, 2021
Copy link

@bernardkwok bernardkwok left a comment

Choose a reason for hiding this comment

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

Looks good.

LookPtr mainLook = mainLookGroup->combineLooks();
// Delete the mainLookGroup
removeChild(mainLookGroup->getName());
// Append look names that don't belong to the mainLook to lookNames

Choose a reason for hiding this comment

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

"append the looks which are not the main look."

@@ -362,6 +372,32 @@ string writeToXmlString(DocumentPtr doc, const XmlWriteOptions* writeOptions)
return stream.str();
}

static void mergeLooks(DocumentPtr doc, const XmlExportOptions* exportOptions)

Choose a reason for hiding this comment

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

We should move this to the anonymous namespace at the top and make non-static.

Develop automation moved this from In progress to Reviewer approved Apr 28, 2021
@bernardkwok bernardkwok changed the title Initial support for export. LOOKDEVX-470 : Initial support for export. Apr 28, 2021
@feldstj feldstj merged commit 0fda845 into adsk_contrib/dev Apr 29, 2021
Develop automation moved this from Reviewer approved to Done Apr 29, 2021
@feldstj feldstj deleted the adsk_contrib/export branch April 29, 2021 14:56
ashwinbhat pushed a commit that referenced this pull request Jan 4, 2023
I've encountered shading artifacts in normal mapped MaterialX materials, and upon closer inspection I believe that these are caused by the missing basis orthogonalizations @Tellusim brought to attention in PR #1049.

However, instead of using a second normalize(cross(..)) call, I've applied the Gram-Schmidt algorithm.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Develop
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants