s432
所属分类:OpenGL
开发工具:Visual C++
文件大小:494KB
下载次数:9
上传日期:2012-09-07 13:19:29
上 传 者:
落寞风吹雨
说明: 标记、骨骼、动画
标记、骨骼、动画标记、骨骼、动画
(Mark, bones, animation marker, bone, animation marker, bones, animation)
文件列表:
标记、骨骼、动画 (0, 2012-07-03)
标记、骨骼、动画\Code (0, 2012-07-03)
标记、骨骼、动画\Code\OGL (0, 2012-07-03)
标记、骨骼、动画\Code\OGL\Skully (0, 2012-07-03)
标记、骨骼、动画\Code\OGL\Skully\Femme.dar (3252, 1999-05-15)
标记、骨骼、动画\Code\OGL\Skully\femmeHi.obj (286177, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\femmeHi.wgt (820372, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\femmeLo.obj (53851, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\femmeLo.wgt (252724, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\femmeMed.obj (180049, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\femmeMed.wgt (518404, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\HierWin.cpp (8168, 1999-11-12)
标记、骨骼、动画\Code\OGL\Skully\Hierwin.h (3079, 1999-10-20)
标记、骨骼、动画\Code\OGL\Skully\LoadOBJ.cpp (13046, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\LoadOBJ.h (1062, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\LoadSkel.cpp (6092, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\LoadSkel.h (792, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\MainFrm.cpp (11253, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\MainFrm.h (3044, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\MathDefs.cpp (8464, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\MathDefs.h (2921, 1999-08-02)
标记、骨骼、动画\Code\OGL\Skully\OGLView.cpp (41163, 1999-11-12)
标记、骨骼、动画\Code\OGL\Skully\OGLView.h (3878, 1999-11-12)
标记、骨骼、动画\Code\OGL\Skully\RES (0, 2012-07-03)
标记、骨骼、动画\Code\OGL\Skully\resource.h (3468, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\RES\MAINFRAM.BMP (1078, 1997-09-20)
标记、骨骼、动画\Code\OGL\Skully\RES\SkinApp.ico (1078, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\RES\Skully.ico (1078, 1997-09-07)
标记、骨骼、动画\Code\OGL\Skully\RES\Skully.rc2 (398, 1997-09-06)
标记、骨骼、动画\Code\OGL\Skully\RES\Toolbar.bmp (1142, 1997-09-06)
标记、骨骼、动画\Code\OGL\Skully\Skeleton.cpp (8677, 1999-10-20)
标记、骨骼、动画\Code\OGL\Skully\Skeleton.h (7355, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\Skully.cpp (4266, 1999-10-20)
标记、骨骼、动画\Code\OGL\Skully\Skully.dsp (5249, 1999-11-11)
标记、骨骼、动画\Code\OGL\Skully\Skully.dsw (535, 1999-10-20)
标记、骨骼、动画\Code\OGL\Skully\Skully.exe (290816, 1999-11-12)
标记、骨骼、动画\Code\OGL\Skully\Skully.h (1986, 1999-10-20)
标记、骨骼、动画\Code\OGL\Skully\Skully.rc (14995, 1999-11-12)
标记、骨骼、动画\Code\OGL\Skully\StdAfx.cpp (204, 1999-10-20)
... ...
Finally, I have posted source for Skeletal deformation in
OpenGL. It is a pretty complex sample as you need to have an
interface to select vertices, manipulate bones, set weights, and
lots of other stuff. It was much easier with the simple arm
two bone system from last year.
Realize, when I create characters for my work (and most others
doing this) use animation packages and exporters so they don't
need all this tool stuff. But if you don't have access to a nice
package, this is a start. It will take some work to study though
as there is a lot going on here.
Here is how it works.
Loading an Object, Skeleton, and Weight system
---------------------------------------------------------------------
I have included one skeletal system with a model in three resolutions
(so it will perform on most systems) with weight files.
The process is:
1. Load the Skeletal system with "Open Skeleton" and select Femme.dar
2. Load the Mesh with "Open Mesh File" Select one of the three models.
The mesh is now loaded and associated with the skeleton. If you select
"View/Draw Deformed" it will vanish. This is because the weights are
not set. You could set the weights manually (instructions later) or
load a weight file.
3. "Load Weight File" to get the weighting for the model. You need to
select the correct file for the model you selected or it will give an
error.
This automatically selects "Draw Deformed" so you can start manipulating
the character.
Manipulating the View
---------------------------------------------------------------------
You can change the view by using the Right Mouse Button
Click and drag to orbit view.
Hold CTRL and drag RMB to change Z view distance
Hold SHIFT and drag RMB to Move Camera in XY
Manipulating the Object
---------------------------------------------------------------------
Select a Bone from the Hierarchy window.
SHIFT + LMB drag to rotate the bone in XY
CTRL + LMB drag to rotate in Z
Note: There is no way to translate the bone without double clicking
in the hierarchy window and editing the box. A better interface would
make that easier. But, it is really only need when building the skeleton
originally.
If "Draw Deformed" is selected and the weights are set, rotating the
bones will deform the model.
Setting the Weights
---------------------------------------------------------------------
Ones you have loaded a model and skeleton you need to set the
rest frame. In most cases it will match in the import. If not,
manipulate the skeleton until it matches the mesh. Then select
"Skeleton/Set Rest Pose" This sets the rest postion that the
deformation is performed from.
To set the weights:
1. Select the Bone that you want to work with by selecting it in
the heirarchy.
2. Double Click on the Bone name to bring up the editing window.
Set the weight value that will influence that bone. Value of 1 is
full influence, .5 is 50%, etc.
3. Select the Vertices to influence by LMB drag a selection box on
the mesh.
4. Select "Skeleton/Set Bone Weights" to lock in those vertices into
the selected bone.
5. Do this for each bone and each vertex making sure that the sum
for each vertex is 100% (1.0).
You need to make sure that if you weight a vertex .5 to one bone, it
must be .5 to another bone or group of bones. This is a place where
the interface needs lots of work. If I was better at windows controls,
I would put a percentage slider after each bone and make it so they
must add up to 100 %.
If you screw up, select the vertex and hit "Skeleton/Clear Selected Weights"
this will reset it to 0.
Once you like it, "File/Save Weight File" to store.
Todo (ideas and things needed)
---------------------------------------------------------------------
Fix Screwy interface. Controls are wacky and need work.
Put in Paint on weighting system like Maya and Sumatra.
Add Bone creation and deletion functions.
Allow Save Skeleton
Allow Save "Object" which includes Mesh+Skeleton+Weights
Allow save and load of Poses and/or animation
Add texture loading "uv coords" are already supported in OBJ loader
Possibly add automatic weighting based on bone layout.
Support for other load formats (other then OBJ)
Integrate the 3D IK techniques from last year (pretty easy really)
Lighting is not correct for deformation (know the fix? it is easy but requires some CPU)
Notes
---------------------------------------------------------------------
For the sample models, I roughly set up the weights. Some are 50-50 but
most are 100% to a single bone. It could be refined a lot more to fix
problems. This software method is totally flexible. This is not true
of the DX7 and GL-HW T&L version. The restrictions mean I need to add
some filters.
DX7 is still in Beta and completely broken on all 3D cards
as of last week. I have new drivers I need to install and
test but for now, my Direct X sample will no longer work.
I will post the DX7 version as soon as it stablizes.
For people trying to develop DX apps, this must be a pretty
frustrating time.
I also want to get a version working with the NVidia OpenGL
Extension. Watch for word of that one. I need to get a card
first to try it out....
The OpenGL code is a complete software solution and as such
works on both Windows 95/*** as well as NT4.0/W2K.
Email with questions or issues. I am sure there will be plenty.
Jeff jeffl@darwin3d.com
近期下载者:
相关文件:
收藏者: