ScriptSpot

Script

MFRender

By jos · 2011-09-29

Version
2.1
Version requirement
3ds Max 2011, 2012, 2013
Date updated
2012-08-17
Votes
9
Description

MFRender



render multiple max files very easy with this script.

 

how to use :

Drag this script in Max or run via MAXScript -> Run Script.

Render settings will be used from the files unless you overwrite them.

If you need more info, just comment. I hope the interface is obvious.

Log:

-15/09/2012 : added option to shutdown/logoff/quitmax after rendering (user request)

Attachments

Tags: files, auto render, Batch Render, multiple, max files, render files, render multiple files

Comments (29)

MFRender + BatchCameraRender

ratatouille · 2023-07-30

Hi,
Could you please support the batchcam please?
I believe That makes the rendering easier.

Also, it does not work with 3dsmax 2023 -2024

I think you are alive! :)
At least let us know that you are alive.

Thanks!

Max 2020 support

MohitKattar · 2019-11-03

Plz help me i needed this script with max 2020 support or any other Substitute for this let me know

BackBurner submission, please :)

NicolasC · 2016-02-26

Hello,

Great script, but BackBurner support is really needed ... do you think it could be added ?

Thanks !

MFRender + BatchCameraRender

sergo · 2015-08-31

Hi Jos!

I have batch rendering script here on scriptspot - http://www.scriptspot.com
/3ds-max/scripts/batch-camera-render

I've got feature request from users to make my script work with yours. Do you mind if I edit your script a little so that it can render scenes through my script?
This will enable rendering different cameras from each scene with different settings for each camera, including submitting each scene to network render.

Hey sergo

dollah3d · 2018-08-14

mfrender + batchcamera render sound cool.can i try it?

pproestos · 2014-12-01

This is the code for Mfrender V1, but when I run it with 3ds max 2012 nothing happens!!! PLease any help?

/*
Script for rendering multiple files easy
made by Jos Balcaen

version 1.0

how to use :
select the files you want to render. the files have to be ready!
including : output path, size, renderer, ... complete render setup.
this script just push the render button
*/

macroScript render_for_spano
category:"Custom"
tooltip:"Render multiple files"
buttontext:"MFRender"
(
rollout myRoll "Render multiple files"
(
local number_of_files = 0
local ListOfMaxFiles = #()

button btnBrowseFile "Browse for files" width: 370
multilistbox mlbMaxFiles
label lbNumberOfFiles " No files selected"
button btnRender "Render all files" width: 370 height:30

on btnBrowseFile pressed do
(
/*
--path = (getSavePath caption:"Select Save File directory")
path = getMAXOpenFileName()
if path != undefined then
(
append ListOfMaxFiles path
mlbMaxFiles.items = ListOfMaxFiles
number_of_files = mlbMaxFiles.items.count
lbNumberOfFiles.text = number_of_files as string + " files selected"
)*/

--NEW CODE
/*****************************************/
theDialog = dotNetObject "System.Windows.Forms.OpenFileDialog" --create a OpenFileDialog
theDialog.title = "PLEASE Select One Or More Files" --set the title
theDialog.Multiselect = true --allow multiple files to be selected
theDialog.Filter = "MAX Files (*.max)|*.max|All Files (*.*)|*.*" --specify the filter
theDialog.FilterIndex = 1 --set the filter drop-down list to All Files
result = theDialog.showDialog() --display the dialog, get result into variable
result.ToString() --when closed, convert the result to string
result.Equals result.OK --returns TRUE if OK was pressed, FALSE otherwise
result.Equals result.Cancel --returns TRUE if Cancel was pressed, FALSE otherwise
join ListOfMaxFiles theDialog.fileNames --the selected filenames will be returned as an array
mlbMaxFiles.items = ListOfMaxFiles
number_of_files = mlbMaxFiles.items.count
lbNumberOfFiles.text = number_of_files as string + " files selected"
/*****************************************/
)

on btnRender pressed do
(
starttime = timeStamp()
--NEW CODE
/*****************************************/
theTimer = dotNetObject "System.Windows.Forms.Timer" --create a Timer
fn printTime = (print localTime) --define a MAXScript function to be called by the Timer.
dotnet.addEventHandler theTimer "tick" printTime --add ON TICK event hander to call the function
theTimer.interval = 1000 --set the tick interval to 1 second (1000 milliseconds)
theTimer.start() --start the Timer
timerstringstart = printTime() --NEW CODE
--theTimer.stop() --use this method to stop the Timer.
/*****************************************/
for i = 1 to (mlbMaxFiles.items.count) do
(
loadMaxFile (mlbMaxFiles.items[i] as string) quiet:true
actionMan.executeAction 0 "50031" -- Render: Render
)
theTimer.stop()--NEW CODE
printTime() --NEW CODE
timerstringend = printTime() --NEW CODE
total_time = theTimer.interval as string
endtime = timeStamp()
tijdsinterval = ((endtime - starttime) / 1000.0)
tijdinuur = ((endtime - starttime) / 1000.0)/3600
--messagebox("succeeded, het renderen duurde \n" + tijdsinterval as string + " seconden \n" + tijdinuur as string+ " uur" )
messagebox("succeeded, \n" + "start time : " + timerstringstart + "\n end time : " + timerstringend)-- + "\n total time : " + total_time)
)

groupbox boxinfo "Info" height: 150 width:370
label lblinfo "Important : \n each file must be ready to render. (complete render setup) \n beware of fileoverriding!" height:100 width: 300 pos:[25,240]
label jos "Made by jos_balcaen@hotmail.com" pos:[250,370]

)

