Demo Reel 2010
Maya,Portfolio,Scripting,Shared,modCharSetup — redesigndavid @ 9:19 pm

Animate Blendshapes Weights per Vertex
Maya — redesigndavid @ 3:57 pm

I found a way to animate blendshapes’ weights, without any plugin, merely using connections. I’m posting a tutorial soon. You think you can figure out a way to accomplish this?

I will post a tutorial in two weeks time.

The technique would be applicable to more than just weights for blendshapes. It might even be possible to control weights for skinCluster joints too (if that helps for anything? Yeah, it should.) Some other possible applications would be blendshapes for the way Eddie Murphy turned into Nutty Professor.

Thanks everyone!!!! :) Hope to hear from you!

Add Joints Per Vertex
Maya — redesigndavid @ 5:27 pm

There are two methods to make an a mesh follow the vertexes of another mesh. One is to use a wrap deformer or add the influencing mesh as an influence in a skinCluster with use components enabled. The problem with wraps is it could get a bit slow. The problem with the next is somehow the post normalization available in Maya2011 doesn’t work with it. I decided to write a script that create joints and make the follow each vertex on the influencing mesh. Theoretically, you’ll have the best of all words.


proc jointsOnVerts (string $polygon) {
    $grp = `createNode transform -n ($polygon+"vtxGRP")`;
    $size = size(`polyInfo -faceToVertex $polygon`);
    for ($i=0;$i<int($size);$i++){
        $trans = `createNode transform`;
        $pos = `xform -q -ws -t ($polygon+".vtx["+$i+"]")`;
        xform -ws -t $pos[0] $pos[1] $pos[2] $trans;
        $fol=`createFolliclePolygon $trans $polygon`;
        delete $trans;
        $joint = `createNode joint -n ($polygon+"vtx"+$i)`;
        parent $joint $fol[0];
        setAttr ($joint+".t") 0 0 0;
        setAttr ($joint+".r") 0 0 0;
        setAttr ($joint+".jo") 0 0 0;
        parent $fol[0] $grp;
    }
}

proc string[]  createFolliclePolygon  (string $posTransform, string $nurbsSurface) {
    // make vector product nodes to get correct positions of the transform node
    $vecprod = `createNode vectorProduct`;
    setAttr ($vecprod+".operation") 4;
    connectAttr ($posTransform+".worldMatrix") ($vecprod+".matrix");
    connectAttr ($posTransform+".rotatePivot") ($vecprod+".input1");

    // connect the correct position to a closest point on surface node created
    $cpos = `createNode closestPointOnMesh -n ($posTransform+"_CPOS")`;
    connectAttr ($nurbsSurface+".worldMesh") ($cpos+".im");
    connectAttr ($vecprod+".output") ($cpos+".inPosition");

    // create a follicle node and connect it
    $folTransform = `createNode transform -n ($posTransform+"follicle")`;
    $fol = `createNode follicle -n ($posTransform+"follicleShape") -p $folTransform`;
    connectAttr -f ($fol+".outTranslate") ($folTransform+".translate");
    connectAttr -f ($fol+".outRotate") ($folTransform+".rotate");
    connectAttr -f ($nurbsSurface+".outMesh") ($fol+".inputMesh");
    connectAttr -f ($nurbsSurface+".worldMatrix[0]") ($fol+".inputWorldMatrix");

    setAttr ($fol+".parameterU") (`getAttr ($cpos+".parameterU")`);
    setAttr  ($fol+".parameterV") (`getAttr ($cpos+".parameterV")`);

    //create a blend between two attributes, a constant and the parameterU output of the cpos to control the follicle's parameter U
    $blendU = `createNode blendTwoAttr`;
    setAttr ($blendU+".input[0]") (`getAttr ($cpos+".parameterU")`);
    connectAttr ($cpos+".parameterU") ($blendU+".input[1]") ;
    connectAttr ($blendU+".output") ($fol+".parameterU");

    //return strings
    select -r  $folTransform $fol $cpos $blendU ;
    $list = `ls -sl`;
    select -cl;
    return $list ;
}

