The Saw Palmetto - Renderman/Maya Integration of RIB archives
The purpose of this assignment covers the use of Renderman RIB archives in Maya, where it is integrated as rendering proxies. By doing so, we are able to use lower polygonal meshes in Maya to preview a higher resolution imagery in Renderman. This project covers the basics in Maya to Renderman conversion from polygonal models to textures, light and rendering.
Notes!
This project may differ from the initial assignment writeup written for Professor Malcolm Kesson. It would have been edited to also reflect my later experiences, clearer tutorial techniques/codes and also later advancements made to the projects as well.
Research and Development of a Palmetto Model
In this project, I have been tasked to model, animate and more importantly render the finalized "baked" model and animation of a Saw Palmetto Plant using Renderman in either Houdini or Maya.
This assignment's purpose is for us to undertstand how we can export animation data into Renderman via RIB file formats for output and proxy rendering. As a guideline, a unit size of not more then 5 x 2 x 5 units in axial worldspace has been placed and a polygonal limitation of 2000 polys for a single frond (branch) of the plant advised.
To begin, like any other modelling project, research must and planning must first come into play. Below are some internet research that I have done particularly done. Generally taking more notes on the effects of the colour, texture and how the leaves ages and changes.
From close observation, we can see a few signifcant details about the palmetto plant. The leaves tend to grow in an alternating fashion. They grow in pairs with one on either side, but with one side growing earlier then the other.
They also start out being tightly packed later later as the frond grows, becomes sparsely distributed. The folds of the leaves are seen to be closely folded at the root and quickly spreads apart along the length of the leaf. The folds also tend to curve due to thermal changes which has causes the streamline like structure of the leaves to warp inwards.
Over time, as the leaves gets longer and longer, it also starts to dry out on its ends often splitting front its stem core and becomes bent due to wind influences. The colour of the leaves also respects this change from its color of a dark green graduating to a yellow to a brown dried texture.
The leaves are also sharp and needle-like and tends to be overly packed. As a matter of fact, after counting the number of leaves an averagely aged frond has, it comes to an average of 130 leaves in total.
The leaves also curve upwards instead of a sharp V folding which only appears at the drying ends of the leaf's cross section.
However, due to polygonal limits and specularity requirements, I will have to maintain at least a 3 face V shape for certain accuracies in lighting response. A curvation would mean doubling the polygonal face counts for each step of the curvation I want to refine.
Such polygonal detail would have been better applied across the length then the width for animation purposes instead.... With this, I begin to plan and consider the result of the Palmetto frond of which I may end up with due to a
2000 poly limit. I started to test the limits of segmentations of which I can have on a single leaf without vastly compromising the outlook of the final "high resolution" plant.
At the side is a test render of several V shape polygon undergoing bending motions. As you can see, the planar shape with 12 segmentations bend alot smoother then those with much lesser segementations. I did not wish for the leaves to look edgy, but trying to maintain the smoothness might just affect the overall frond directly.
I have tried as best as I could in trying to determine the perfect polygonal breakdown, however several important factors were suppressing my options. A frond with a realistic looking leaf (needle like and thin) would require many of them in order to fill up an entire stem. A fatter leaf may help in reducing the numbers of the leaves but does not do well with the plant's inherent features.
One specifically emphasized by Prof Malcolm himself. The lowest possible resolution I could achieve while not losing important curvation details for a leave was 28 polygons. Now imagine a 2000 polygon limit, I would have less then 70 leaves to work with and that is definitely not as many as it may sound. Considering the requirements of the class, I have decided to reduce the number segmentation for leaves on the frond by breaking them into 3 categories. A 20 polygon high resolution leaf type for defining the tail of the frond, a 8 polygon low resolution leaf type for the centric portions of the frond which hardly bends and a 12 polygon mid resolution leaf type for the beginning portion of the frond which are large and more "mutant" then the rest.
As you can observe above, the finallized leaf is optimized for the particular type of bending that will occur on it. The overall of the leaf remains stiff, which means lesser bending requirements and lesser segmentation required to maintain a smooth beautiful curve. The tail end however, being prone to dramatic manipulation due to thermal influences and inertia have a higher segmentation to preserve a nice curvation. This formula will later be frequently observed in the final fronds with close observation. Details however small it is that remain visible to the keen human eyes.
With the leaf types planning settled, I then proceed to place the leaves onto a stem based on a specific shape from reference.
This resulted in a total polygon count of 1143 polygons and 1686 vertices. Although far below the restrictions of 2000 polygons, this allows me to later add required edges to refine the look of the frond for animation.
As we can see by simple observation, there are certain criterias of which how I have placed the leaves. Considering how the plant grows by adding new leaves in a "Y" or "T" like format, there are a few important things to note....
The tail of the frond away from the plant contains the youngest set of leaves. They are less stiff, neatly spaced, arranged and are smaller then most. The leaves from the root of the frond consists of oldest of the leaves. They are large in length and width, widely spaced apart as the stem has lengthened over time and tends to be warped by thermal changes and dried up in some extend. That is, of course if some had not already fallen off the stem.
The picture below will demostrate my point...
And with that done, I have placed them together for a rough imagery of the entire plant for the purpose of visualization and further correctional changes which may be required to improve the plant's animation outlook.
To best present that, the entire plant has been rendered, lit and shaded using basic shaders.
But of course, the purpose of this exercise is to try and render all that in Renderman instead of Maya or Max. So.. time to move on with the rest.
Looking back into the outlook of the frond, I decided that at a polygon count of 1143, I could add a little more details to beautiful the result of my animation. So I have decided to fix up my original model of the frond by add more divisions to the stem for smoother curves and of couse less errors in misalignment issues which is common due to the lack of ilterations on the stem compared to the position of the leaves' root. I have also added more leaves and smoothen the number of segments on vital leaves so that they look curvier than jagged. The result is the below palmetto model. UV coordinates have also been added for my later texturing puposes.
Baking and Setting the RIB file
For the setup, the general idea was to mainly use Maya to export the models into rib files via the Renderman plugin. Pretty straight forward for the most part, but taking note of the fact that the options to export rib files with animation comes in a secondary setting which is by default not prompted when exporting rib files.
These work files was of course, freeze transformed and check for bounding properties such that it falls within the 5 x 2 x 5 units criteria. A similar primitive box was then created to represent the frond's bounding box. This primitive, holding onto the Renderman attribute which turns it into a proxy for loading rib files was then used to position the fronds into place of a final palmetto plant.
However, due to certain experiences with the flaws of using such indefinitely and vastly inaccurate proxies which had given me more pain then gain, I have decided to create at the very same time together with my final frond modifications, include, a lower resolution plane which will represent the frond instead of the proxy box.
With this, 3 basic frond setups and animation was created for this exercise and also for the advancement in the final outlook of my plant. Any animation was also cached into a 101 frame series which will automatically loop for beautification. Using scripts like the ReadArchiveUI;and etc. I quickly began to put together an arsenal of fronds
Content on this page requires a newer version of Adobe Flash Player.
into my design using a basic 3 point lighting , ground plant with slight displacement modification and certain environment settings to setup my scene. An example of which can be seen below...
Renderman Depth shadow were then added via the add attribute "Renderman >> Add Shadow Attr". However I quickly ran into a major problem. It is advisable to note that Renderman will save the generated Depth maps into files. This files over a 100 frames duration with the basic HD aspect ratio that was required quickly piled up to 9.97 gigabytes of information which if not carefully noticed will overwhelm the allocated HDD space of 10 gigabytes that SCAD has given us. This created several failure in my rendering beyond 80 frames which I had not earlier noticed.
Of course, after clearing up the old files, the below was quickly rendered out and composited.
Content on this page requires a newer version of Adobe Flash Player.
An overall good result for me. Now I just need to go into developing more advanced shaders and refining minor animation problems which I seem to have. While the animation maintains a beautiful loop, the sudden movements which I have simulated for the Mid and Lower level fronds may have been too dramatic to fit into the whole palmetto.
AFTER UNDERGOING SHADER DEVELOPMENT
Using Maya to apply the materials onto the palm frond, I rerendered the entire frond together with the new textures and animation. So how did I smooth out the animation? Its simple... I simply reduced the extremes of the animation values and normalized it in generally, meaning the frond would not be doing any drastic movements. Next, I made sure that the animation curve would present a smooth transition especially at the end and start of the animation.
An advise to those who have simulated their animation using physical means which I have seen on other webpages, you can try this method to preserve smooth transition :-
After making your animation, bake it using Point/Geometry Cache.Then duplicate the first frame of the frond and collape its history on the first frame. What this gives you is a baked animation of a frond and a single none animation model of the frond at the first frame. After which it is merely a cheap trick of blendshaping the animated frond at the ends of its animation into the beginning.... etc etc.
Or~ the other technique would be to extend the frames by renaming it back wards and adding it onto the end of the initial animations ... again that would require caching, unless you intend to apply the technique after renders... ACDsee viewer will make renaming multiple files easy. So remember to get a free version today.
And so ... attached below is the animated frond.I had only rendered a single frond, but used it over and over in a composition to duplicate it.
Content on this page requires a newer version of Adobe Flash Player.
The difference? Note the diffusion of the green and how it reacts in a tranluscency effect. Sadly, the leaf texture cannot be clearly seen in this render, but it is generally not my focus.
Next, I am going to try modelling and rendering the base of the sam palmetto plant and demostrate to you why it was a good thing that I had chosen a low poly frond as a proxy rather than a bounding box.
Conclusion!
Using proxies has become a very important part of the VSFX community and it allows one to render what that traditional impossible in a CG application. Renderman has an amazing capacity and support for rendering that a cg software isn't designed to handle. Thus, via application of proxies, we are able to render multi-million polygonal models with ease, subjects which are impossible in a cg application alone.
Below, we can see a further application of the palmetto as a proxy rendered by locators within a Maya scene. A total of 10,000 palmetto plants can be seen in the image, rendered in under 30 minutes.
Misc - Shader Development
Notes!
Renderman by itself converts default maya shaders into renderman equavalents. As this tutorial is more about the use of proxies rather than shading, this section is and will be rather unfocused on.
As we have earlier mentioned, I had the palmetto frond's UVW coordinates prepared before I had exported it for RIB development. Deciding mainly to save space, I have used the same leaf pattern over and over again on all the leaves of the frond. Meaning -- that the leaves generally share the same material UV coordinates.
However, to preserve a certain amount of randomness. I have jitter the UV points of the leaves slightly especially when the ageing, or in this case browning of the leaf is concerned. Below you will see the UVW coordinates and the seperate layers that I have created for the shader controls...
And with that, after adding all these bitmap controls onto the shader settings in Maya, we get the below...
dave kin chang wei - visual effects artist / technical director - davekcw@yahoo.com.sg - www.kamid.net