-
Notifications
You must be signed in to change notification settings - Fork 129
Maya Deadline: Fix Tile Rendering by forcing integer pixel values #3758
Conversation
There is an issue unrelated to this PR, but could be fixed here or should I create a new issue?
|
@m-u-r-p-h-y could you show what value got submitted along with your job? Was the value the string It should be visible on the Job > Modify Job Properties > Submission Params > Plugin Info > |
yes, it is empty and the project settings: |
@m-u-r-p-h-y could you test with this new commit? By the way, that error should've only occurred with older Render instances in your scene that did not have the |
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.
rendering is working fine in deadline
there is an error in OpenPypeTileAssembler though
Error: ValueError : invalid literal for int() with base 10: '540.0' (Python.Runtime.PythonException)
File "C:\ProgramData\Thinkbox\Deadline10\workers\WS01\plugins\630e2a587c5c5d5974843eea\OpenPypeTileAssembler.py", line 335, in render_argument
"height": int(data["Tile{}Height".format(tile)]),
at Python.Runtime.Dispatcher.Dispatch(ArrayList args)
at __FranticX_GenericDelegate0`1\[\[System_String\, System_Private_CoreLib\, Version=4_0_0_0\, Culture=neutral\, PublicKeyToken=7cec85d7bea7798e\]\]Dispatcher.Invoke()
at FranticX.Processes.ManagedProcess.RenderArgument()
at Deadline.Plugins.DeadlinePlugin.RenderArgument()
at FranticX.Processes.ManagedProcess.Execute(Boolean waitForExit)
at Deadline.Plugins.PluginWrapper.RenderTasks(Task task, String& outMessage, AbortLevel& abortLevel)
I used the same scene for sure, rendering of tiles was successful, but tile assembly is not working now . . |
Ah sorry for wasting your time - I had missed some variables. However looking at this again I think this might have been a Py3 issue due to some divisions now returning float values - which also explains why this had worked in the past (py2-Maya-era). So I've forced an integer division now and reverted some of the changes. Sorry to say it again, but if you have some time to try again - then thank you very much! 🙈 |
Submitting from Maya works, but there is still a couple of issues. passing of offset values to oiio is not working, but I'm not sure if it is more suitable for standalone issue/PR or we can continue here?
|
Thanks - we could move it to another issue/PR but I think it's somewhat related to some changes I've made here.
That gets generated here and thus it looks like it finds a IF a negative value is required it should actually be args.append("--paste {x:+d}{y:+d}".format(x=pos_x, y=pos_y)) I'll add a commit to do so. |
This allows negative offsets to be pasted
So I'm not sure about the tile formatting logic. Currently it does this: width = 1920
height = 1080
tiles_x = 2
tiles_y = 2
w_space = width // tiles_x
h_space = height // tiles_y
for tile_x in range(1, tiles_x + 1):
for tile_y in range(1, tiles_y + 1):
print("--------")
print("Tile(x={}, y={})".format(tile_x, tile_y))
top = height - (tile_y * h_space)
bottom = height - ((tile_y - 1) * h_space) - 1
left = (tile_x - 1) * w_space
right = (tile_x * w_space) - 1
print(
f"""
top
{top:^5}
left right
{left:^5} {right:^5}
bottom
{bottom:^5}
""") Resulting in e.g. this:
Which seem like odd numbers - no? I'd have expected right to end on 960 and 1920? Like this: width = 1920
height = 1080
tiles_x = 2
tiles_y = 2
w_space = width // tiles_x
h_space = height // tiles_y
for tile_x in range(1, tiles_x + 1):
for tile_y in range(1, tiles_y + 1):
print("--------")
print("Tile(x={}, y={})".format(tile_x, tile_y))
top = height - (tile_y * h_space)
bottom = height - ((tile_y - 1) * h_space)
left = (tile_x - 1) * w_space
right = (tile_x * w_space)
print(
f"""
top
{top:^5}
left right
{left:^5} {right:^5}
bottom
{bottom:^5}
""") Either way, that doesn't explain how you got to a negative number like -540 in the first place. @m-u-r-p-h-y what was you resolution and amount of tiles? |
As mentioned up on OpenPype Discord the OpenPypeTileAssembler isn't working currently as it should. I'd say it might be best to leave that out of this PR - or keep this PR open until a decision is made on how to fix the full implementation of using Draft or the OpenPypeTileAssembler? Let me know how you'd like me to proceed. |
Regarding deadline submit, the tile calculations are for Deadline Draft, which is now free (or should be?), so we should maybe change default tile renderer to Draft in settings. To fix |
I would suggest changing the default settings to Draft plugin in Deadline settings to make it usable. Until we sort out the @BigRoy can you add this change to this PR so we can merge it? |
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.
tile rendering and Draft assembly work as expected
I would still recommend changing the defaults for deadline submit to Dratf (currently we default to OIIO) in openpype\settings\defaults\project_settings\deadline.json
publishing issue is tracked in standalone thread #3764
Apparently I had secretly sneaked some of the fixes into the other PR as well - which now makes this PR mostly cosmetic tweaks. @antirotor Could you check whether I've done some weird things or not? :) |
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.
it looks fine, thanks!
Be aware that this comment is still an open question. :) |
I would say that question is related to OpenPypeTileAssembler logic. Not important in this PR at all. EDITED: I just looked at changes here and those changes are related to |
I agree that the mentioned comment doesn't have relevance here and we can merge this. |
Brief description
This should resolve the issue faced in #3451
Description
Forces integer pixel values into the Tile Assembly config files.
Testing notes: