Wednesday 2 February 2011

Biomedical Visualisation

With a new year, comes new ideas and refreshed inspiration!

Over the last couple of weeks, I have been developing my MEL scripting abilities - something necessary if I want to work with importing numerical data into Maya. Although daunting at first, things have gradually started to make sense, showing the logical development of the stages involved in trying to achieve my goal.

Last week, I had a major breakthrough in using MEL, and was able to create a script which would read one of the mathematical data-sets. The script works on a line-by-line basis, reading comma separated values and placing those into individual variables, which are then used to create objects and keyframe animation. Upon running the script, all actions are automated, and require no input from the user - this simplifies the process, and speeds up creation of a Maya scene greatly. It also ensures that no mistakes are made, as long as the script is correct and data is formatted consistently.

An example of the type of data being used can be seen below;

ExampleData

The purpose of this script is to convert raw numerical data into something visual, built in 3 dimensions. Currently, the script uses simple polygonal spheres to represent cells, although in the future this could be changed to use particles, or something different entirely. An example render of the scripts process can be seen below - the results are dramatically different to looking at thousands of line of numbers;

ExampleRender

At this stage, I was confident in my MEL writing abilities, so created 2 more (similar) scripts which would work with the other mathematician's dataset. This data is entirely different however, as the cells are placed in 2 dimensions, and instead of changing size/radius, they change colour based on a numerical value. This posed it's own problems, as I would need to have a new shader for every cell, if I wanted them to change colour individually. The scripts for this data work, but are still in early stages - no renders have been produced as of yet.

Beyond being able to get data into Maya, I was then free to experiment with the visual aspects of representing the data. I tested several techniques which would be useful later on, including using render layers (for alpha channels and depth passes), adjusting camera settings in Maya (to create depth of field) and compositing render layers using both Nuke and After Effects (using short image sequences). Although familiar with compositing techniques in Photoshop, I wanted to familiarise myself with these methods when working with videos and image sequences.

As the final part of my experimentation, I started working with the first data-set in 3D, and added a camera and some basic lighting. I rendered 3 passes - 'beauty', alpha and depth - and composited each of these layers using Photoshop. After some experimentation, I realised that I was happy with the result, and would be confident in replicating the visual style using finished image sequences. The completed composite can be seen below;

cellRender

Although I am only 2 weeks into this semester, I have made tremendous breakthroughs in my own programme of study, particularly with using MEL to import numerical data. I hope to continue this progress throughout the semester!

Moving forwards, I would also like to continue developing my technical skills and abilities - this will ensure that I have the best opportunities to create high quality work, with no restrictions on the software I can use to achieve this. I hope to continue working with RealFlow, and hope to have some visual examples soon. I also plan on developing skills in using Houdini, another 3D package, with a more technical focus.

1 comment:

Unknown said...

Great work man, I like the renders too!