AWS Thinkbox Discussion Forums

Render region sanity error

Hi,

We’ve had this for a few versions of deadline (currently running 8.0.11.2), but only just had time to work out the exact issue.

The images attached show a test scene where I kept running the sanity check with different locations of the render region in Vray, and 3ds max 2014, and you can see where the error about out of bounds happens.

With a very large render, say 8000 x 8000, the error only happens when the region is over to the left side, the right side does not matter, and the vertical location is not an issue either.

This is a pretty big issue for us as we often need to render a region where the error comes up, and as its fatal we cant get past it, and render the full frame.

Thanks,
Mark


Ok, unfortunately another issue surrounding the region.

The issue is I setup a render file, do a render, drag out a region, and submit to Deadline - it renders correctly - aside from the above issue!

I save and close the file, and reopen later, and hit render, and the region is now out of the VFB - the error is warning: Render region (45794, 13500)-(97325, 94950) is outside of image size (8500, 9000)

That’s pretty far outside the render size! This has been happening for a few months, and we’ve just not used region through deadline. Now I cant yet confirm that its Deadline doing something when submitted, where its moving the region, but I’m trying some tests now to see if I don’t submit first, then save and open, its does/doesn’t happen. I have tested on a few files and not submitted to Deadline, and the region is unchanged, suggesting it is Deadline doing it. But it doesn’t seem to do it every time, so a bit frustrating to find the course!

Hi,
It was reported to us by another client that if V-Ray VFB is enabled and V-Ray Get Region is enabled, then positioning the V-Ray VFB off-screen results in an error at render-time.

