AWS Thinkbox Discussion Forums

3ds Max V-Ray export Workflow - Animation issues

Windows 10 1909
3ds Max 2019.3.4
V-Ray 43003
Deadline 10.1.9.2

I’m having an issue submitting vrscene animations from 3ds Max

Using the V-Ray Export Workflow, selecting a file per frame, the animation works for only the first 3 frames (0,1,2) then the rest of the files render as the last (2) frame.

This is reproducible, creating a spinning Teapot with V-Ray light, set up animation and export locally before submitting to farm.

If I use Single File It renders the animation ok

Would it be possible to get a job archive where this is happening?

1 Like

Here you go, it’s a very simple test, a rotating teapot with domelight, the paths will need changing of course!

cceagel__Vray__3ds_test_01 [VRAY SA]__5fa2dd5b4181b24e10fb7060.zip (610.1 KB)

So this looks pretty normal, the task reports show that V-Ray’s being passed the right frame number, and the output name looks right. Is it possible that the issue is with the scene? Knowing nothing about Max would it be possible to burn the frame number into the corner? Just wondering if the rotation isn’t happening properly.

Another idea - if you make the chunk size 10 instead of 1 do you see the same behaviour?

I’ll give that a go, the scene is ridiculously simple, and only created do to clients having complicated scenes with the same issue.

No it doesn’t change anything

I added a TextPlus object and added the frame variable into that, scrubbing through the scene it shows the frame number increase

When I render out it justs holds frame 2 after that task

I can’t chunk the task size to 10 because there isn’t this option in the V-Ray export workflow (Another thing to add to the wishlist :slight_smile: )

The issue is coming from the local export with V-Ray with the open 3ds Max application. I’ve tried this at different sites and issue is the same.

Weird! Could you send me that scene file? I should be able to duplicate this and get it in front of engineering to see what’s up.

I don’t have access ATM,

but take the previous file and do the following
Select TextPlus
image
Click in the viewport


Click Set Value As Text in the parameter roll out
image
Choose Edit
image
Add a variable (F) for Frames
image
Close it, then Insert in Text
image
Rename Text Plus to Frame or whatever you like
image
Scrub the timeline to check

I’ve saved this file with a physical camera and attached here, I haven’t added V-Ray lights or set the renderer as I’m using 5, have clients having the issue with various versions of 4 (43003, 42003 etc)frame numbers.zip (64.9 KB)

Any update on this? did you manage to reproduce the issue?

causing issues for clients as the single export file is huge and is slow, on top of that the standalone doesn’t seem to support task chunks…

Yes, so sorry about this!
A really bad case of copy&paste madness.

The logic for the local machine export looks like this:

case SMTDWorkflow_VrayStandaloneExport.ExportAnimationMode of
(
	1: (
			-- Single VRSCENE file for all frames
			exportToVRayStd vrsceneName startFrame endFrame
		)
	2: (
			-- Single VRSCENE file for per frame
			for i = startFrame to endFrame do
			(
				paddedFrame = formattedPrint i format:"04i"
				frameVrsceneName = getFileNamePath outputFilename + theMaxFileName + "." + paddedFrame + ".vrscene"
				exportToVRayStd frameVrsceneName startFrame (startFrame + 1)
			)
		)
	3: (
			-- Single VRSCENE file for per frame (incremental)
			paddedFrame = formattedPrint startFrame format:"04i"
			frameVrsceneName = getFileNamePath outputFilename + theMaxFileName + "." + paddedFrame + ".vrscene"
			exportToVRayStd frameVrsceneName startFrame (startFrame + 1)
			vrsceneFileHandle = createfile vrsceneName
			for i = (startFrame + 1) to endFrame do
			(
				paddedFrame = formattedPrint i format:"04i"
				frameVrsceneName = getFileNamePath outputFilename + theMaxFileName + "." + paddedFrame + ".vrscene"
				exportToVRayStd frameVrsceneName i (i + 1) incrBaseFrame:startFrame
				format "#include \"%\"\n" frameVrsceneName to:vrsceneFileHandle
			)
			close vrsceneFileHandle
	)
)

