Tuesday 16 August 2011

Research and Optimization

I am running out of time as the project is off-schedule so besides rethinking about project management I figured out that there are lots of repetitive and unnecessary tasks which slows down performance and hinders machine outcome. Autodesk Maya being a major tool to me  for 3D projections, has a native language Maya Embedded Language which allows one to make customization in the scene.

I have one script which I wrote to get ride of all unnecessary junk shader nodes and their respective materials which aren't active in the scene. Below is the small snapshot for the script:

Shader_GroupElimination:








As of now I am working on a script which will improve my performance by changing the directory path automatically whenever the image folder inside a project is changed.I will update the screenshot for the GUI I am working on.

Hello everyone,
Unfortunately due to tight schedule I wasn't able to complete the GUI for my scripts but here are some  screen shots of  few scripts I wrote during this project.

Script number 2: Reload Texture Node


Purpose:
       This script in particular is quite time saving for anyone whose project involves lots of dependency on images or external files.As I am working on a Matte Painting Project so I often require to switch back to some image editing software in order to fix my images or files used as textures. This process requires one to update each individual file node separately, if the project has 3-4 external files used as textures in that situation it is quite easy to update texture file nodes. However, in situation where there is more than 50-60 file texture nodes in the scene than it becomes quite uneasy and confusing to click on individual materials in the scene for file texture update.

This script reloads all file nodes in the scene at once with a single call to the procedure. Some of the screen shots for the script is shown below:


BEFORE:





AFTER:













Limitations:Although the code is working fine for my project where I have used default MAYA materials and haven't used Mental Ray Materials . However, in near future to increase the flexibility of the code I will add some changes to this code which will allow it to support mental ray materials and shading groups.
A small bug which is still associated with this script hinders its execution for the first time, the bug is related with the "AEfileTextureReloadCmd" procedure which is  one of the MAYA's inbuilt procedure.
A turnaround for this problem is to click on one of the reload buttons on the file node once and after that execute the procedure.


Script Number03:Change the Directory Path


Purpose: This script is quite essential for me to manage my files and folders throughout the project. As I am working on a limited space on my desktop, usually I get stuck with the low space in case of  heavy rendered images  and other files. Moreover, in situations where I want to move 40-50 files to a new directory I use this script to help me out with the directory change process. The script invokes a dialog box and takes the directory input from the user and updates it for all file nodes in the scene.
Below are some screen shots for this script:

BEFORE: Scene with no wrong file texture path













AFTER:













Limitation:This script does not have a File Browser GUI where user can simply click on the set button and can automatically  set a new path. Moreover, one has to be very cautious while typing in the path in the input box as Maya treats "\" as a key word (which actually means an escape character which tells Maya to treat anything after this symbol as a special character).So a valid path would be:

C:/Users/WhoKnows/


instead of

C:\Users\IKnow\

The same bug associated with the 2AEfileTextureReloadCmd" procedure exists in the script as it is dependent on reload_2DTextures procedure.

A small update on the directory path change script, I fixed few bugs related to nodes espcecially mental ray material file node, more on the script can be found on the below mentioned link:

https://www.creativecrash.com/



I will be refining other scripts and will be preparing a new GUI after finding few bugs while working on different scenarios.







At the Forefront

At the very forefront of my practice were techniques like using Laser data in the form of LIDAR , making use of 3D environment generation applications like Eon's Vue, along with this there were few panorama projection techniques which required HDRI(High Dynamic Range Image) Photography and last but not the least there was the option of building the scene from the photographs and projecting them on 3D objects. As most of the above mentioned techniques are slightly costly and they require specific camera equipments and rigs. So I decided to make use of 3D projection techniques which has it's own merits and demerits which are mentioned below:


For individual project like this , in my opinion it becomes quite essential to prepare some pipeline or workflow to accomplish a task from start to the end. I remember the time during initial stages where I was stuck with a very well known debate of creating a projection based matte-painting through a 2.5D or 3D approach.  After learning about different options starting from simple photo-manipulation techniques to more accurate LIDAR map and panorama based matte-paintings , in my personal opinion I found, that for minor projects where the cost and  other resources like computer processing power are limitations, it is better to stay with the 2.5D solution. Although, techniques mentioned above produced more believable scene however, at the same instance for far distant or wide angle shots where the observer's distance is greater, one can still create realistic scenes while relying on 2.5D camera projection techniques. While thinking about the forefront of my practice for this project I wanted to make use of Eon's VUE as my environment generation tool, whose use is quite prominent in few of the Hollywood movies lately. This particular 3D application demands good computer configuration -for me- however, everything went well as I made my second matte-painting using VUE as my major software application and was quite satisfied with results. There is one more good reason why an individual doing independent projects should avoid using a 3D approach ,  which is more related to the unnatural look of the 3D scene and the amount of time involved in correction of the scene to look more realistic. Therefore to avoid unnecessary headache of excessive rendering time and keeping the date of deadline in mind I chose a 2.5D solution to develop rest of matte-paintings. Moreover, Projection-based  matte-painting techniques still being prominent in the field of films and Television commercials encouraged me to explore more about this technique. 

A small snapshot of my workflow can be found below: