Skip to main content
gamedev.net
🔒 Locked

Meshes

Started by wingman20 Jan 16, 2001 at 8:59 AM 6 replies 450+ views
Original Post
wingman20
wingman20
I''m new to directX and have done no previous game programing. i''ve been trying to figure out how to move a mesh for quite a while. if i have a mesh, how can i use a matrix to move that arround inworld space. please give me some code. thanks
PSioNiC
PSioNiC
im pretty sure that you do your animation with Cinema 4D or whatever program and then you export all the frames into your directX program. Im pretty sure there are functions in directX 8.0 that will load mesh animations in. You dont have to do the rotation math manually
"This is stupid. I can't believe this! Ok, this time, there really IS a bug in the compiler."... 20 mins pass ..."I'M AN IDIOT!!!"
PSioNiC
PSioNiC
im pretty sure that you do your animation with Cinema 4D or whatever program and then you export all the frames into your directX program. Im pretty sure there are functions in directX 8.0 that will load mesh animations in. You dont have to do the rotation math manually

aDasTRa - that thing about moving pillars around. It would actually be easier than what we are doing now. You are just using words to make it sound like more work than it really is
example:
load up the animation program, move the pillar over again, then save it, then export it, then load up the 3d engine then goto the place where there pillar is, then decide what you want to do
or
move the pillar over, save, export, run. I matter of 20 seconds. You dont have to load up the animation program up again (unless you are running an AMD system that dies when you try to do two things at once because of its sucky one-processor), and you don''t have to close it. Besides, what do you think you do when you are working in a level editor anyways?? Im sorry but that though was complete BS.

I agree with you on the fact that doing all of those visibility tests though. But im sure that there is a way to do get around it. When you use Clip Planes, does it just clip the triangles so it don''t have to draw them or does it make it so that it doesn''t have to do the math aswell?




"This is stupid. I can't believe this! Ok, this time, there really IS a bug in the compiler."... 20 mins pass ..."I'M AN IDIOT!!!"
DarkAngel16
DarkAngel16
Psionic, your wrong.
That''s a animated mesh your talking about and yes that is quite simple.

How EVER he''s talking about, Scaling, Rotating, and Moving the X Y Z coordinates of the mesh.
To do this you have you actually change the World Matrix that the mesh is being rendered in. It''s not too hard but it sure is complex.

I''ve got a 3D world which all works fine except I''m using D3DTS_VIEW and to do all that stuff to one of my mesh''s make''s everything "trail" so i''m currently trying to figure that problem out.
wingman20
wingman20
thanks for your reply, but if i have two meshes, for example a mesh for a character''s body and one for his/her arm and i only want to move the arm how can i do that?

thanks
DarkAngel16
DarkAngel16
In that case have 1 Mesh with 2 Frames in it.

1st frame is just standing still, 2nd frame is whereever you want it. It''s not wise to "animate" body parts by hard code.

To do this use something like 3D Studio Max, or Maya, or Lightwave, or Truespace even.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.