Thanks to Matt Kuruc for directing me towards this
http://www.swig.org/ - "super easy way to generate python bindings for c++ code."
I already have quite a bit of code ready written in python.
I had been planning on converting it over to C++ with the aim of creating a maya plugin.
With this I might be able to keep a large portion of that existing code, which would be lovely.
Additional References:
http://www.swig.org/Doc1.3/Python.html
Friday, September 30, 2011
Sunday, September 25, 2011
Shader Work
References:
http://www.mail-archive.com/python_inside_maya@googlegroups.com/msg04471.html
http://tech-artists.org/forum/showthread.php?t=1279
http://download.autodesk.com/global/docs/maya2012/ja_jp/PyMel/generated/pymel.core.rendering.html#module-pymel.core.rendering
http://autodesk.com/us/maya/2011help/CommandsPython/hyperShade.html
http://autodesk.com/us/maya/2011help/CommandsPython/shadingNode.html
http://forums.cgsociety.org/archive/index.php/t-767023.html
Code:
So this is kinda working..
import maya.cmds as cmds
http://www.mail-archive.com/python_inside_maya@googlegroups.com/msg04471.html
http://tech-artists.org/forum/showthread.php?t=1279
http://download.autodesk.com/global/docs/maya2012/ja_jp/PyMel/generated/pymel.core.rendering.html#module-pymel.core.rendering
http://autodesk.com/us/maya/2011help/CommandsPython/hyperShade.html
http://autodesk.com/us/maya/2011help/CommandsPython/shadingNode.html
http://forums.cgsociety.org/archive/index.php/t-767023.html
Code:
So this is kinda working..
import maya.cmds as cmds
cmds.shadingNode('misss_fast_shader', asUtility=True, name='skin' )
but it's only creating it in the Work Area, not creating an actual shader, helpful for later though
[27Sept]
Got it! Set asShader=True
cmds.shadingNode('misss_fast_shader', asShader=True, asUtility=True, name='skin' )
other options -asTexture -asLight -asPostProcess -asUtility
then to add a new texture to map
cmds.shadingNode('lambert', asTexture=True, asUtility=True, name='skin' )
so maybe I don't need the asUtility...?
[27Sept]
Got it! Set asShader=True
cmds.shadingNode('misss_fast_shader', asShader=True, asUtility=True, name='skin' )
other options -asTexture -asLight -asPostProcess -asUtility
then to add a new texture to map
cmds.shadingNode('lambert', asTexture=True, asUtility=True, name='skin' )
so maybe I don't need the asUtility...?
Thursday, September 22, 2011
Shader Network
My plan is to begin with creating a script to build the necessary shader network. This is something that has been done before and so I believe it will be the easiest script to write. Many people have written such scripts and so searching for solutions will be infinitely easier. As opposed to searching for "maya sweating" which yields little helpful and requires a lot of google manipulation and sifting through unhelpful material. After the jump is the current SSS shader network used for the face. It is all built by hand and as you can see from the shear number of nodes and connections can be quiet time consuming. Joe (Kider) changed the name of one of my texture folders to fit with updates, and relinking all the textures was really quite fun. There are also other somewhat matching shaders to be built. And multiple files...
Monday, September 19, 2011
Redesign
Flushing
- record data -> temperature sensor
- as external temperature decreases, flushing increases
- need the face to flush (most notable)
- need a shader network
- can be done by hand -> time consuming
- build script to create shader
- how do we identify areas of flushing? user input
- flushing handled by blend box
- 0 = no flushing, 1 = full flush
- keyframe blend value based on temperature input
- start -> initial decrease = 0
- min point = 1 (default adjustable)
Sweating
- record data, GSR sensor
- sweat increases with GSR value
- need sweat to drip down the face
- build particle system
- again, time consuming to do by hand
- need 3 pieces
- face geometry
- emitter (scaled copy of face geometry - hidden)
- outer bubble (scaled copy of emitter - hidden)
- acts as boundary so particles don't drift too far
- face geometry indentified by user selection
- amount of sweat controlled by emitter rate 0 -> infinite particles/second
- begin -> initial increase: rate = 0
- max point: rate = 15 (default, adjustable)
Possible Skin Deformation
Input: Organs + Blend Shapes, Body Geometry
1. Determine width/height of organs
- circle deformers radius = 1/16 width
- positioned at x = 0, w/3, 2w/3, w
- and y = 0, h/7, 2h/7, 3h/7, 4h/7, 5h/7, 6h/7, h
2. Locators to match circle deformers
3. Snap locators to organs -> geometry constraints
4. Snap circle deformers to body geometry (no constraint)
5. Parent circle deformers to locators
6. Wire deformer -> object: body geometry, deformers: circle
7. Keyframe blend shapes from data
Wednesday, September 14, 2011
In the Beginning...
Abstract: Humans become visibly tired during physical activity. After a set of squats, jumping jacks or walking up a flight of stairs, individuals start to pant, sweat, loose their balance, and flush. Simulating these physiological changes due to exertion and exhaustion on an animated character greatly enhances a motion’s realism. We will present a user friendly application that quickly prepares a three dimensional model to display these effects of exhaustion.
Subscribe to:
Posts (Atom)