Blending Spline IKs and Ribbon Setups
Maya — redesigndavid @ 3:37 pm

I was unhappy with the controls I was giving the tentacles of our squid/octopus-looking monster. I decided to recreate them. This time, I’ll avoid as many constraints as I possibly could. And I’ll notate as I go through everything.

Right from the start, we wanted to give each tentacle an ability to pose in all sorts of ways. The control types that came to mind were either a spline IK or a ribbon controller. There are pros and cons for both.

The ik spline is awesome. It is widely used for lots of setups. I’ve seen cat tails and pony tails set up in this manner.

Essentially, ik splines (like most ik systems) handle the rotations of your joints. It handles them so that they would always fall exactly where your curve is.

My problem with using this for our tentacles is its lack of ability to twist in a detailed manner. If you wonder why CG systems haven’t developed enough to meet this requirement, you are asking the wrong question. The lack of proper twisting for spline IK’s makes sense. Splines, after all, cannot twist–just as a point contains no information of orientation and a line has no idea of where its flat surface may be.

This lack is solved by a ribbon setup. A ribbon, after all, is what you get when you extrude a spline in a direction giving it an ability to twist. A ribbon setup is also awesome. There’s a gazillion things you could do with a ribbon setup and it all depends on how much you control you want to have. In essence, you’ll have a bunch of joints or transforms follow specific points on a surface in position and orientation. If you twist that surface, those joints would all twist for you. And the surface can have as little as two controllers to make it bend, twist or whatever or just as many joints as you have, which is stupid. This of course depends on the amount of control you want to have.

The problem with the ribbon setup is, since joints would always follow specific points on the surface, when those surfaces extend too much, you’ll get stretching. Something you might want to have at times, but not all the time. This stretching can also occur for controllers you place in the middle of the surface. If it was a ribbon setup for the spine of a human character and you a middle controller somewhere in the abdomen, moving this controller up the chest would make the lower part of the abdomen stretch while crunching the part that goes into the chest. This might be important for toony animations but it does destroy realism for realistic characters. On the other hand, an IK spline, controlling nothing but rotations, won’t have this problem. The space between joints would remain the same all throughout the animation regardless of the surface’s stretching.

I wanted to combine both. I was thinking of doing it like how they combine IK and FK setups in an IK-FK blend, but it was obvious it wasn’t enough. If the ribbon setup is curling up a branch or a cylinder of some sort, and we switch to the IK spline, we’ll have the joints cut through the cylinder. It’ll be like an ugly morph where each point would just look for its corresponding target point and make a bee line towards it—a straight unrealistic, pass-through-anything-that-gets-in-the-way path. In the same way, if our tentacle has to stretch (or relax) it needs to be intelligent enough to do all this while in the space of the surface.

So the idea I had was to have a ribbon setup with each joint’s position depend on the UV coordinates provided by a blend between a constant and the UV coordinates that’s closest to a corresponding joint in an IK spline setup. Whew that was a mouthful. LOL!

To say that piece by piece, it goes: We have a ribbon setup. In that ribbon setup are joints that follow specific points on a surface. They know which specific points on that surface because of a UV input. If that input is constant, they’ll just follow that point on the surface regardless. But we’ll make that input a blend between two values. The first value would be the original constant, a value that would tell the joint its rightful point on the surface. While the second value the blend blends to is the closes UV point to a respective joint on an IK spline setup that also follows the surface.

That last bit is still a mouthful. It almost seems like a parallel story line that needs further breaking up. While we were working on the ribbon setup, there’s another set of joints. These joints are an exact replica of the original, except for their names obviously. These joints are connected to special nodes that try to find information for points on surfaces that are closest to positions. The information we are looking for are the UV coordinates these IK joints are closest to. By the way, we make sure this IK spline is following the surface exactly by duplicating an isoparm on the surface, with construction history kept on.

