Category Archives: Script

UPDATE : [mel script] renderImageManager

* Update Description 

writer : Hakjoon Lee
date : August 7, 2012
Script title : Render Image Manager

> Added Preset and Flipbook function.

>>>>> Download Script (right click and ‘save as’)

* Script Description : 

It helps recording any desired attributes (e.g. final gathering Accuracy, camera F Stop, light intensity…) as caption texts on the rendered image in renderView window so you can compare the rendered images with changed attribute values. It is useful when you do series of test rendering.
It also saves temporarily stored images in the renderView window and attribute captions to accessible files and loads them back into the renderView window when you need them later.
- You can save node's preset with its render image so it can be restored later.
 (it is useful when you simply want to return all your attributes to the point when you rendered it.)

- You can flipbook between only selected images in the renderView window.
 (it is useful there are many images in the slot so difficult to compare two non-adjacent images instantly)

* Functions

1. Caption
2. Preset
3. Flipbook
4. Save and Load Images


1. Caption

 - Write *selected attributes and their values as caption on the 'Render View'
 *(you can add attributes to the selection group in the UI)

 - Read attributes and their values in the 'Render View' caption and apply the values to the current scene attributes.

2. Preset

- Save *selected nodes' presets and write preset number as caption in the 'Render View'
*(you can add nodes to the selection group in the UI)

- Load saved preset if you can see a [preset_number] caption in the 'Render View'

3. Flipbook

- in case you have many images in the 'Render View' slot and you want to compare some of them, sometimes it would be not easy because you have many images in between.

- You can choose maximum 4 images from 'Render View', slide only them directly in the 'render image manager' window.

4. Save and Load images

- *Save images in the 'Render View' with caption. 
*(filenames and caption text will be stored in filename.set file)

- *Load saved images and caption. 
*(it will open filename.set file)

[mel script] renderImageManager

I fixed some bugs and update a few functions to captionAttr mel script.

description :
It helps recording any desired attributes (e.g. final gathering Accuracy, camera F Stop, light intensity…)  as caption texts on the rendered image in renderView window so you can compare the rendered images with changed attribute values. It is useful when you do series of test rendering without screen capture or note values manually.
It also saves stored images in renderView memory and caption attributes text to separate files and load them back into renderView window any time you need.

<< Download script >>


[mel script] Mel Script works

*mel script : moduleMapping

This script applies grid textures to the scene blocks. It was written for designer.
The grid size is selectable between meter and foot unit.

>>download link : right click here and ‘Save target as’

*mel script : lightBatchBake

I wrote this script for Afro Samurai project.
When I came to this team, the lightmap bake pipeline was not completed and we didn’t have the User interface for baking lightmap. So I had to bake lightmaps one by one with mentalray Batch Bake and composited baked several passes(sunlight shadow, ambient occlusion, lightmap…) in the photoshop manually. Usually one level section had 16 lightmaps and imagine doing this process 16 times.
It was certainly time consuming work.
This script reads all bake set in the level section and applies various options like (render pass, format…) when baking multiple sets.

Bake Type
It is possible to select Terrain and Prop but I’ll explain about Terrain only.

Bake Set ListIt reads SETs with proper naming convention in your scene and list them. Select wanted items to bake (multi selection available)

It starts batch bake progress.

Light/Render SetupdirectionalLightSet / ambientLightSet / lightSet for AmbientLightMap / LightSets in reference
This selections turn on/off pre-grouped lighting Sets when it bakes. Usually it doesn’t need to change pre-selections but you may change them in case you need.

*lightSet for AmbientLightMap : Only turns lightSet group off when ambientLightMap baking

*lightSets in reference : We often need to load the other level sections as reference files to reflect the other’s light information on their connection. Otherwise connection between them won’t match very well after bake. However, it requires very long render time. So you can turn on the other’s lightSet all the time. Turn it on only when you bake specific BakeSets which include connection area between the other levels, and turn it off in case you don’t need them.

*final gathering : it enable final gathering when bake. This option prevents from making batch bake progress accidentally without final gathering enable on.

*global illumination : same function as final gathering. However, during Afro Samurai I didn’t use global illumination setting for baking. Turn it off.

*Pass Selection
Each selection represents the pass. Enabled pass is going to be baked.

>> download link : right click here and ‘Save target as’

*mel script : UVSetManager

Sometime I make a wrong UVSet like decal1, decal2 or lightmap1, lightmap2 by forgetting turning off  ‘create New UV Set’ check box when uv projecting.
This script was written to remove those unnecessary uv sets easily.

>>download link : right click here and ‘Save target as’

*mel script : captionAttr

I used to make a note of series of attributes to remember lighting values or render setting and compare rendered images each other but it is not always efficient because lots of numbers on my notebook easily get mixed and hard to manage as it gets more.
I thought it would be great if I can write attributes over rendred view and easily manage them.
So I wrote this script to help myself.

It stores any desired attribute values with rendered image in the render view, saves all images in the render view to image files with selected file format and writes attribute info into a set file and reload the attribute set file with images after re-launch maya.

>>download link : right click here and  ‘Save target as’