technical architecture.

Archive for August, 2008

Adventures in maxscript.. (Or, asset management part 2.)

by on Aug.26, 2008, under maxscript

A couple days later, and a few hours of learning in, and i’ve built up the starting point for what i think is a somewhat useful asset/library management system.

The Basics as they stand so far:

  • Choose a root directory that you have your meshes stored at.
  • for each directory in the root tree, add an entry to the treeview on the left, a’la explorer.
  • when you click on any leaflet of the treeview, we build on the fly an html thumbnail page of the Maxfiles/Thumbnails in the directory with a few basic informational items.
  • clicking on a thumbnail, imports a model.

That glosses over some of the fun parts of getting the thumbnails of each model, and general organizational bits involved in maintaining your asset library, but thats it, clean and simple.

Its what i imagine that Utilities menu ‘Asset Library’ would do, if it didn’t just make max fast exit.

Progress!

Now to evaluate the work involved in making it bulletproof enough to possibly be useful outside of our small studio.

  • Features on the horizon:
  • fully cached directories (Done!, only recurse the filesystem once.)
  • Multiple Library Classes:
    • Mesh
    • Material
    • Texture
    • Texture as Billboard
  • Queue of meshes to load
  • Placement of meshes on load? OR integrate the idrop functionality
  • include maxfiles that do not have thumbnails (extracting the explorer thumbnail preview)

Well, that’s probably enough to kill off my free time for a few more days.. Heh!

6 Comments more...

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

mass_export.ms
mass_import.ms

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...

Gallery

by on Aug.11, 2008, under Architecture

Here’s the link to my old Gallery, complete with just exported from JAlbum sexiness, until I find a suitable way to integrate some of the newer work with the new site :)

Leave a Comment :, more...

Farm Management with VB (?!@#)

by on Aug.11, 2008, under Batching

Here’s a small utility I’d written in ’05 in HTA using mostly VBScript to replace the hordes of dos BAT files utilizing pstools that i had laying around for starting and stopping and checking services/processes/logs on remote machines on our network. Primarily it was used with managing a small farm with 3dsmax/vray. the discussion about the utility on the Vray Forums as i was building it.
Farm Management Utilities 10.6

Farm Management Utilities 10.6

  • Run the .HTA once.. it will create 2 files for you
  • “Computers.ini” which you will will need to edit to contain 1 slave computer per line in it (either IP address or computer Name work, use 127.0.0.1 for your local system)
  • “SlaveutilsOptions.ini” which will have slots for various paths and options. read the file and edit the lines accordingly.
    • (Path to your VNC client,
    • whether to use alternate credentials or not,
    • and what the login/password would be if you did use them.

Note: Its been brought to my attention that some virus scanners will flag this download (Understandably in my opinion) as ‘Greyware’ because it contains VBScript that uses the WMI (Windows Management Interface) to affect changes to remote computers, enclosed in an HTA (Read: Executable Webpage). the full code is in there and easily readable.

I’ve been experimenting with a few other ways to package it, either via Maxscript, or Python, but they tend to get constrained to ‘free’ time as this functions perfectly :)

3 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!

Blogroll

A few highly recommended websites...