So that’s the idea. How’s it done? Well, I wrote a script for it.

The two procedures are:

proc jointsOnSurfaceToSplineRibbonBlend (string $jointList[], string $nurbsSurface, string $blendNode)  {
//init
if (!`objExists "follicleGRP"`) createNode transform -n "follicleGRP";
if (!`objExists "iksGRP"`) createNode transform -n "iksGRP";

if (!`attributeExists "blend" $blendNode`) {
addAttr -ln "blend" -at double -min 0 -max 1 -dv 0 $blendNode;
setAttr -e-keyable true ($blendNode+".blend");
}

// make ik equivalent of joints
for ($i=0; $i < `size $jointList`;$i++) {
$dup = `duplicate -n ($jointList[$i]+"ik") -po $jointList[$i]  `;
if ($i>0) parent $dup ($jointList[$i-1]+"ik");
else parent $dup "iksGRP";
}

// duplicate curve
$dupCurve =`duplicateCurve -ch 1 -rn 0 -local 0 ($nurbsSurface+".v[0.5]")`;

//create ik spline
string $ikHandle[];
select -cl;
$ikHandle = `ikHandle -curve $dupCurve[0] -sol ikSplineSolver -ccv false -pcv false -ns 3 -startJoint ($jointList[0]+"ik") -endEffector ($jointList[size($jointList)-1]+"ik")`;

//create follicles for each joint
for ($each in $jointList) {
$folAr = `createFollicle ($each+"ik") $nurbsSurface`;
// make those follicles become controlled by the blendNode
// note: we made sure that the createFollicle proc has the blendNode as the fourth (or index 3) element in the array return variable
connectAttr ($blendNode+".blend") ($folAr[3]+".attributesBlender");
parent $each $folAr[0];
parent $folAr[0] "follicleGRP";
}

// clean ups

}

proc string[]  createFollicle  (string $posTransform, string $nurbsSurface) {
// make vector product nodes to get correct positions of the transform node
$vecprod = `createNode vectorProduct`;
setAttr ($vecprod+".operation") 4;
connectAttr ($posTransform+".worldMatrix") ($vecprod+".matrix");
connectAttr ($posTransform+".rotatePivot") ($vecprod+".input1");

// connect the correct position to a closest point on surface node created
$cpos = `createNode closestPointOnSurface -n ($posTransform+"_CPOS")`;
connectAttr ($nurbsSurface+".ws") ($cpos+".is");
connectAttr ($vecprod+".output") ($cpos+".inPosition");

// create a follicle node and connect it
$folTransform = `createNode transform -n ($posTransform+"follicle")`;
$fol = `createNode follicle -n ($posTransform+"follicleShape") -p $folTransform`;
connectAttr -f ($fol+".outTranslate") ($folTransform+".translate");
connectAttr -f ($fol+".outRotate") ($folTransform+".rotate");
connectAttr -f ($nurbsSurface+".local") ($fol+".is");
connectAttr -f ($nurbsSurface+".worldMatrix[0]") ($fol+".inputWorldMatrix");

setAttr ($fol+".parameterU") (`getAttr ($cpos+".parameterU")`);
setAttr  ($fol+".parameterV") (`getAttr ($cpos+".parameterV")`);

//create a blend between two attributes, a constant and the parameterU output of the cpos to control the follicle's parameter U
$blendU = `createNode blendTwoAttr`;
setAttr ($blendU+".input[0]") (`getAttr ($cpos+".parameterU")`);
connectAttr ($cpos+".parameterU") ($blendU+".input[1]") ;
connectAttr ($blendU+".output") ($fol+".parameterU");

//return strings
select -r  $folTransform $fol $cpos $blendU ;
$list = `ls -sl`;
select -cl;
return $list ;
}

To use the code, you’ll need to have an unlimited version of Maya. Run those commands so they are registered in Maya’s brains. Then you will need a surface.

080410 0737 11 Blending Spline IKs and Ribbon Setups

