This page displays the breakdown of my Mel Matrix project. This code create a trumpet, which is made by series of torus. Moreover, one pyramid is created for each torus vertex.

Final Render

The Code

My Inspiration

Process and Development

Problems and solutions

The challenging part were create each pyramid in a right angle based on torus surface and shifting each toros in order to make a trumpet. First I manipulate the getVertices script to just get Vertices ID insted of getting Vertices position and then I moved each Pyramid pivot to the center of it’s cap. Finally, they align to the pyramid’s surrfaces by using “point by poly constrain”. For making trumpet I’v done a little math(you can find it on the folower.mel file) . In addition, I tried to develope my code in order to delete all pyramids which are under the torus, but I hadn’t enough time to finish it.


One lesson here is that it definitely takes experience to learn how to condense code professionally. Should there have been more time, I would return to the code and clean it up by condensing it in a more logical way. Programming is extremely appealing to me, and I wish to continue developing my programming skills. This project is to be continued by creating an User Interface for it in Mel User Interface.s leo.

User Interface

This page displays the breakdown of the user interface for my previous project: Mel Matrix. I created an interface where you can modify the scale of pyramids.

Final Render



I’ve tried to make Min Radius and Max Radius dynamic, but I’ve faced to problem, which was pyramids can’t re-position when the radius change dynamicly. Also I couldn’t change torus’s subdivision dynamicly.


This project is very interesting. I have lot of fun in it. I have learned how to use the script reference in maya help tab to get help when I faceing the problem. due to the limited time, there still have many places need to be fix. In future, I will continue study at Mel UI. Hope I can make more useful tool at that time.


This page displays the usage of Pixar’s custom mel procedures to create secondary geometry at render-time. It also shows the creation of a custom interface added to Maya to enable the artists to control the generation of the secondary geometry. My Idea was generating pimples on surface and also increasing them based on texture which should be a sequence of gray-scale images. In addition, I would like to match them to real character,s skin. Unfortunately, I couldn’t complete it, because I faced to some problems, which I wasn’t able to solve them by myself in that limited time. Hence, in “Problems and solution” section I explain all problems and challenging issue I struggled with them.

Final Render


The second procedure I used was the Place On Nurbs procedure, created by Malcolm Kesson, that can be found on  This script allowed me to placed rib archives on a nurbs surface at postions that correspond to either a texture map or a procedural pattern.


My concept


How it works!

Process and Development

Problems and Limitation

Although the code successfully generate objects which are exported by “Rib” format, and also it has some features to control the randomness and variety, it needs to develop more in order to behave what I expected.

1- This code works with “Nurbs”. One the other hand my 3D character, which was chosen for animate based on actor act, was “polygons”. I had to use 3D model, because of tracking the skin. Consider that the imported camera from nuke isn’t good idea, because the perspective of pimples may changed. Hence, I animated the 3D character and then I selected two arrows of edges, which are located at effected area by disease. I convert them to curve and apply loft to them in order to make nurbs plane which is animated based on polygons character.

2- It should be group projects, due to the 3D charcter had to modeled, textured, rigged, and animated by a professional artists. I did all part by myself so It wasn’t perfect and I couldn’t use it for tracking.

3- The pimples should appear with a low radius and then increase by gray-scale’s level. This helps to have gradient of radius at the border line of texture, but I haven’t time to develop it.

4- In order to see the border of texture by secondary geometries I had to decrease the radius and also increase the number of pimples. Although it possible to do it, the render times increase too much. 


At first I had better to spend time thinking about my idea, and anticipate projects problems may I face to. Although I kind of fail in this projects, I learned a lot. I definitely  will develop this code in future. Working with MEL caused some rather difficult situations which needed a small workaround but since I see it as a learning experience it was still fun to find the right solutions to the problems.


This page displays the usage of motion capture data to generate secondary geometry at rendertime using RenderMan and particles which can be modified directly in the scene. This data was extracted using Python and Mel scripts.

Final Render

The Code

Unzip and save the following three scripts in these directories,
1. Save these scripts into directories as follow:


                |____              write points, curves and blobby 
    mocap_db                    read mocap data files      get path, archive, animation, etc

The interface for Maya is implemented by following three scripts. They should be saved in the RfM_mel directory. For example,These 3 scripts create UI which will let user input: path, scale, width, trail, step, and cache.
2. Save these scripts into RfM_mel folder:
                |____ mocap.rman       
                |____ mocapUI.mel    
                |____ mocapRI.mel    
3. Save colorByZ.osl scripts into RfM_osl folder:

      Information about customizing RfM and Maya can be found in the tutorial, “RfM: Customizing“.

Maya Workflow

Generate Rib Archives1.   Create a proxy object, for example, a poly cube.
2.   Select the proxy and run this mel command,
3.   Select the shape tab of the proxy to display the interface – figure 6.
4.   Browse for a “MoCap Data File”.
5.   Ensure there is a RIB_Archive folder in your Maya project dirctory.
6.   Set an end frame in Maya’s Render Settings.
7.   Run this mel commaand,
    rman genrib;
Maya’s time line will “scrub” during which time rib archive files will be created in the RIB_Archive folder. Please note the scripts assume that a sequence begins with frame 1.

Render the Rib Archives1.  Hide the proxy object.
2.  From the RenderMan menu select “Archives->Create Node”.
3.  Browse for the first archive rib and set the Start/End Frame.

1.  Hide the proxy object.
2.  From the RenderMan menu select “Archives->Create Node”.
3.  Browse for the first archive rib and set the Start/End Frame
4.  Change the numeric extension, say,
    to $4F,
5.  Assign a material via Custom Shading Group on the transform node.
6.  Finally, render and image and check if the baked geometry is correct.

OSI Shader

1-Create CoordSys from RenderMan menu 
2-Create PxrOSL node in Hypershade window
Browse for a “Shader” this file “colorByZ.osl”.
4- Rename World to CoordSys for “spacename”.

Basically this code change the color in length of trial and modifiable by CoordSys.

Process and Development

For the first one I manipulate the code in order to increasing the size by trial.For the sconde one I figure out how to offset the rotation based on trail and also turning by frames. 

Problems and Limitation

-I Had issue in rendering. Because of small size of my objects the displacement map could not calculated it, so as you see some of my object jump in render. 
– The random expression on mocap UI doesn’t work!
I tried to manipulate the code to have random opacity,color, but didn’t work!


This project is the last project for this class in this quarter and it is pretty useful for me to know python.  I didn’t know anything about motion capture before this class. I’ve learned a lot about mel and python. It is much more convenient to do effects after I learned how to write code. Although I’m not very good at writing code, this class inspired me and I’m getting more and more interested in mel and python.
In future, I would like to solve the problems I faced to.

Copyright © 2020 TODAY VFX. All rights reserved.