Notifications
Clear all

[Closed] ways to automate 3ds max?

What options are there available for having an external program change the position of a camera in a 3ds max screen and then call the renderer?

I’m looking for a quick simple solution to get the job done even if its hackish. I know I could do this with the max API by writing a plugin that did some interprocess communication but that’s way more complicated than I have time for.

Another possible option I was thinking about would be to modify the .max file to change the camera position and then I think there’s a command line batch renderer I could call from a script. But I don’t think the .max format would be easy to discern and modify the contents of.

Is there a way that I can use MAXScript to do interprocess communication in some hackish way? ie, have it periodically check a file to see if new commands have been written into it like a “mailbox”.

Any other ideas appreciated!

3 Replies
1 Reply
(@bobo)
Joined: 11 months ago

Posts: 0

Yes, you could create a timer (either a MAXScript UI Control or a DotNet Timer) to check periodically some folder content and automatically do things. It is by far the simplest way to do what you want.

Alternatively, you can run command line rendering with a pre-render script that makes the changes to the camera. Check out “Command Line Rendering” in MAXScript Reference.

Command line rendering in 3ds Max 6 and higher also allows MAXScript execution – so-called pre-render scripts can be executed before the rendering starts. Below are the supported command line options, including the one related to MAXScript.

[left]-t:script_file
[/left]
[left]Attaches a pre-render MAXScript. Use this option to attach a MAXScript to the scene. If used, the script will be executed prior to the renderer starting. Note that you can use this for both local render (-r) and network render (-s). If submitting to the network, the script will be archived along with the scene and sent to all servers participating. The script can be any MAXScript without UI access.
[/left]

Oh, I like that pre-render script option. Thanks for pointing that out, Bobo!

If the camera is the only thing animating. Animate it !

Just position it every frame with a script that reads a txt file and render it.

Easy-Peesy…