Jump to content
  • Advertisement
Sign in to follow this  
Grattier

Skinning a mesh.... need help

This topic is 4521 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i started to look at directX last week and now i want to know hot to play with my mesh.. I created a mesh in Maya that is a Cylinder with many vertices. Now my program load it and let me see the total number of vertices and faces (Progressive mesh). Now i want to transform some vertices... i think it's called "Skinning". I don't have animation stored in my X file and i don't want animation... i want to transform my mesh as i want using coding. How it work? Thanks

Share this post


Link to post
Share on other sites
Advertisement
It's not completely clear what you want. Skinning means displacing/transforming individual vertices according to an (animated) bone system. Since you don't want animation, you probably don't mean skinning.

Transforming a mesh as a whole is something different and much simpler. In DirectX this is done by ajusting the world matrix before rendering the object. The D3DX-framework that comes with DX provides some easy functionality for this. For example, to translate the mesh five units away from you (looking down the Z-axis):

D3DXMATRIX matTransform;
D3DXMatrixTranslation( &matTransform, 0.0f, 0.0f, 5.0f );
m_pDevice->SetTransform( D3DTS_WORLD, &matTransform );

m_pMesh->Render();


Illco

Share this post


Link to post
Share on other sites
Ok... i dont want to move the mesh but physically transform it...

Example: My mesh is a cylinder and i want it to look like a wood log with some 3d details..

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You'll really just have to model it to look like a log, in your modeling program choose the wire frame view, them grab groups of vertices (which make up the log), and just move them about a bit, you might have to realign quite a few and it takews a while. You could also put a couple smaller cylinders in there (sticking out of the log), for branchs, and bend them around a bit as well.

Share this post


Link to post
Share on other sites
Yes i know that i can do that... but i can't do that and i explain:

It's a program that receive many informations on the log and with those informations.... create a log in 3D .. it's something like a Terrain Generator but it's a Wood Log Generator... without branchs...

I want to know the easier way to do that... with a mesh that i transform some vertices or build it with many primitive each time...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
look in the sdk tutorials folder, there is one, where they make a cylinder just from algorythmicly (taylor series), maybe that could help as a start.

..Program Files\Microsoft DirectX 9.0 SDK (Summer 2004)\Samples\C++\Direct3D\Tutorials

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
..also look into vertex tweening

Share this post


Link to post
Share on other sites
Look up "morph targets". That is an animation technique that transforms one shape into another, such as a cylinder into a log.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!