if renderer == "vray" then ( vr = renderers.current if vr.output_on AND (vrayVFBGetRegionEnabled()) then ( if vr.output_getsetsfrommax then ((vrayVFBGetRegion())[1] < RenderWidth) and ((vrayVFBGetRegion())[3] < RenderHeight) else ((vrayVFBGetRegion())[1] < vr.output_width) and ((vrayVFBGetRegion())[3] < vr.output_height) )

Please can I point out the difference above in whether you are using the V-Ray VFB render resolution dimensions or the built-in 3dsMax ones. This is typically the cause of many peoples problems and where V-Ray will error out at render time if you try to render a region (enabled) using coords which technically speaking are indeed, outside the render resolution you have declared to the renderer to render with.

Therefore, capture this at submission time via SMTD sanity check. The check can easily be commented out, by adding a “–” to this line in your file: “SubmitMaxToDeadline_SanityCheck_General.ms”

from this:

#(SMTD_SanityCheckFunctions.CheckForVRayVFBValidRegion, #fail, "V-Ray VFB - Render Region is outside the bounds of the current render resolution!", SMTD_RepairFunctions.FixVRayVFBValidRegion, true),

to this:

--#(SMTD_SanityCheckFunctions.CheckForVRayVFBValidRegion, #fail, "V-Ray VFB - Render Region is outside the bounds of the current render resolution!", SMTD_RepairFunctions.FixVRayVFBValidRegion, true),

The difference in your experience is probably down to whether or not you had “Render Region” enabled in the VFB in your particular 3ds Max scene file, as that would cause this sanity check to fire.

If you ask me, the root cause is probably an issue that might be best solved on the V-Ray side if they can reproduce.

Thanks Mike,

I can edit the code to get rid of the fatal error for now, but would you mind jumping on the VRay beta forum and commenting what you can to my thread? Vlado needs me to replicate it, which I am wasting a ton of time doing now!

I’m rendering with the max size dialogue but not overriding in the VFB settings. I can see how that would be an issue.

I see you have a posted a scene file for Chaos Group to test against. I will review the thread again tomorrow to see if there have been any further developments. Cheers.

Yes, the scene has the error, but still not 100% sure how to produce it!! Lets see.

Mike, could you review my VRay beta thread, I have now replicated the error, and I think its a Thinkbox issue, but not sure!

Which job submission option are you using in SMTD?
docs.thinkboxsoftware.com/produc … on-options

By default it is: “SAVE and Submit Current Scene File with the Job to the REPOSITORY”, which means that SMTD is saving a copy of the scene file and copying it into the job directory on your repository at submission time. I mention this as in your V-Ray beta post you mention the difference between saving the scene file or not. I wanted to pointed out that at SMTD submission time, we are saving the scene file.

Anyway, I did a bunch of testing, following your instructions exactly. I’m unable to reproduce this issue at all.

Using 3dsMax 2014 + latest nightly build of V-Ray 3.45.01 + Deadline 8.0.11.2 or 8.1.5.4.

I opened the test scene file you posted to the V-Ray beta forum and queried the V-Ray VFB region coords and they are indeed incorrect and beyond the realms of the 8500x9000 image resolution you are rendering, so I would fully expect Deadline to flag this in the SMTD sanity checker (assuming you are running a version of Deadline with this relatively new sanity check added to it and it is not commented out!) and also fail at render time. You can test this yourself in MAXScript:

[code]# Open your example scene file and execute command:
vrayVFBGetRegion()
–#(29006, 9600, 51531, 92400)

Open V-Ray VFB and draw/drag a region and then re-execute the command:

vrayVFBGetRegion()
–#(184, 80, 293, 177)

Open a fresh, vanilla 3dsmax scene file, and the V-Ray VFB region is always 0,0,0,0:

vrayVFBGetRegion()
–#(0, 0, 0, 0)[/code]

You can add the following lines to your “customize.ms” file so it prints this info as the scene file is loaded on your render nodes:

where you see this:

--Check VRay version. Function available in VRay v3+ vrayVersionCheck = try(vrayVersion())catch(undefined) --2 element array returned in VRay v3.0+ only #(version, build) if vrayVersionCheck != undefined then ( DeadlineUtil.LogMessage ( ">V-Ray version, build: " + (vrayVersionCheck as string) ) vrayVer = vrayVersionCheck[1][1] as integer ) else ( vrayVer = 2 )

add the following lines here:

[code] --Check VRay version. Function available in VRay v3+
vrayVersionCheck = try(vrayVersion())catch(undefined) --2 element array returned in VRay v3.0+ only #(version, build)
if vrayVersionCheck != undefined then (
DeadlineUtil.LogMessage ( ">V-Ray version, build: " + (vrayVersionCheck as string) )
vrayVer = vrayVersionCheck[1][1] as integer
)
else ( vrayVer = 2 )

	vfbRegionEnabled = try(vrayVFBGetRegionEnabled())catch(False)
	if vfbRegionEnabled do DeadlineUtil.LogMessage( ">VFB region rendering enabled: " + (vrayVFBGetRegion() as string) )[/code]

Are you sure you don’t just have a corrupt 3dsMax scene file for some reason?

I can’t explain why your V-Ray VFB region coords are soooo high: #(29006, 9600, 51531, 92400). Probably one for Vlado if you can reproduce it for him. Note, we do NOT touch these values at all in Deadline at any point.

Hi,

I’m just about to leave for the day, but wanted to reply as much as I can now.

We’re using the default submission method - “SAVE and Submit Current Scene File with the Job to the REPOSITORY”
so that is saving the open file in its opened location, then saving it into the repo? That is indeed strange if so as when it renders in Deadline its wrong, and when the file is reopened its right (unless the user saves after submission).

The scene shouldn’t be corrupt as its a clean scene, I’m doing nothing to it after loading max. And the maxstart we’re using has not been changed for months, and this issue only start 3/4 months ago to my memory. I cant remember if its been ok since D8 release.

Chaos are trying to reproduce, but no luck so far! To my simple mind, its like if the region is not applied in a render locally before submission Deadline is not reading this info. But I have no idea!

Let us know the results of the additional log message in customize.ms as I provided earlier. This will confirm the exact region coords that are present in the 3ds Max scene file at render time. Please send over the error log reports so we can review, perhaps there is something else going on here as both us and Chaos Group are unable to reproduce this issue. As this is the beta forum, can you upgrade to 8.1.5.4?

Morning,

Yes I can, but lost the link, would you mind sending over again?

Thanks, I’ll try to make the code change once updated, and test when I have time.
Mark

What link? I didn’t send you any link.

Hi, its fine, I meant the download link for the beta, but remembered its in the thread so go it downloaded, but waiting on a new lic before trying.

Hi Mike,

Just did a simple test, described the steps in the image attached. This is using a totally unchanged maxstart file, ie not my custom one with setting changed. The two images show the same issue in 2014 and 2017.

I cant make it more simple, the region code prints a region within the resolution, but the sanity check disagrees!

Hope this helps. I’m waiting for the beta lic to come over, then I’ll try in the latest beta.
Mark


In your file: “SubmitMaxToDeadline_SanityCheck_General.ms” search for this function:

fn CheckForVRayVFBValidRegion = ( local renderer = SMTD_SanityCheckFunctions.GetRendererIdString() if renderer == "vray" then ( vr = renderers.current if vr.output_on AND (vrayVFBGetRegionEnabled()) then ( if vr.output_getsetsfrommax then ((vrayVFBGetRegion())[1] < RenderWidth) and ((vrayVFBGetRegion())[3] < RenderHeight) else ((vrayVFBGetRegion())[1] < vr.output_width) and ((vrayVFBGetRegion())[3] < vr.output_height) ) else true ) else true ),

In the two places where you see the number: “3”, replace it with “2” as follows:

fn CheckForVRayVFBValidRegion = ( local renderer = SMTD_SanityCheckFunctions.GetRendererIdString() if renderer == "vray" then ( vr = renderers.current if vr.output_on AND (vrayVFBGetRegionEnabled()) then ( if vr.output_getsetsfrommax then ((vrayVFBGetRegion())[1] < RenderWidth) and ((vrayVFBGetRegion())[2] < RenderHeight) else ((vrayVFBGetRegion())[1] < vr.output_width) and ((vrayVFBGetRegion())[2] < vr.output_height) ) else true ) else true ),

Here’s the updated script.
SubmitMaxToDeadline_SanityCheck_General.ms.zip (9.23 KB)

I still don’t understand how this could then lead to the render region error at render time happening?

installing latest beta and I’ll try then do the code change as well, and get back to you.

Thanks Mike.

Hi again,

Installed the beta and no fix, changed the code and its FIXED!!! I have no idea what the 3 or 2 mean, but its worked.

Thanks for your help, we’ll test more with live projects and report any issues, but I hope thats it.

I’ll comment on the VRay thread that its fixed.

Mark

So, it seems that this issue is not fixed!! Its back today! Running the latest beta, and the region is getting moved out of the VFB seemingly after a submission.

What region coords are being printed to the 3dsMax log report, assuming you added the example code I provided previously.

Yes I meant to ask about that, where is the customise.ms!!? I have searched the Repo and local c: and not found it!!

I’ll make the change when I find it, and post the results.

Privacy | Site terms | Cookie preferences