Make sure that this surface is longer in the parameter U of its UV coordinates rather than its V parameter. The script I wrote is designed to allow it to go both ways, but just for simplicities sake, I did it this way. Create joints on the middle surface and a control curve somewhere. I used snap to grid to make sure my joints are right at the center of the surface’s V parameter.

080410 0737 21 Blending Spline IKs and Ribbon Setups

Then, run this command.

$jointList = {"joint1","joint2","joint3"}; // this is a list of the joints in order. You could choose to use 'ls –sl' for this if you want.
$nurbsSurface = "nurbsPlane1"; // name of the transform node of the surface
$blendNode = "nurbsCircle1"; // name of the control curve to which the blend will be added.
jointsOnSurfaceToSplineRibbonBlend $jointList $nurbsSurface $blendNode ; // this is the actual command with the variables added in proper order

You can set up clusters to control your nurbs surface or you could drag its control points just to test them out. Make the stretch and control as much as you want. Then change the values of the “blend” attribute you have in the nurbsCurve you created. Watch the joints (now no longer in a hierarchy) stretch and relax in the space of the surface.

All the Different Blog Editors
Shared — redesigndavid @ 3:51 pm

073010 0750 AlltheDiffe1 thumb All the Different Blog Editors

I have had this blog for more than a year. It used to be called redesigndavid.com. But I wasn’t diligent in making payments and I lost the rights to that URL. (I set up special services that would get me those URLs back)

I digress. What I’m trying to say here is I’ve been blogging for more than a year, but I haven’t been updating the blog as regular as I can. There are reasons to this. Most of the time, I get too engulfed in work. Sometimes, it’s a book that absorbs my attention too much, it monopolizes every spare moment. Sometimes though, I’m just too lazy to login. For this reason, I had been testing different methods to make posts to your blog. An off shoot of this endeavor is the new and handy JD redesign Images. It’s my first attempt at making a plugin. Only later did I realize, it’s functionality isn’t so unique as I thought. LOL!

I digress again. I’ve made many switches on my favorite blogging method. My least favorite is using wordpress’ default web based posting feature. It’s slow. Unintuitive. The only cool thing about it is oEmbeds. Basically, you just put the URL of the site where the embedded media should come from, and wordpress would work on it for you. That’s it.

When it comes to web-based posting, I don’t think anything comes close to the ease tumblr does things. You just specify what kind of post it’s gonna be and it does the rest of the work for you. So I’ve tried using Flock, plugins like Scribefire, some blogging softwares on windows, osx and iphones. They all for short, somehow. Or maybe I’m just too lazy?

Well, right now I’m using Microsoft Office’s Word. It’s promising. I kinda enjoy writing on it. I’m gonna have to say Microsoft again did a good job on this app.

Notes On My Desk
Shared — redesigndavid @ 5:58 pm

notes b thumb Notes On My Desk

My grandma once said you can gauge the quality of the grey matter between your ears by examining the works your hands produce. It can be writing literature, drawing, or solving Math problems. If there is output, there is activity up there. And if there is activity, there is quality matter.

I was looking at the notes I had on my desk. Scribbles and and markings that doesn’t surprise me. My desk generates about one rim of scratch paper covered in gibberish every month if I’m not careful. The notes mean zit to most people, but they mean conquered problems for me. Occasionally, I’d need a schematic that would help me understand an issue.

Sometimes, I solve equations I need for my rig. Sometimes, they’re plain notes. Sometimes, they don’t mean anything. LOL!

But I thought it would be cool to have the recorded on my blog too. They are little recordings of battles waged on technical issues, often ending in victory.

notes b 250x250 Notes On My Desknotes c 250x250 Notes On My Desknotes d 250x250 Notes On My Desknotes e 250x250 Notes On My Desknotes f 250x250 Notes On My Desknotes g 250x250 Notes On My Desknotes h 250x250 Notes On My Desknotes i 250x250 Notes On My Desk

Beautiful Monsters
Shared — redesigndavid @ 5:28 pm