createdialog myRoll width:400 height:390

)

It's a macroScript

NiK684 · 2014-12-02

This is because it's a macroScript. Check Customize UI > Toolbars > cat. Custom > Render multiple files

PLEASE HELP

pproestos · 2014-12-01

It's very urgent.

Please can somebody send the V1 of mfrender because this
last version doesn't work well with 3ds max 2012...

thanks.
my email is pproestos@gmail.com

For those who got ouput error

NiK684 · 2014-11-14

Hi there. I'm not a developer of this script but I got an ouput error too. So I fixed it a little.
You need to replace this string

if rendSaveFile do (sOutputfile =  "outputfile:\"" + rendOutputFilename+ "\" ")

With this piece of code copied from script itself.


if rendSaveFile do (
	sOutputfile =  "outputfile:\"" + rendOutputFilename+ "\""
	tokens = filterstring sOutputfile "\\"
	sOutputfile = ""
	for i = 1 to tokens.count do
	(
	if i != 1 then (sOutputfile += "\\\\" + tokens[i])
	else (sOutputfile += tokens[i])
	)
)

If I will add some extra features, I will post it here later.

UPDATE: I almost finished piece of code that allows to render each camera in each scene.
to byaminaraz, you want globally select render preset or individually for each scene?

jos · 2014-12-24

Thanks for the fix. I'll have a look to integrate this after the holidays.
I'll also add support for multiple camera's. So if you have some idea's or code to share please send it to me. Cheers Jos

MF render Multi Cam

multimedsguy · 2015-01-30

Hi Nik, I came across your post, this would be a great tool to have. Were you able to get the camera renders per file portion of the code working?

select the render preset

byaminaraz · 2014-09-18

Hello guys this amazing script but ıf you add select render preset button it is more amazing

path error

dub73 · 2014-07-22

Hi,

looks like a great script, but is it working with 2014 in a network env?
I get an error when saving the image in the pre-defined output path (max file).
There is \ missing at the beginning that links to a network path

like

\\storage\data\....

it can not save the rendered image :/

Perfect Job

Gspoutnik · 2014-03-16

Thank you
This is one of the best scripts i have used.
Simple and useful.
I have 3 pc at home and I was able to manage the rendering of a hundred small animations easily.
happiness!

Good job

network path

dub73 · 2014-01-10

"we got an error while rendering to network path" same for me. After rendering it could not save the *.tif file on a network path.

3ds max 2012 + vray + w7

Attachments

dub73

dub73 · 2014-07-22

same for us :(

Really Working In Max 2014???

nayan2147 · 2013-12-18

Did Script render all camera in all files?Plz Any Reply....

hi there ! you script is very

knoxville · 2013-08-09

hi there ! your script is very helpfull right now !!! but we got an error while rendering to network path. it is a file input-output error one. i can explain more precise if needed. anyway. cool script ! thanx !

MFRender

AlexYu · 2013-07-31

Just a brilliant script!!! Thank you very very much!!!

not render multiple cameras

3D DECOR · 2012-09-18

very good script
but it does not render multiple cameras
only one camera
hope you write offline

+1

barigazy · 2012-09-19

Not bad Jos.
Not bad at all.
Good suggestion 3D DECOR, It would be nice to have option to render multiple cameras.

RE:multiple cameras

jos · 2012-09-21

That's indeed a good suggestion. It's on my list!

dori3d · 2012-09-11

Thanks for sharing this very handy script. I've worked with it and it saves me a lot of clicks.

- Feature request:
Can you put some features to quit Max or shutdown the machine after the render?
A similar script is here: here:

thanks

jos · 2012-09-14

I'm glad you could use it! That's a good request, I've added the option. You can now choose to shutdown, log off or quit max after rendering.

dori3d · 2012-09-15

Great, thanks for updating the script man.

- Feature request: Global Overwrite Settings
Is it posible to chose a specific camera and scene state from the selected maxfile? Would be great feature for rendering from multiple cameras from the same max file on the fly.

Keep it up with the great work ;)

awesome script

pproestos · 2012-06-16

Jos you are a GOD
thank you for this script.

it saves lot of trouble when batching inside huge max file and
memory issues appears.

you rule man...

twice my msg... :)

pproestos · 2012-06-16

perfect script again

Great!

bordos · 2011-12-05

Thanks for sharing!

video demo

chakib · 2011-11-25

thanks but a video demo will be more than welcome !