PDA

View Full Version : Working on a Mari to XSI script...


El Burritoh
07-15-2010, 09:39 PM
Since the assets have been released by the Foundry themselves, I figure I can post this safely.

*********DISCLAIMER: None of the assets discussed in this post were made by me. This is all stuff provided publicly by the Foundry that I'm using for testing purposes. For all I know, one of you made these!***********

In an effort to learn Python, I've been writing (with the help of a more knowledgeable coworker), a script for Softimage to streamline the creation of multi-patch textures exported from Mari. It's a work-in-progress and I'm not comfortable posting the script just yet, but it's functional! Ideally, we would just code a custom shader that would take a set of files as an input, but that's way beyond what I know how to do. The script I've come up with gives you visually something similar.


The script asks the user for a directory and name. Then it imports the images and hooks everything up for you, and finally creates a compound node out of the whole thing. So for example, if I take some of the assets provided by the Foundry and run them through the script, it creates something that looks like this:

http://timcrowson.smugmug.com/photos/935978724_6yknA-O.jpg


Each bright green node being a compound node that contains something that looks this:

(click for full-res)
http://timcrowson.smugmug.com/photos/935796007_okVEG-S.jpg (http://timcrowson.smugmug.com/photos/935796007_okVEG-O.jpg)


In this example, I decided to hook these up and see how they all rendered together. These 5 compounds each contain 40 image maps at 4k each, for a total of 200 4k images. Mental Ray doesn't have any problem rendering that, although ram consumption may force me to use .map files. In this case I think my ram usage hit 8GB. (actually, the image below didn't use the sweat mask, but whatever)

http://timcrowson.smugmug.com/photos/935976924_TAqAx-L.jpg



There are still plenty of loose ends to tie up with the script, but it's coming along nicely and should be very helpful for XSI users who also want to implement Mari. Not sure how many of those there are yet, and you may want to write your own script anyway.


The script should also be able to work with files exported from Mudbox. I would like it to eventually if it doesn't already (haven't tested it yet). The only thing that needs to be respected is the filename convention, which must be blahblahblah_1001.ext. I think Mudbox's naming convention is different from that, but a quick batch-renaming would fix that.


And I don't know who painted these textures, but they're amazingly detailed. The bump map (dispFine) is especially nice. I'd love to know how that map was created. If it was made in a scultping program then I'd suspect ZB's HD geometry. It's like having a life-size human torso to examine...

oglu
07-16-2010, 07:35 AM
great start...
would these script are also work with mudbox naming..?

El Burritoh
07-16-2010, 01:54 PM
great start...
would these script are also work with mudbox naming..?

Right now it only works with a specific naming convention. So you would have to run your source files through a quick renaming process first. But I'm hoping to add a user input option to specify which app you used (or which naming convention you used). I'm not as familiar with Mudbox's naming options though so I need to look into that some more.

El Burritoh
07-24-2010, 09:20 PM
We're finally done with this thing! Well, there are a few things I'd like to alter later on, and it only works with Mari textures, but the thing works and works well!

I've created a web page (http://dynamiclens.com/wordpress/?page_id=136) to describe what the script does. It's basically what you see here. If anyone has feedback please share it!

If there are any XSI users here, I'd love to get some feedback on this script. I know there aren't very many people who have both Mari and XSI, since Mari isn't out for Windows yet and XSI 2011 is not out for Linux yet. But whatever, if anyone wants to test this, I'd be grateful.