dotNet iterables in MAXScript, a pain in the ass

loocas | dotNET,maxscript,Python,technical | Sunday, May 5th, 2013

Autodesk facepalm

Yes, that is true. Stuff that should be inherently and implicitly iterable, is not, when accessed from MAXScript.

I had to find out the hard way, so here I am sharing my findings and solutions so that you don’t have to waste time on this nonsense issue.

The problem I bumped into some time ago was when I tried to access Management Object Searchers in my code (for finding various HW IDs and serial numbers). When you call a dotNET iterable (or a collection) in MAXScript, you automatically assume you can iterate over its contents, just like with an array, for example.

WRONG!

Somebody at Autodesk decided that this isn’t the behavior you’d like and instead made you having to jump through hoops and obstacles to get to the object contents.

Anyways, lets look at this problem on a rather simple example of using Hashtables in MAXScript:

(more…)

Autodesk cannot write good software

loocas | 3ds Max,opinions | Sunday, March 31st, 2013

stupid autodesk

I just realized that after seeing what Autodesk has been doing to the (at the very least) DCC software packages for a long time now.

They just can’t write good software. Nothing breath taking, let alone revolutionary. Just look at it. All they sell is software they bought from really smart and bold developers in the past. Then they pretty much kept it the same way it had been, including all the bugs, quirks and issues, but slapping on fancier and fancier GUIs they also bought or licensed from someone else (Qt anyone?). They don’t have the balls, even though they pretty much have a monopoly on the DCC field. Pussies.

Seriously, when was the last time you were excited a new version of anything from Autodesk is coming out soon? I haven’t. Hell, I haven’t been even excited about their betas in a long while. Autodesk doesn’t listen to the users, they don’t care much about the old time power users either. They just don’t give a shit, in my opinion.

So, with all seriousness, I’m truly considering cancelling my subscription and just don’t give a shit back.

Repathing 3ds Max assets externally, command line utility

loocas | 3ds Max,software,technical | Sunday, March 3rd, 2013

Repath Max Assets cmd

Do you remember my post about repathing 3ds Max assets in the .max and .mat files without actually running 3ds Max? Well, I cooked up a little utility that can be run from the command line without any IronPython installed. You can use this simple exe file to repath or simply just list all your external asset paths inside your .max and .mat files, should you need to. And since it’s a command line utility you can run it from within your programs and catch the outputs or batch feed it data for processing etc…

Anyways, the syntax is pretty simple:

You need to call the program and then pass it a .max or .mat scene file. If you provide only that, it’ll list the file’s asset paths. But if you provide a -p parameter followed by a new path, it’ll re-path all the file’s external assets to the new location you provided. Unfortunately, there is no way for me (afaik) to distinguish what is an actual render output or RE output and what are texture or cache data inputs, so everything will be linked to the new directory at once.

Should you need any help, just call the program without any parameters, or with the parameter -h for help.

Download the program from here.

Render Max scenes shortcut

loocas | 3ds Max,technical | Wednesday, February 27th, 2013

Render with Max Shortcut

Another one of those little things that can save up a ton of time in day to day productions.

I’ve added a simple “render with 3ds Max” shortcut to my right-click menu, so that I don’t have to open up Max if I need to render a scene. This actually came in handy on the current project where I was modifying a few scenes and re-saving them. Then I went through a few of them manually and needed to render them out quickly for reference. No need to actually run Max, open the scene, hit F9… it was all setup, I just needed to render them out.

If you want to modify your right-click menu this same way, just modify this registry key (3ds Max 2013 in this case):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\3dsmax\Shell\Render]
@="Render with 3ds Max 2013"

[HKEY_CLASSES_ROOT\3dsmax\Shell\Render\Command]
@="\"C:\\Program Files\\Autodesk\\3ds Max 2013\\3dsmaxcmd.exe\" \"%1\""

Done. :)

Relighting workflow in Nuke 7 for 3ds Max users

loocas | 3ds Max,Nuke,technical | Monday, December 10th, 2012

Nuke 7 Relighting Workflow

As you may know, Nuke 7 is out and one of its very exciting features are the new re-lighting tools.

However, I’ve bumped into a bit of a problem. Since I’m primarily a 3ds Max user, all my world render passes are Z-up oriented. This is a bit of an issue, since Nuke is, more commonly, Y-up oriented.

Fret not! There is a rather simple solution. The ColorMatrix node, nobody seems to care about. :) All you need to know, if you’re not much into math and shit, is that in order to properly convert the RGB values representing the XYZ space coordinates in Max into Nuke’s world space, just type in these values:

  • In the first row, type in: 1,0,0
  • In the second row, type in: 0,0,1
  • In the third row, type in: 0,-1,0

Or just look at the picture above. :)

Done! This is all you need in order to start re-lighting your renders in Nuke using 3ds Max’s World Point passes.

Repathing your assets in .max files without 3ds Max

loocas | 3ds Max,dotNET,maxscript,Python,technical | Friday, August 3rd, 2012

Asset Tracking

Ever since I read this blog post on the Area, I was intrigued to get this working in an IronPython environment (that’s pretty much all I know, in the “serious programming” area). Unfortunately for me, the article mentions C++, OLE and COM. Which are my least favourite technical subjects.

So, now when I finally really needed this solution (more on that some time later), I had to ask on the Autodesk forums.

Luckily I got an answer. But first off, huge thank you goes to Larry Minton, an Autodesk Engineer, without whom I wouldn’t have been able to get this thing going.

Now, about the problem. If your facility has a render farm and you happen to work off of your local storage, you have to point your assets to a UNC path where they’re stored so that all the machines on the network can find and load them when rendering. There are many ways of doing this and usually your pipeline TDs had figured this one out prior you even starting any work on the project. :) Unfortunately for me, I’m the only pipeline TD here. :D So I had to figure out a way of re-pathing my assets in 3ds Max scene files prior to rendering.
(more…)

Custom car rig

loocas | 3ds Max,showcase | Saturday, February 11th, 2012

Mercedes-Benz SLS AMG

I’m working on one of my personal projects and wanted to share with you a demo of a car rig I did for the project.

Oh, yeah, by the way, it’s gonna be a very original and one of a kind car spots. :D

The rig sports a few basic features:

  • Automatic wheel rotation system based on traveled distance on individual wheels level
  • Manual suspension system
  • Manual rotation of the front wheels, incl. automatic steering wheel secondary rotation
  • Manual rear wheel spinning system for burn-out animations and sliding
  • Secondary system for car sliding at the front and at the rear for drifting types of animation
  • Manual body reaction to acceleration

Nothing too fancy, but it’ll get the job done and didn’t take too long to rig. Here’s the preview:

Get the Flash Player to see this content.

Having fun with Nuke

loocas | 3ds Max,maxscript,Nuke,software,technical | Sunday, January 29th, 2012

Nuke

As with my previous post, I’m preparing a few handy tools for 3ds Max artists using Mari and Nuke. This bit is the fun part with Nuke: live communication between 3ds Max and Nuke.

Stay tuned!

Having fun with Mari

loocas | 3ds Max,Mari,maxscript,software,technical | Sunday, January 29th, 2012

Mari

I’m starting to write a useful set of tools for Mari and 3ds Max users. This is the very beginning – establishing reliable communication from 3ds Max’s MAXScript console directly to Mari. :)

I’ll keep you posted.

The power of regular expressions

loocas | 3ds Max,dotNET,maxscript,opinions,technical | Tuesday, January 10th, 2012

I don’t think I have to praise regular expressions here, however, I wanted to point out one extremely useful case where regular expressions were pretty much the single most useful, fastest and not so obvious choice in my 3ds Max pipeline.

The thing with 3ds Max is that regular expressions are foreign to MAXScripters and they don’t usually use them. I too am more used to regex in Python or IronPython than MAXScript. However, since we do have access to .NET in MAXScript, we can use its Regex class inside MAXScript.

Why I’m mentioning this and why could it be useful to you? I bumped into a little issue with my pipeline’s handling of rendered files. They assume to be exactly the same as I set them up in 3ds Max, which is logical and correct. However, since I started using Deadline’s SMTD script for submitting my files to the render farm, which takes care of handling the path remapping and storing, it also accidentally took care of letter casing. So, in the end, my render files were being saved all upper cased: “\\SERVER\PROJECT\RENDERS\ABC.EXR” instead of what I set in the Render Dialog: “\\SERVER\Project\Renders\ABC.exr”. The reason was simple, I used simple MAXScript substituteString() method to re-map my local paths to my server, UNC, paths and I converted everything to upper case just in case I got a mismatch:

substituteString (toUpper srcPath) @"D:" @"\\RAMMSTEIN\__UNMANAGED_PROJECTS__"

(more…)

Next Page »

Powered by WordPress | Theme by Roy Tanck