-
Notifications
You must be signed in to change notification settings - Fork 129
Substance Painter: Thumbnail errors with PBR Texture Set #6127
Conversation
…ithout RGB channel
Task linked: OP-7704 Substance: thumbnail error |
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 have tested both scenarios with and without Emission
channel and both correctly Publish
.
If not Emission
present then the texture set doesnt contain it and if so then it is correctly added into texture set
.
Also when creating publish instance for 2d view
preset for texture set, all seems working normally.
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.
Out of curiosity - wasn't allowing an export to pass if a channel does not exist for the template basically this toggle on the instance?
…data into the imageinstance
This is now fixed by setting the
This is related to this error:
Which basically shows that the thumbnail extractor is incapable of generating a thumbnail for an image that has only one channel - but I think we're best of - for those cases - to generate a single channel preview image (basically the luminance). If the input image has only one channel, there's hardly any discussion about what channel should we use? So I'd argue that for that case we should instead solve the Thumbnail Extractor/Encoding logic so that if an input image has only one channel - to just always rely on that channel. To me that's a sensible default behavior. Since unfortunately in Substance Painter API there's no way of really knowing for sure what channels are in an output image of an export preset (I haven't found that code in the API at least) there isn't really any way to know whether the file called @iLLiCiTiT @mkolar thoughts? |
we might analyze the image using oiio tool as we are already doing in extrac review I think. That should give you information about channels. See OpenPype/openpype/lib/transcoding.py Line 476 in 837acf9
|
It wouldn't tell us whether the image is the Specular, Diffuse, Metalness, Height, etc. map. It would only tell us whether the image has one or more channels. (Also, this channel data retrieval is already being done by e.g. the thumbnail extractor). (Note that in substance painter you can mix any channels, e.g. metalness, specular, etc. into a single output file as well - all depending on the output template used; which the API doesn't allow us to parse for what type of channels are in a particular output) As such, as my recommendation. I think we should disregard 'what type of output channel it is' in the context of substance painter since the API doesn't reliably allow us to retrieve that data (yet?). But, if e.g. a Height image is written and thus it exists of only one channel as opposed to multiple then we can be sure that the output thumbnail should be a preview of that single channel. |
I mean we could change the logic in extract thumbnail so it doesn't look only for rgba channels but if there is at least one, use it and copy it to rgb. We'll need to solve somehow how to deal with data that are not image (like point positions). Anyway, I think this is work for another PR that would touch how thumbnail are generated in that case. |
If that's the case - then keep only the 👍 |
already made a update to remove the related codes. |
@LiborBatek can you test again? And please keep in mind that the current code would error out height map in extract_thumbnail. Thanks! |
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.
Besides the thumbnail error on height map
it works ok and evaluates well when present/lacking emission
channel.
Also worth noting that if capturing the thumbnail
via capture screen in the Publisher
then it does not crash on thumbnail
speaking of height map
because asset using user defined thumbnail instead (working well and without any errors in this situation)
Changelog Description
When publishing with PBR Metallic Roughness as Output Template, Emissive Map errors out because of the missing channel in the material and the map can't be generated in Substance Painter. This PR is to make sure
imagestance.data["publish"] = False
so that the related "empty" texture instance would be skipped to generate the output.Additional info
Need to double check if the maps have some colorspace issues after publishing.
Testing notes: