technical architecture.


Maxscript: Zoom Extents

by on Aug.18, 2008, under maxscript

Who would have thought this would be a pain? All i wanted to do was have a default camera zoom to fit on all objects in a scene, regardless of their size/distrobution.

turns out theres code in the maxscript docs that can do it, but it does it by way of modifying the FOV of the camera to fit. thats all good, as long as you’re not working with hugely varying size objects.. re: how far away from the objects is your camera to start will determine how wide the view is. functional, but not ideal.

here’s a little function snippet that does the same functions, but will create a camera, rig it up to a certain direction, and then move it out on its local Z axis until the set of objects is fully in view.

Again, something i’m using in conjunction with Paul’s Batching script refrenced below.

7 Comments : more...

Maxscript: So Many Assets, so little cataloging.

by on Aug.13, 2008, under maxscript

So, today I took up the fun job of building some sort of asset management tool. so obviously the first thing is to figure out what kind of assets you have so that you can sort them! now we’ve collected many many models over the years, from useful, to complete shite. so the not so fun part becomes to sort through all of these we need to see what they are obviously!

so using Paul’s excellent batching script ‘Batch it Max

combined with a little Thumbnail rendering script i cooked up that will render an Isometric view of the maxfile’s contents, ignore all scene lights, and render with a basic skylight, include a polycount on the render. there are also options in the script whether to use a default skylight lighting scheme, or whether to render the scene using an Ambient Occlusion override material

I made the thumbnail script based partially off of Marc Lorenz’s (also useful) Ambient Occlusion script.

So. the computer behind me is happily cataloging our whole mess.

I wonder if it’ll be done by morning? 🙂

1 Comment :, more...

Maxscript: Mass importing and Exporting

by on Aug.13, 2008, under maxscript

A couple useful functions for dealing with importing and exporting multiple objects.. has options to export from world 0, whether to export each hierarchy as a separate file, or each individual object as a separate file

this came up in a few different forums today, so figured I’d throw it up.

2 Comments :, , more...

Maxscript: Checking a remote Service’s Status

by on Aug.11, 2008, under .net, maxscript

here’s a little snippet to check the status of a service on a remote server. used as part of a little farm management utility that I’m updating to run with the 64bit stuff and experimenting with the net framework.

fn checkService ServiceName server =
    dotnet.loadassembly "System.ServiceProcess"
    sc = dotNetObject "System.ServiceProcess.ServiceController"
    if (server == "") do server = "." -- if no server is supplied, run the check on the local machine
    sc.Machinename = server
    try(scServices = sc.GetServices(server))catch(return "Timed Out")
    for scTemp in scServices do
        if (scTemp.ServiceName as string == ServiceName) then
            --print ( ServiceName + " - " + server + " - " +scTemp.Status.toString() )
            return scTemp.Status.ToString()
    return "Service Not found"

Thanks Chris Evans for the maxscript syntax highlighting!

2 Comments :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!