def weight_transfer(skin_cluster, verts, old_deformers, new_deformer):
'''
------------------------------------------------------------------------
Purpose:
Transfers the weights from the old deformers to the new deformer while
keeping any other weights the same
------------------------------------------------------------------------
verts = list;
- list of verts to search for weight values and transfer them
old_deformers = list;
- list of the deformers you want to query the values from and get
rid of
new_deformer = string;
- the deformer that you want to have take the values of the old
deformers into itself
'''
active_deformers_list = cmds.skinCluster(skin_cluster, q=1, deformerTools=1)
old_deformers = [each_deformer for each_deformer in old_deformers
if each_deformer in active_deformers_list]
cmds.setAttr("%s.normalizeWeights" % skin_cluster, 0)
for each_vert in verts:
for each_deformer in old_deformers:
old_value = cmds.skinPercent(skin_cluster, each_vert, q=1,
transform=each_deformer, value=1)
cmds.skinPercent(skin_cluster, each_vert,
transformValue=[each_deformer,0])
cmds.skinPercent(skin_cluster, each_vert, transformValue = [new_deformer, old_value], relative=1 )
cmds.setAttr("%s.normalizeWeights" % skin_cluster, 1)
©
Thursday, November 29, 2012
Some skinning code
So while I was doing corrective skinning this past week on one of the characters on Them Greeks, I noticed there was no quick way to transfer all the weights from one or multiple joints to another quickly so you don't lose previous work by trying to reskin an area.
Tuesday, January 10, 2012
Kiergo - Fur Development
So a friend had asked me a while back to help him on his animated web series that he plans to start up sometime this year, and a recently he asked me to also do the Fur and Hair for the show.
Below are some render tests for Kiergo's Mane and the concept he provided. The next part I will tackle will be the mane in the under the chin, followed by the fur on the face.
Clean Shots



Messy Shots

Concept, Model and Textures by Jacob Shrodes
Below are some render tests for Kiergo's Mane and the concept he provided. The next part I will tackle will be the mane in the under the chin, followed by the fur on the face.
Clean Shots
Messy Shots
Concept, Model and Textures by Jacob Shrodes
Monday, January 9, 2012
When Maya says no
It just means that it has decided in all it's wisdom to be lazy, and it likes to do this all the time.
True Story Bro
Case Example, the next available flag in the connectAttr and disconnectAttr commands, it will work some of the time but the rest it just shoves a middle finger in your face. It will give you a little error saying that the flag is incompatible with an attribute that has multiple inputs ex. "plusMinusAverage.input3D[0]". A quick solution for this problem is to create your own system that checks for the next available open slot. Something like this:
I ran into this problem trying to connect shaders to different shading engines and the plusMinusAverage node through Python.
Labels:
attributes,
available,
connect,
disconnect,
error,
maya,
next,
problem,
python,
solution
Sunday, November 27, 2011
The Truth be, I haven't been very lazy
I wish I had been but I wasn't, so now that I am back home and not in a school environment anymore (I graduated ). I'll be putting up what I've been working on for the week here. Just have look at what I've done lately :
dvRenderCurve Script:
A script that creates geometry that match your curves, so you can render them out with Mental Ray
shadingLighting Script:
A small toolset that has some commonly used tools by shading and lighting artists, as asked for by a friend
facialGui Script v. 1.0:
An automated facial gui system based on blendshapes so that students can see how their blendshapes are interpolating with one another in a more "sophisticated" system.
nukeRender Script v. 1.0:
A script for a project with ESPN, the purpose is so all they have to do is hit a button to change a text in nuke, re-render all their shots with the new text and turns the image sequences into a movie file. This is the portion of the script that edits and makes the new Nuke files. The script has been updated some more since this video went live, new video coming soon.
Work In Progress

This is the Renamer Script version 2 ! Right Now I am going through and making sure all the functions of the layout are working before implementing the renaming code into it, which will be the easy part. The new script is a complete overhaul from the original, since then I have learned more about object oriented programming , regular expressions, file management , and much more. I will be implementing all these new concepts to the new script, thus making it more professional and useful. Did I mention it follows PEP 8 now ?

