Thread: dt_dinosaur
View Single Post
# 13 04-05-2009 , 06:49 AM
ctbram's Avatar
Moderator
Join Date: Jan 2004
Location: Michigan, USA
Posts: 2,998
Basic Poly modeling is done. Will add a few subd embelishments.

I am only doing the subd because it is part of the tutorial. My personal preference is to avoid maya's subd tool set as it is quite limited and can be frustrating.

For instance lets say to spend hours adding lots of really great subd detail, then god forbid you realize you need to convert back to poly to make an adjustment. Well there go ALL your subd mods! You get to start all over as all the subd mods get wiped when you switch back to polygon.

The teeth on this part are interesting. There are 60 on top and 60 on the bottom. The author converts the gums to a nurbs object, duplicates a surface curve. Next he creates a tooth and for each of the top and bottom curves he creates 60 duplicates and uses "modify > snap align objects > position along curve" to distribute them along the path.

Then he goes around randomly rotating them. 120 teeth was to much trouble for me to adjust individually so I wrote a mel script that randomly rotated each tooth +/- 6 degrees in all axes and then I when around and randomly scaled them and made minor adjustments.

// rotate all the teeth randomly +/- 6 degrees
// scale all the teeth randomly +/- 25 percent

$n = "*|nurbsCone";
$rm = 6.0;
$sm = 25.0;
for ($i = 2; $i < 122; $i++) {
// select each tooth
select ($n + $i);

// rotate and scale
// x
rotate (randVal($rm)) 1 1;
scale (randPC($sm)) 1 1;
// y
rotate 1 (randVal($rm)) 1;
scale 1 (randPC($sm)) 1;
// z
rotate 1 1 (randVal($rm));
scale 1 1 (randPC($sm));
};

////////////////////////////////////////////////

// return a random -1 or +1
global proc float posNeg() {
return ((rand(10) > 5) ? 1.0 : -1.0);
};

////////////////////////////////////////////////

// return a float between -val and val
global proc float randVal(float $val) {
return ( posNeg() * rand($val) );
};

////////////////////////////////////////////////

// return a percentage change -val% to +val%
global proc float randPC(float $val) {
return ( 1 + ( posNeg() * rand($val) / 100.0 ) );
};

Attached Thumbnails

"If I have seen further it is by standing on the shoulders of giants." Sir Isaac Newton, 1675

Last edited by ctbram; 06-05-2009 at 01:45 AM.