-
Notifications
You must be signed in to change notification settings - Fork 341
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
Texture baker updates #1141
Texture baker updates #1141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really promising, thanks @kwokcb.
I would recommend that we harmonize on a single name for the flag that controls this new behavior, rather than inverting the name between our Python scripts and C++ classes (e.g. "writeSingleDocument" vs "writeSeparateDocuments").
One suggestion for a unified naming convention would be "writeDocumentPerMaterial", which seems clear enough for new readers to follow. We would then provide this same flag name in both Python scripts and C++ classes, and follow your existing convention of defaulting its value to "true" for backwards compatibility.
Sorry, I missed this. I will clean up the naming issues. Thanks. |
Fixed to use consistent option naming and added in example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, thanks @kwokcb! I'd be interested in thoughts from @lfl-eholthouser as well, since she has done development work in this area.
@kwokcb With the recent contribution of Metal support, you may need to update this changelist to accommodate the refactoring of GLSL/MSL rendering functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this look great @bernardkwok. Thanks!
Merge is done. The only change is to add the Python wrapper for Metal version of the TextureBaker interface. |
* Pre-update pre for1.38.7 which now includes bake to single doc checked in. AcademySoftwareFoundation/MaterialX#1141 * Update reults files. * Update MaterialX. * Update gitmodule to use ASWF main. * Update MTLX. * Update to head for MaterialX.
Add in option to write output to single document: writeDocumentPerMaterial - Add texturebaker utility option - Add translateshader utility option
Issue
Changes
Add in option to write output to single document:
writeDocumentPerMaterial
texturebaker
utility optiontranslateshader
utility optionUpdate MTLXView to have a minimum bake size set to 1K to match
texturebaker
and allow for single document option:Results
vs 1 document:
with the following result:
Note that an invalid arg will now throw an exception
error: argument --writeDocumentPerMaterial: Boolean value expected.
which is performed in a new
stringToBoolean()
utility added to MaterialXdatatypes.py
Chess set bake result:
standard_surface_chess_set_baked.mtlx.txt