The octopus is an intelligent animal. The video shows how next to the chimpanzees, these guys are pretty handy with tools. I haven’t had the chance to see these guys in real life. But I’d add it up to my bucket list.

I am tasked to rig a monster with tentacles. I don’t have the privilege of revealing how it will look and frankly, I have no intention of doing so. The video is a research of how we want it to walk. It is a rigging challenge, something that warms the heart.

The goal is to give the creature tentacles a blend between IK spline with “intelligent up objects” and a simplified ribbon that acts more like an FK. Then, each control would have dynamic parents, namely: Body, Up Parent, World.

The body would be done using two parts. There will be a tiny body that simply house the connection between tentacles and then the head. Lips and mouth would be flexible. There will be a ribbon set up for the lips and the teeth within. Eyes would be squash-able as it extends, optionally. I’ll keep posting about it. For now, this creature resides in the heads of the artists that work in my office.

Download Beta Version JD-redesignImages
JD redesignImages — redesigndavid @ 12:06 pm

blueprint1008 thumb Download Beta Version JD redesignImages

The images has, of course, nothing to do with the download. The download contains the latest version of my first plugin, JD-redesignImages. Learn more about it from this post.

JD-redesign-images (16)

Jonno teaching us Blender
Traditional — redesigndavid @ 5:38 pm

jonno teaching blender thumb Jonno teaching us Blender

We were having a class on Blender. Jonno was teaching us.

JD redesignImages
JD redesignImages — redesigndavid @ 6:52 pm

wordpress.jpg

WordPress has never been so amazing!

With JD redesignImages, you can avoid hotlinked images on your site. Cuz if we all play our part, we can make the world a better place. Let’s say, you have a blog. You won’t spend all your time reading your own blog’s articles. That’ll bore you to death! You probably know all of them by heart anyway, unless you stole those too!

Instead, you’d probably be reading somebody else’s blog. And often, you’d like to write something about somebody’s artwork and in the process beautify your own drab blog with a sample image (or gallery depending on how low your morals are). Then, you have two choices. One, you either download the image–or gallery, we talked about this already–unto your HD and re-upload them unto your blog. This takes time. After which, you lay them on your post, write your thoughts (pretend you are original) and publish. If you are lucky, the images would fall snug fit in your theme’s layout.

If you are not, you’ll have adjust things by either forcing them to display with an akward image resolution. Or you resize them with your favorite image editing program, and upload them a second time.

See my hassle-full point? Having a hotlinked-image-free site has been top New Year Resolutions for bloggers (maybe? if they care). But they all succumb to the alternative, a much simpler “Just Hotlink It” motto.

JD redesignImages primary objective is to rid your sight of this sacrilegious practice. And with all good things, they come with bonuses. Not only will it cleanse your site, it will also resize your images proportionately, and apply optional filters like grayscale, brightness, contrast, tint and blur. Why would you wanna do something like this? Well, it saves time and money! That should be enough reason!

How do I use it?

After installing and activating the plugin, go to your settings tab from your admin panel and look for JD redesignImages.

jd images settings link JD redesignImages

You can change the maximum width images would be displayed in your site. You could also change the maximum width linked images would display.

jd images settings1 JD redesignImages

Optionally, you can change the suffixes of the images that would be downloaded into your wordpress uploads directory. You can also choose to have certain filters be applied before they are saved.

Everytime a post or page is published, updated, edited, or shown on your website, JD redesignImages would check for two things: hotlinked and oversized images. For every image that meets the criteria, it applies the filters set above. <a href=”"> and <img src=”"> tags would then be updated to point to the new images saved in your “uploads folder” (images that are _suffixed according to your settings).

Having too many filters enabled may slow down publishing, updating, editing or showing of pages or posts. Server speed would play a factor. Blogs on cheap hosting would suffer more. Choose to enable filter with discretion.

Page 1 of 1112345...Last »
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
(c) 2010 redesigndavid.me | powered by WordPress with Barecity
אורן יומטוב