-
Notifications
You must be signed in to change notification settings - Fork 38
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
flatShaded mode will render black if viewport is not set to flatShaded prior to capture #91
Comments
Great report - thanks! However, it would still be even better if we can point to the specific line of code or snippet that "always" makes it happen so we have a reproducable. I've seen issues before with consecutive playblasts where some things were not getting inherited. If there's any chance you could investigate slightly deeper that would be of great help. |
Yeah, I hard coded that into capture.py right before the playblast command is called just to get as close to the source as possible and still had the issue. The hack that I put in place just to force things was a line right before capture runs that looks like this:
I restore it after capture runs like this:
Not elegant, but just a clue as to what's going on. So far this has resolved my issue. |
The most reproduceable case I found was:
This fairly consistently produced black renders for me. If it doesn't the first time, try again by first rendering with smoothShaded My default settings for those params are:
In most cases merely changing 'smoothShaded' to 'flatShaded' (while the current viewport is in 'Smooth Shade all') will reproduce the issue. My viewport options are explicit rather than sparse here - made by querying the maya modelPanel settings for all of the |
Sporadic issue in maya2022, I run a series of 4 playblasts where the main modifications are to the viewport_options:
A simplified sample function would look like (sorry, haven't tested the exact function, but should have all the main bits):
Then these are run in the following sequence:
It seems that fairly consistently, if the active viewport is not set to flatShaded - flatShaded playblasts turn out blank. Similarly true with the "displayTextures" setting. If the main viewport is not first set, the renders turn out blank.
A bit difficult to put your finger on, though, as in some sessions everything works. But upon opening a clean maya session and re-running, typically any except the "smooth_lit_tex" one above will turn out black.
The hacky workaround I found was to temporarily force all modelPanel's to use my target "viewport_settings" in code, run the capture command, and then reset. The suspicion being that the panel created within the
capture
command is actually inheriting something from the viewports and it's not being successfully overwritten due to some maya 2022 bug.Platform: Windows 10
Maya Version: 2022.3.0-18.0.PFIX
The text was updated successfully, but these errors were encountered: