Level of Detail Project

I have found some reference images :

To test the level of detail, I had to have 3 different version of exact same shaped moss model.
Low , Med, and High resolution moss model is required.
After it is made, i had to bake the models as a rib_archive.
by having a rib_archive that reads the information about the model, i could perform the LoD.
By using the Level of Detail script i could test the LoD :

By making a primitive shape in the maya and giving them the renderman extra attribute (Pre Shape MEL) that reads
the LoD rib file, it renders the Rib_Archive of the models that i created in maya.
Since the LoD script is presenting the models by DetailRange, it shows the different model for different range.
The result look like this:

After it was done, i had some problems.
the problems are:
1. Since there were so many proxies to make it look like a moss,
it was very hard for me to control all the proxy because the box was overlapping
2. Since there were so much to control, it was very hard for me to predict the beauty result.
So i was trying to find the way to make it work, and found out that RMS can read rib from the vertex.
by controlling vertex, it gave me to have control that could output result easier and also very predictable.
READING RIB_ARCHIVE FROM VERTEX
The Script for the reading vertex is:
global proc polyMeshArchiveRI(string $pathToArchive)
{
string $shape = 'rman ctxGetObject';
int $num[] = `polyEvaluate -v $shape`;
for($n = 0; $n < $num[0]; $n++) {
string $vert = $shape + ".vtx[" + $n + "]";
$pos = `pointPosition -local $vert`;
RiTransformBegin();
RiTranslate($pos[0], $pos[1], $pos[2]);
RiReadArchive($pathToArchive);
RiTransformEnd();
}
RiAttribute "visibility" "int camera" 0;
RiAttribute "visibility" "int transmission" 0;
RiAttribute "visibility" "int diffuse" 0;
RiAttribute "visibility" "int specular" 0;
RiAttribute "visibility" "int photon" 0;
}
After sourcing the MEL global proc polyMeshArchiveRI() into the scripting panel,
it can be used in the RenderMan Extra Attribute PreShape MEL just like the method of using proxies.
By Putting the code :: polyMeshArchiveRI("$path");
in the PreShape MEL, vertex is going to read the rib files automatically.
The result looks like this:

Image with the moss render.
After this was done, there was another problem i had to face.
The problem was that i had to move the moss very smoothly.
There were 2 ways to do this.
1. nCloth
2. IK and Hair Dynamic

1. IK and Hair Dynamic
IK and Hair Dynamic was one method that was hard for me to do.
Because of the fact that
i had to give the joints and give different hair dynamic to every different proxy
it was very inefficient way of giving natural movement.
IK and Hair Dynamic does not support the copy and paste so it was good reason for me to give up this method.
2. nCloth
nCloth was another method i could try, but since the vertices are reading the Rib_Archive to render moss,
The proxy could not become a nCloth because whenever the primitive changes to nCloth,
it also changes the type of the vertice which would not render the rib file.
By the time i found out that it is impossible to change the primitive that has Extra Attribute(PreShape MEL) to nCloth
it
seemed impossible to use the nCloth system for this project.
But my good friend Tim Schneider helped me with this problem.
He introduced me a MEL code that i could attach the proxy to the nCloth.
The parentToSurface made everything easier for me.
therefore i used that method to create the smooth motion of moss.
parentToSurface with nCloth:
HERE IS THE MOVIE:
All CopyRight Reserved 2009 @ mrgentle.net