In the case 2:, it should be exporting frames i to i+1 within the loop, but it is exporting the first frame again and again.

So that code block should read

2: (
		-- Single VRSCENE file for per frame
		for i = startFrame to endFrame do
		(
			paddedFrame = formattedPrint i format:"04i"
			frameVrsceneName = getFileNamePath outputFilename + theMaxFileName + "." + paddedFrame + ".vrscene"
			exportToVRayStd frameVrsceneName i (i + 1) --> HERE IS WHERE THE PROBLEM WAS!
		)
	)

I suspect the problem came from the case 3: where the first (reference) frame export uses the start time as base. It appears that it was copied incorrectly to case 2:… instead of the one using the i/i+1 timing…

Please locate the file “…\DeadlineRepository10\submission\3dsmax\Main\Workflows\SMTDWorkflow_VRayStandaloneExport.ms” and modify the above line!

The Incremental mode seems to be correct though.

1 Like

On a related note, it appears that Frames Per Task (Chunk Size) was locked down to 1 when the Workflow was first implemented, with a note in the code that the V-Ray Standalone plugin might not be supporting it.

It appears that the V-Ray Standalone plugin actually does support the chunking of file per frame jobs, so you can make a few tweaks to reenable the control when this Workflow is selected:

  • Locate and modify the following function:

      fn updateUILayout = --Optional. This function could be used to apply changes to the visilibity of existing controls
      (
      	local inactiveControls = #("chk_restartMax", "chk_forceWorkstationMode", "chk_useSilentMode", "ddl_MaxVersionToForce", "spn_cpuThreads", "chk_EnforceSequentialRendering", "btn_MaxVersionToForce")
      	for c in SMTD_JobOptions.controls do 
      	(
      		c.enabled = findItem inactiveControls c.name == 0
      		if not c.enabled do c.tooltip = "No available in this Workflow!"
      	)
      ),
    

Above, I have already removed the two ChunkSize-related controls from the inactiveControls list, thus enabling them.

  • Next, locate the code block around line 366 and modify it to look like this:

      	local frames = SMTDFunctions.GetFrameSequenceString()
      	format "Frames=%\n" frames to:jobInfoFile
      	format "ChunkSize=%\n" SMTDSettings.ChunkSize to:jobInfoFile
    
  • Save the Workflow script file and reopen SMTD. You should be able to submit with chunks > 1 now. Previously, you had to modify the Frames Per Task value in the Job’s Modify Frame Range dialog.

1 Like

This is great, thanks Bobo

I can confirm this fixes the export freezing

The second part doesn’t seem to work though , the chunks are still greyed out

image

Could you also clarify whether the chunking allocates 5 .vrscenes per task or combines 5 frames into a single .vrscene?

Thanks
Ant

It appears that your array of blocked controls still contains the button and the spinner controlling the Chunk Size. It should look like this:

local inactiveControls = #("chk_restartMax", "chk_forceWorkstationMode", "chk_useSilentMode", "ddl_MaxVersionToForce", "spn_cpuThreads", "chk_EnforceSequentialRendering", "btn_MaxVersionToForce")

Yours is probably

local inactiveControls = #("btn_chunk", "spn_chunkSize","chk_restartMax", "chk_forceWorkstationMode", "chk_useSilentMode", "ddl_MaxVersionToForce", "spn_cpuThreads", "chk_EnforceSequentialRendering", "btn_MaxVersionToForce")

Make sure you deleted "btn_chunk", "spn_chunkSize", from it!

Also, fix the spelling of the tooltip (I must have been blind!)
It should say “Not”

if not c.enabled do c.tooltip = "Not available in this Workflow!"

I will go and fix mine.

1 Like

This works, cheers

(I didn’t update the tooltip as it’s irrelevant now :smiley:)

I did, should ship in some of the future point updates.

1 Like
Privacy | Site terms | Cookie preferences