Chad Vernon
  • Home
  • Reel/Resume
  • Work
  • Resources
  • About
  • Contact
sideBar

Search

Categories

  • CG
  • cvxporter
  • Maya
    • API
    • Plug-ins
  • Personal

Archives

  • May 2012
  • March 2012
  • September 2011
  • June 2011
  • March 2011
  • December 2010
  • November 2010
  • September 2010
  • August 2010
  • July 2010
  • May 2010
  • April 2010
  • March 2010
  • December 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007

Rss

  • Main Entries RSS
  • Comments RSS
Home » Resources » cvCudaBlendShape

cvCudaBlendShape

Description

A blendshape deformer implemented with the CUBLAS GPU library. The CUDA libraries will need to be installed on any machine that uses this plug-in. You can download the CUDA libraries from NVIDIA.

Node Reference

Long Name Type Default
deltas
Target deltas.
vectorArray 0
weight
Animated weight values.
multi-float 0
initialized
Internal initialization flag. Do not set.
bool false
run
Set to true to allow deformer to run. Since copying data to the GPU can be expensive, adding many targets at once can take a long time since each time a target is added, the existing targets are cleared from the GPU and then the new target list is copied to the GPU . This flag allows you to defer the GPU memory copy until all the targets have been added.
bool false
paintMode
Painting targets is enabled by painting the paintMap attribute. Since all the target deltas are stored on the GPU, painting target maps requires that painted target deltas be transferred to the GPU. This can be an expensive operation, so a paintMode attribute is available on the node. When painting, this should be set to true. When finished painting, paintMode should be set to false.
bool false
targetMap
The per-target painted maps.
doubleArray null
inInput
Parent compound attribute for paintable attribute.
compound array N/A
    paintMap
    Paintable attribute.
doubleArray null

Usage Notes

The UI

Open the UI by running:

import cvCudaBlendShape
cvCudaBlendShape.ui()

The UI allows access to the cvCudaBlendShape commands as well as painting the targets of a node. To paint a specific target, select the radio button next to the target weight slider.

Painting targets is enabled by painting the paintMap attribute. Since all the target deltas are stored on the GPU, painting target maps requires that painted target deltas be transferred to the GPU. This can be an expensive operation, so a paintMode attribute is available on the node. When painting, this should be set to true. When finished painting, paintMode should be set to false.

Create the Deformer

Select the targets mesh, shift select the base mesh. Don’t forget to set the run flag to true!

import cvCudaBlendShape
deformer = cvCudaBlendShape.create(baseMesh=None, targets=[], name='cvCudaBlendShape#')

def create(baseMesh=None, targets=[], name='cvCudaBlendShape#'):
    """
    Creates a cvCudaBlendShape deformer.

    Parameters:
        baseMesh    - baseMesh snaps to snapMesh
        targets     - list of targets
        name        - Name of the deformer to create.

    Returns:
        The name of the created cvCudaBlendShape node.
    """

Add additional targets

# Select target then base
import cvCudaBlendShape
cvCudaBlendShape.addTarget()

def addTarget(cvCudaBlendShapeNode=None, target=None, base=None):
    """
    Adds a new target to the cvCudaBlendShape node.

    Parameters:
        cvCudaBlendShapeNode    - cvCudaBlendShape node
        target                  - Name of the new target
        base                    - Name of the base mesh.

    Returns:
        Nothing
    """

Update existing targets

# Select target then base
import cvCudaBlendShape
cvCudaBlendShape.updateTarget()

def updateTarget(cvCudaBlendShapeNode=None, target=None, base=None):
    """
    Updates an existing target if the target has been updated.

    Parameters:
        cvCudaBlendShapeNode    - cvCudaBlendShape node
        target                  - Name of the new target
        base                    - Name of the base mesh.

    Returns:
        Nothing
    """

No Responses to “cvCudaBlendShape”

Subscribes to this topic Comment RSS or TrackBack URL

Leave A Reply

Allowed tag : <blockquote>, <p>, <code>, <em>, <small>, <ul>, <li>, <ol>, <a href=>..

 Username

 Email Address

 Website

Sticky: Always double check your comment before posting Please Note: Comment Moderation Maybe Active So There Is No Need To Resubmit Your Comments
Home » Resources » cvCudaBlendShape

© 2011 Chad Vernon