Yeah...
Another WIP thread from me. lol
At least they
usually end up on the Program Announce board too
Anyway, I posted the other day to see if anyone would be interested in something like this. The response was good so I'm going to do what I can to make it happen.
This plugin is intended to give you a MUCH more powerful command set for your object meshes. The features that I am shooting for are things like:
-General Mesh information
-Vertex Data and manipulation
-Poly data and manipulation
-Bone Weighting data and manipulation
-Adding/Removing verts
-Adding/Removing polys
-Vertex Welding
-Poly reduction command set
-Exporting data options
So far, the current command list looks like this: (all completed commands!)
General Info:
FVFformat = MT_GetFVF( ObjID, Limb )
FVFsize = MT_GetFVFsize( ObjID, Limb )
MeshID = MT_GetMeshID( ObjID, Limb )
Vertex Data:
The "Original" data is the values before they are effected by bone weighting. This is the values that DBpro returns with it's standard vertex manipulation command set. The calculated values are the current values that have been modified by bone weighting.
Count = MT_GetVertexCount( ObjID, Limb )
x# = MT_GetVertOriginalPosX( ObjID, Limb, Vertex )
y# = MT_GetVertOriginalPosY( ObjID, Limb, Vertex )
z# = MT_GetVertOriginalPosZ( ObjID, Limb, Vertex )
nx# = MT_GetVertOriginalNormX( ObjID, Limb, Vertex )
ny# = MT_GetVertOriginalNormY( ObjID, Limb, Vertex )
nz# = MT_GetVertOriginalNormZ( ObjID, Limb, Vertex )
u# = MT_GetVertOriginalU( ObjID, Limb, Vertex )
v# = MT_GetVertOriginalV( ObjID, Limb, Vertex )
MT_SetVertOriginalPos ObjID, Limb, Vert, x#, y#, z# MT_SetVertOriginalNorm ObjID, Limb, Vert, x#, y#, z#
MT_SetVertOriginalUV ObjID, Limb, Vert, x#, y#, z#
x# = MT_GetVertCalcPosX( ObjID, Limb, Vertex )
y# = MT_GetVertCalcPosY( ObjID, Limb, Vertex )
z# = MT_GetVertCalcPosZ( ObjID, Limb, Vertex )
nx# = MT_GetVertCalcNormX( ObjID, Limb, Vertex )
ny# = MT_GetVertCalcNormY( ObjID, Limb, Vertex )
nz# = MT_GetVertCalcNormZ( ObjID, Limb, Vertex )
u# = MT_GetVertCalcU( ObjID, Limb, Vertex )
v# = MT_GetVertCalcV( ObjID, Limb, Vertex )
To add:
-Setting Vertex data by it's calculated position.
-Adding/Deleting Vertices
Poly Data
Count = MT_GetPolyCount( ObjID, Limb )
Vert = MT_GetPolyVert0( ObjID, Limb, Poly )
Vert = MT_GetPolyVert1( ObjID, Limb, Poly )
Vert = MT_GetPolyVert2( ObjID, Limb, Poly )
MT_SetPolyVerts ObjID, Limb, Poly, Vert0, Vert1, Vert2
MT_DeletePoly ObjID, Limb, Poly
MT_AddPoly ObjID, Limb, Vert0,Vert1, Vert2
To Add:
-Calculate the normal of a poly
Vertex Weighting Data
Count = MT_GetBoneCount( ObjID, Limb )
Influences = MT_GetBoneInfluences( ObjID, Limb, BoneNo )
Vert = MT_GetBoneInfluenceVert( ObjID, Limb, BoneNo, InfluNo )
Weight# = MT_GetBoneInfluenceWeight( ObjID, Limb, BoneNo, InfluNo )
MT_SetBoneInfluenceWeight ObjID, Limb, BoneNo, InfluNo, Weight#
Things are progressing nicely. I have posted a video of the poly adding/deleting. It is actually pretty fast. I put the sync rate to 10 in the video, otherwise they would disapear to quick!
The first part of the video shows random polys being removed. The second half show polys being added using random vertices.
http://forumfiles.thegamecreators.com/?i=1215435
By the way, the model's face is from one of my other WIP's: 3D Character Maker
Let me know what you think! I'd love to hear some any ideas, comments or suggestions!
Thanks!
-Ron Erickson