I will also be redoing the rig for this model by my friend Kyle Havrilesko, which is going to be a lot of fun !
Other than that, I am also going to be messing around with Fur and Hair systems some more, will put up results when I get them , keep working on my rig builder, and other work that I have coming my way. Anything that I can put up here will be here :)
The dvRenderScript and shadingLighting scripts will be up on creativeCrash.com once they are approved by them and if you want to check Kyle's Site , it's www.awesomeharvey.com
Take Care !
- David
dvRenderCurve Script:
A script that creates geometry that match your curves, so you can render them out with Mental Ray
shadingLighting Script:
A small toolset that has some commonly used tools by shading and lighting artists, as asked for by a friend
facialGui Script v. 1.0:
An automated facial gui system based on blendshapes so that students can see how their blendshapes are interpolating with one another in a more "sophisticated" system.
nukeRender Script v. 1.0:
A script for a project with ESPN, the purpose is so all they have to do is hit a button to change a text in nuke, re-render all their shots with the new text and turns the image sequences into a movie file. This is the portion of the script that edits and makes the new Nuke files. The script has been updated some more since this video went live, new video coming soon.
Work In Progress
This is the Renamer Script version 2 ! Right Now I am going through and making sure all the functions of the layout are working before implementing the renaming code into it, which will be the easy part. The new script is a complete overhaul from the original, since then I have learned more about object oriented programming , regular expressions, file management , and much more. I will be implementing all these new concepts to the new script, thus making it more professional and useful. Did I mention it follows PEP 8 now ?
I will also be redoing the rig for this model by my friend Kyle Havrilesko, which is going to be a lot of fun !
Other than that, I am also going to be messing around with Fur and Hair systems some more, will put up results when I get them , keep working on my rig builder, and other work that I have coming my way. Anything that I can put up here will be here :)
The dvRenderScript and shadingLighting scripts will be up on creativeCrash.com once they are approved by them and if you want to check Kyle's Site , it's www.awesomeharvey.com
Take Care !
- David
Saturday, November 19, 2011
Pro Tips I which existed
In my travels in the land of python, I have come across some information that wasn't easy find or clear up, so here is what I learned:
* To create a File , you just have to use the file.open(file_name, "w") command and give it a name that doesn't exist. This applies for creating files with any other commands, such as XML or Pickle, except that with a Pickle it's pickle.dump().
* If you are trying to create a Folder, you have to look up how to create a Dictionary (And I don't mean a dictionary to store data a.k.a {} ). Prior to Windows, folders were called dictionaries. The command is os.mkDir by the way
* To edit a single object in a list, you can just do list[1] = new value, instead of having to use the remove and insert commands
* To create a File , you just have to use the file.open(file_name, "w") command and give it a name that doesn't exist. This applies for creating files with any other commands, such as XML or Pickle, except that with a Pickle it's pickle.dump().
* If you are trying to create a Folder, you have to look up how to create a Dictionary (And I don't mean a dictionary to store data a.k.a {} ). Prior to Windows, folders were called dictionaries. The command is os.mkDir by the way
* To edit a single object in a list, you can just do list[1] = new value, instead of having to use the remove and insert commands
Wednesday, July 13, 2011
Dragon Face Deformation
The First Render Pass for the Facial Animation for the dragon I rigged. I plan on making the skin slide so that it feels more realistic. More stuff to come soon, as well as breakdown of the Dragon Rig.
-Model by X5sunu
-UVs by Nathaniel Stuart Harrison
-Texturing by Landon Gin
-Rig by David Vega
-Animation by Devon Roderick
Sunday, April 10, 2011
Revamping Scripts: The First
Hello out there again! Now that I have entered the last leg of my college run and have starting working on my demo reel assets, I have started to take the time to go back and rework my older scripts not only to make them more efficient but to learn more about scripting itself and the commands maya lets you play around with. So here is my Renaming Tool I revamped and used to learn more about how the formLayout works for future endeavors:
Link to Script:
Basic Renamer Script
Rename Script from David Vega on Vimeo.
Link to Script:
Basic Renamer Script
Subscribe to:
Comments (Atom)