The static images, movies and technical breakdown on this page demonstrate how an animation can be baked (exported) as a sequence of rib archive files. An explanation is also given of how other Maya scenes can reference the achived assets in such a way that complex scenes can be rendered without the need for Maya to directly display multiple copies of the original geometry.



Reference Images

			
			

Single branch, modeled in maya.

			
			

The entire tree assembled from the baked branch RIBs.

			
			

The fully shaded tree.

{	
//color	surfcolor = mix(Cs, tip, pow(t,expo));

//float smin = scenter-sminfactor;
//float smax = scenter-smaxfactor;
//color tipmult = smoothstep(smin,smax,t);
color surfcolor = mix(Cs, tip, pow(t,expo));

//color surfcolor = spline(t,tint,tint1,tint2,tint3,tint4,tint4);

normal 	n = normalize(N);
normal 	nf = faceforward(n, I);

Oi=Os;

color 	ambientcolor = ambient() * Ka;
color	frontcolor = maincolor * Kdfront * diffuse(nf);
color	backcolor = transcolor * Kdback * diffuse(-nf);

float mapvalue = 1;
if (specmapname != "")
	mapvalue = texture(specmapname);

color 	speccolor = specular(nf, normalize(-I), roughness) * mapvalue * Ks * highlight;	
//color	speccolor = 0;
//float r = random();
//if(r > 0.5)
//	speccolor = 1;
//else
//	speccolor = 0;


Ci = Oi * Cs * surfcolor * mix (frontcolor, backcolor, backlight) + ambientcolor;
}
			


The final animation.