|
I need to be able to access the vertex information stored in a morph target.
When you import a mesh with a morph target on it from Max or Maya the shapes show up as slider values on the object. The sliders are attached to simple AnimatableDouble properties, and do not appear to plug into anything that looks remotely like stored vertex information.
Does anyone know where the vertex data for shapes is stored and how I would go about accessing it?
|
|
|
|
which version MB you are using?
|
|
|
ZachHall 14 June 2010 09:21 AM
I need to be able to access the vertex information stored in a morph target.
When you import a mesh with a morph target on it from Max or Maya the shapes show up as slider values on the object. The sliders are attached to simple AnimatableDouble properties, and do not appear to plug into anything that looks remotely like stored vertex information.
Does anyone know where the vertex data for shapes is stored and how I would go about accessing it?
http://www.3d-source.com
|
|
|
|
I am using Motion Builder 2010.
|
|
|
|
There is no access to the shape vertex info in MB2010 and before versions. In MB2011 there a set of FBModel::ShapeXXXXXX() functions to do so.
/**
* \name Shape Management Interface
*/
//@{
/** Get Shape Count. */
int ShapeGetCount() const;
/** Return the shape Name */
const char* ShapeGetName(int pShapeIdx) const;
/** Add new shape
* \param pName the shape name
* \return the index of the new shape, -1 if the shape adding fail.
*/
int ShapeAdd(const char* pName)
/** Clears all the shapes*/
void ShapeClearAll()
/** Init the shape.
* \param pShapeIdx The index of the shape to be inited.
* \param pDiffSize Total number of different point (pos or normal) compared to base geometry.
* \param pWithNormal Currently normal won't be considered during shape blending.
*/
void ShapeInit(int pShapeIdx, int pDiffSize, bool pWithNormal = false)
/** Return the shape's total diff points count
* \param pShapeIdx The index of the shape
*/
int ShapeGetDiffPointCount(int pShapeIdx) const;
/** Set the differentiate point.
* \param pShapeIdx The index of the shape
* \param pDiffIndex The index of the diff point in this shape.
* \param pOriIndex The index of the diff point in the original geometry.
* \param pPosDiff The position differentiation.
* \param pNormalDiff The normal differentiation.
*/
bool ShapeSetDiffPoint(int pShapeIdx, int pDiffIndex, int pOriIndex, const FBVertex& pPosDiff)
bool ShapeSetDiffPoint(int pShapeIdx, int pDiffIndex, int pOriIndex, const FBVertex& pPosDiff, const FBNormal& pNormalDiff)
/** Get the differentiate point.
* \param pShapeIdx The index of the shape
* \param pDiffIndex The index of the diff point in this shape.
* \param pOriIndex The index of the diff point in the original geometry.
* \param pPosDiff The position differentiation.
* \param pNormalDiff The normal differentiation.
*/
bool ShapeGetDiffPoint(int pShapeIdx, int pDiffIndex, int& pOriIndex, FBVertex& pPosDiff) const;
bool ShapeGetDiffPoint(int pShapeIdx, int pDiffIndex, int& pOriIndex, FBVertex& pPosDiff, FBNormal& pNormalDiff) const;
//@}
|
|
|