Script - Batch Camera Render


#1

I’ve just finished to develop some interesting script, so this is a little announcement.

      Shortest description - this is another reincarnation of the Batch Render manager, so if you are happy with bundled one I can't guarantee you the strong impression.
      
      Very first idea to write such script came to me when I started to learn Houdini. Houdini has node architecture, and for the rendering it uses output nodes. These nodes have properties to specify included/excluded lights and objects, so you can create several output nodes and specify camera/lighting/objects relationship for each node. It's great feature and you can implement same relationship in 3dsmax using batch render command with "scene states" where you can specify lighting options and "render preset" where you can specify rendering properties.
      
      So what the problem with batch render? It lacks two features - you can not specify nonsequential frames and you can not specify new output file location for several cameras (or views) at once. I'm working with arhitectural vizualisation and in my projects I have many animated cameras, usually one for each room or another space, and very often all these cameras need different lighting setup so I have to create many sun-lights, and then switch them on and off for each cameras. Personally I don't like 3dsmax's scene state feature mainly because of their implicit nature, and when I need to render new variant of several rooms simple task becomes nightmare.
      
      When you start this script it iterate over all cameras in scene and list them in the dialog box. To each of these cameras you can assign frame resolution, number of frames to render including nonsequential frames, output file location and lighting setup. All these properties can be changed for one or several selected cameras. Output file location is split to folder path and file name, so you can specify new folder for all selected cameras in scene. 'Lighting assignment' section contains three list: Solo light list contains lights that will be only lights turned on during the rendering, 'Forced On' and 'Forced Off' lights are turned on or off respectively during the rendering. After all these setting will be set up (if some properties is not set value from the Render Setup will be used), check the camera(s) in the list and hit Render button. Check Net Render checkbox to submit network render job.
      
      Ok, the post became little longer than I expected so here is little summary in relation to 3dsmax's Batch Render:
      
      pros:
      1.Several cameras can be altered at once.
      2.Nonsequential frames can be specified.
      3.Output folder can be specified separately from the file name.
      4.Lighting assignment is clear and obvious - just select the camera in list and you'll see which light will be turned on.
      
      cons:
      1.In Batch Render, when you send several network rendering jobs, Batch Render submits them all at one time and automatically gives them custom job names. With my batch renderer this works differently - each job is submitted separately, for example, if you checked three cameras and hit render with network rendering checkbox turned on, script submits network job three times, and every time you have to give a new name to network rendering job. It's a limitation, but actually comes down to adding "1", "2", "3" or such a thing to job name.
      2.There's only one preset for one camera. In Batch Render you can specify several presets with different settings for same camera. For me this is not a limitation, because 'one camera - one preset' is clear and enough for me.
      3.'Scene State', 'Render Preset' can not be assigned.
      
      And one more 'pro' in relation to other scripted batch renderers/camera managers - all information assigned to camera stored in user defined object properties so there's no persistent variables and if you delete the script or open scene on different 3dsmax you don't get messages about missed plugins/scripts and such things. So script is totally unobtrusive.
      
      I hope someone will find this script useful. Bug reports and suggestions are welcome.
      Script is located at scriptspot.com - [http://scriptspot.com/3ds-max/batch-camera-render](http://scriptspot.com/3ds-max/batch-camera-render)
    and on my website - [http://sergepogosyan.com/scripts/BatchCameraRender15/](http://sergepogosyan.com/scripts/BatchCameraRender15/)       
   [b]UPDATE:[/b] Link to new version.

#2

Looks really nice and useful! :thumbsup:


#3

I’ve converted this script to dotNet version, so it works with 3ds max 2009 64-bit now.


#4

This looks quite handy, does it save exposure settings for each camera, for each lighting situation ?


#5

What kind of exposure do you mention? Max’s standard Exposure Control or Vray physical camera setting?

Anyway, it doesn’t save exposure settings for the camera, but if such feature is crucial for you and it makes this script more useful I would add this suggestion to my TODO list.

But only if 3ds max’s standard Exposure Control is the subject.


#6

I normally use Mental Ray, so it would be helpful to save the settings of mr_photographic and environment settings.

cheers


#7

I normally use Mental Ray, so it would be helpful to save the settings of mr_photographic and environment settings.

In the latest version scene states assignment is implemented, so you can create scene states with different environment settings and apply them to the cameras in scene.

Sergo.


#8

Awesome, hopefully I get time to try this out.
I’ve been using LPM pass manager to do a similar thing.

cheers


#9

Very nice script, it integrates perfectly in our asset workflow and saves us a lot of time. Now we can use Scene States for important stuff and don’t need them anymore to switch lights on and off :slight_smile:


#10

Very nice script, it integrates perfectly into our asset workflow and saves us a lot of time. Now we can use Scene States for important stuff and don’t need them anymore to switch lights on and off :slight_smile:


#11

I’m glad that you found this script useful. Thank you!

BTW bug fix release 1.5.1 is here - http://sergepogosyan.com/scripts/BatchCameraRender15/.


#12

how does this differ from vray batch pro, other than the fact that it’s not exclusive to vray - I’m just trying to figure out what the best solution is for batch rendering


#13

I didn’t use vray batch pro, to be honest. There’s too much parameter in UI and it’s frighten me.

My script stores all rendering parameter directly in camera object. Main advantage (and the reason why I started to write it) over max’s standard batch render is that you can change paths and file names of several cameras at one step - just select cameras in list and set new file name (and type) or new path. Additionally you can assign lighting state to each camera - you can easily specify which light should be switched on or off for particular rendering, and this information also saved in camera objects. This is why I didn’t extend max’s standard batch render - I had to store additional information somewhere.

In current version script supports batch netrender submitting, so you can select all your cameras in list and hit one button to submit all cameras to network rendering. Unique job names assigned automatically. This occurs not as elegant as in max’s standard batch render, but it works silently and doesn’t requires user attention.

In upcoming version I’m planning to implement file name template system with which you can insert camera names, scene state or project name in file name by keywords. It is very useful and already implemented in development version.

Plus it is free, open source, and it is in constant development.

here’s latest release version… - http://sergepogosyan.com/en/scripts/BatchCameraRender16/

…and development version - http://bitbucket.org/sergo/batchcamerarender/


#14

New version is out!

Main improvement is File Name Template system. Plus some less big but interesting features.

here’s latest release version… - http://sergepogosyan.com/en/scripts…CameraRender17/


#15

First of all, I want to say this script is awesome.

Second, I’m wondering if it’s possible to implement a Render Type (crop, region, view, etc…) feature into a batch renderer?

I have a setup where each camera crops a different part of the screen, but right now I’m having to render manually, since it doesn’t seem to be a way to specify this in a batch renderer.

Am I missing something (as in the feature exists and I’m missing it), or, if not, is this even possible?

Thanks.


#16

It is possible to add such feature, I’ll add your request to my todo list.
Thank you.


#17

Thank you. That would be awesome.

Keep up the great work.


#18

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.