Author Topic: maxscript set bitmap output path in render batch  (Read 1214 times)

2022-07-26, 14:25:14


  • Active Users
  • **
  • Posts: 6
    • View Profile

I had a problem with setting an output batch via code in Maxscript 3D studio max.
When creating the batch and output to a png file, the render crashes using the backburner system via netrendering.
Code: [Select]
batchRenderMgr.netRender = true
nameFile = getFilenameFile(maxfilename)

perspCamObj = getnodebyname "PERSP_CAM"
perspCamBatch = batchRenderMgr.CreateView perspCamObj
perspNameCam = nameFile + "_" + = perspNameCam
perspCamBatch.outputFilename = maxFilePath + perspNameCam + ".png"

When setting the output manual (via the max batch dialog), the system renders fine via netrendering.

I found someone with a simular problem, but he uses Vray.

I can't find a way to bypass the problem using the Corona Render Engine the same way described in the link above.
Here they suggest the following for Vray render engine =>

Found a solution via another scripted file name attribute problem.
You have to create a bitmap and then parse the filename property of the bitmap instance to the intended attribute.
Here is an example with a similar problem when scripting the filename output property of vray render elements:
Code: [Select]
vr = renderers.current
vr.output_on = true
vr.output_splitgbuffer = true
/*here is where the joy starts, setting the name of the path and filename*/
fileName = outputFilename + "." + extension
/*now we create a temporary bitmap in that location*/
screwedBitmapCreation = Bitmap 10 10 fileName:fileName
/*save it and close it*/
save screwedBitmapCreation
close screwedBitmapCreation
/*now using the bitmap instance we parse the filename of
the bitmap to the render attribute .......LAME!!*/
vr.output_splitfilename = screwedBitmapCreation.filename

Any help would be appreciated to do this in Corona:
corona = renderers.current    --This works
corona.output_on = true        --No idea how to do this
corona.output_splitgbuffer = true        --No idea how to do this
corona.output_splitfilename = filenameForBitmap       --No idea how to do this

« Last Edit: 2022-09-21, 14:01:47 by bertv »

2022-09-22, 10:18:59
Reply #1


  • Active Users
  • **
  • Posts: 1798
    • View Profile
    • Rakete GmbH

the example in your code section #1 works here. Do you really get a crash or just a frame error? If crash: check Max.log on the render node and/or see if there is a minidump created.

Backburner submission via UI works for you?

God Luck

Never underestimate the power of a well placed level one spell.