Showing posts with label mental ray. Show all posts
Showing posts with label mental ray. Show all posts

Sunday, March 22, 2009

How to unmultiply layer in Photoshop

Following is the manual steps to unmultiply an image in Photoshop the hard way:

Let's say you have a cloud with transparency for example.

- Have the original painted (or not more likely these days) cloud with transparency in Photoshop open.

- If you have a layer mask, delete it, an apply it.

- Ctrl (PC) or Command (MAC) click on the layer to select the layer's transparency.

- Save the channel as an alpha. Make sure it's the only alpha.

- Now duplicate the cloud layer with transparency once. Take the duplicated layer and merge down (ctrl or command e). That's 2 cloud layers merged. Duplicate that and merge. You have 4. Duplicate that and merge. You have 8. Duplicate that and merge. You have 16. Duplicate that and merge. You have 32. Duplicate that and merge. You have 64. Duplicate that and merge. You have 128. Duplicate that and merge. You have 256. Duplicate that and merge. You have 512. Duplicate that and merge. You have 1024. Duplicate that and merge. You have 2048. Duplicate that and merge. You have 4096. Good enough. The power of 2. Gotta love it. I suggest you make a Photoshop Action for easier future use.

- Now I suggest you add a layer below the cloud layer and make it a general sky color, or the average color of the actual cloud's background. If you've truly unmultiplied the cloud it wouldn't matter what color you made the background. Pink, black, white, or green. It just gives you more peace of mind that it's goint to cut out of that color. Some Artists use whatever the background was. That's a waste of disk space. But it can be useful for reference when lining up in 3D.

- Now flatten or merge the rgba image. You have an unmultiplied cloud texture for Maya / Mental Ray. Use .tga for mental ray. Unless they fixed it. Used to be mental ray didn't support .lzw .tif's. Annoying. .tga works for maya or mental ray rendering.

Side note. After Effects can view and save unmultiplied images. Shift click on alpha in comp window. Very convenient. Wouldn't you think that the After Effects team and Photoshop team at Adobe could have lunch one day and share that code? PHOTOSHOP NEEDS TO BE ABLE TO VIEW AND SAVE IMAGE(S) UNMULTIPLIED. THOMAS KNOLL, JOHN KNOLL, HELLO! Not ranting, just trying to get the word out. Write them! Put on your blog(s). Photoshop should just do this out of the box.

Enjoy,
Louis Katz
www.louiskatz.com

Monday, December 15, 2008

Maya Batch Rendering on Mac or PC

Forget Render Pal (Not your pal), Maya / Batch Render (which is not batch rendering), or rush. This is the way to go for Maya rendering at home or school while you sleep on one or multiple machines.

Maya Batch Render on Mac:

Open TextEdit and make a file called maya_render (or whatever you want, and no extension).

Make sure it's plain text.

No spaces in paths, or your screwed.

Copy and paste the template below. Edit for your project.

Open Terminal from applications / utilities (or your dock if you made shortcut).

Type in cd (and drag your folder with maya scenes to terminal).

Type chmod 777 maya_render (or whatever you called it). This will make file executable.

Go back to folder and double click on maya_render. It should render now!

/Applications/Autodesk/maya8.5/Maya.app/Contents/bin/Render -h (for render options)
-r mr (mental ray)
-s (start frame)
-e (end frame)
-rd (render directory to store images)


#--------------------------------------------------
#!/bin/sh
/Applications/Autodesk/maya8.5/Maya.app/Contents/bin/Render -r mr -verb -s 1 -e 10 -rd /cityknock/batch_render_test/ /cityknock/batch_render_test/test_a.mb
/Applications/Autodesk/maya8.5/Maya.app/Contents/bin/Render -r mr -verb -s 1 -e 10 -rd /cityknock/batch_render_test/ /cityknock/batch_render_test/test_b.mb

NOTE - You may need to modify path to your version of Maya, i.e. 2008.

Maya Batch Render on PC:

Make a .bat file, edit, and double click on .bat to run.

maya_render.bat
render -verb cgloft_logo_RND_beauty.mb -s 1 -e 100
render -verb cgloft_logo_RND_matte.mb -s 1 -e 200

mental_ray_render.bat
render -r mr -verb cgloft_logo_RND_beauty.mb -s 1 -e 100
render -r mr -verb cgloft_logo_RND_matte.mb -s 1 -e 200


Enjoy,
Louis