-
Notifications
You must be signed in to change notification settings - Fork 129
Maya: Enable publishing render attrib sets (e.g. V-Ray Displacement) with model #1955
Maya: Enable publishing render attrib sets (e.g. V-Ray Displacement) with model #1955
Conversation
render_set_types = [ | ||
"VRayDisplacement", | ||
] | ||
render_sets = cmds.ls(look_sets, type=render_set_types) | ||
if render_sets: | ||
history.extend( | ||
cmds.listHistory(render_sets, | ||
future=False, | ||
pruneDagObjects=True) | ||
or [] | ||
) |
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 part also fixed an issue that I found when publishing regular look with VRay Displacement node that uses texture file.
The resource of file texture node that connected to the displacement node is not being remapped during look extraction, because the file node was not being collected here. Hence the published displacement node still linking to working texture file.
I'll continue the discussion here to keep in central. I'm wondering if this shouldn't actually be a different family and subset, rather than a representation. We're not exactly exporting the same data, but a fair bit more. Another option would be to dynamically name the representation with as Or simple |
edit: this comment is outdated
🤔 I think that depends on how many subset will be created when publishing from one model instance ? Here's the bottom line for this feature to be implemented :
So with above in mind... 🚀 If only one subset, then it should belong to But if more then one subset could be generated, And in loading part, where the real beef is, maybe an auto look assignment plugin could be implemented so the artist could load |
Instead of loading whole render(augmented) model from Loader, *import* those render sets from scene inventory as model's metadata which allow lookDev artist to modify it and optionally publish a look from there.
Okay, I have refactored and updated the top description for this new implementation. 🚀 |
@antirotor could you please review this when you find some time? |
Following set types are also included in latest commit :
|
I've found somethings wrong, probably even with the original look extractor: It seems that once I have my workfile as Maya Binary, it doesn't want to save it as Maya ASCII as we are forcing it by Shouldn't it get its format from |
@antirotor Ah yes, I have that fixed in previous implementation (9f11165) but reverted and didn't add back. |
After da7dda6, original look extractor and the model render set extractor both able to respect studio scene type config. |
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.
Works perfectly! 👍🏻
This close pypeclub/client#137.
Feature
Enable extracting render attribute sets (e.g. V-Ray Displacement) while publishing model, as model representation's metadata. So optionally, lookdev artist could use them while working on the model as for a suggestion (or bootstrap) from modeler.
Workflow
Say a modeler have this scene ready to publish a model. There are some simple shading and displacement sets applied to those meshes.
Modeler published the model, lookdev artist takeover and start to work. Model has been referenced from Loader.
Lookdev artist go to the Scene Inventory tool, trying to apply render attribute sets which has been published with current loaded model, to see if they could help.
Render attribute sets has been imported, now the lookdev artist can play with them however he/she wants. Even delete or rename those sets, and whether or not to publish look with them.
Implementation
In contrast to previous implementation (90d80dc), this refactored workflow doesn't change the content of current representation nor add new representation.
Well actually there are two new representation types (
meta.render.ma
andmeta.render.json
) be extracted on model publishing since the render attribute sets are being treated as look, just that there are no Loader plugin for them so they won't be loadable in Loader action menu.original propose from 90d80dc (outdated info)
What's Changed
A new model family representation was introduced:
fried.ma
(orfried.mb
if project settings maps the file extension tomb
).This new representation will not only save extracted un-shaded, clean model, like the regular model representation does, but also
objectSet
nodes (e.g. V-Ray Displacement) which holds rendering attributes that are related to the published models.Noticed that if there isn't any render attrib objectSet is affecting the model in workfile, this new representation won't be generated from version publishing.
Fried model ?
The representation name,
fried.*
, is try to express the model is not being shaded, however it could be bumpy due to the displacement node that being published with it, or other render attributes like subdiv-level which contributed from other rendering related objectSets.Caveat
fried.*
model via look-assigner tool. If the look also has it's own render attrib sets like fried model does, sets from look may supersede the model's.Implementation details
Since this feature in essence is like publishing model with it's look but without shading-groups. So to avoid implementing new logic for this feature, the publishing code path is inherited from look family.
Currently only V-Ray is tested, Redshift and Arnold shall be tested in next couple days.
[cuID:yjx9fn]