Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About Ritti

  • Rank
  1. As the topic says I'm trying to use my own meshes in the DX SDK sample multianimation. The mesh appears for one frame, then it disappears. It appears to be because of D3DXMatrixMultiply( &pFrame->TransformationMatrix, &pFrame->TransformationMatrix, pmxBase ); in AnimationInstance.cpp As I read in a thread here it doesn't reset to the original value but it multiplies by itself so if the value is (0,0,2) then it gets (0,0,4) (0,0,8) (0,0,16) and so on How can I adjust this function to work properly with my mesh? In the thread I read the author said he had to inverse the multiplication to undo the changes but how? The search function isn't working now so I cant find the thread, but I'll update this post as soon as I've found it. Edit: This is the thread i mentioned http://www.gamedev.net/topic/501879-multianimation-sample-seems-to-be-geared-to-only-loading-tiny/ I would appreciate if somebody could help me. Thanks, Ritti
  2. Ritti

    skinnedmesh & instancing

    Yeah thank you, this sample will help me a lot to understand how instancing works Thanks again, Ritti
  3. Hi. I adapted the skinnedmesh sample from the dx sdk to act as a strategy game. So i have a raptor which I can move to the cursor in 3d space, collision detection and multiple animations. Now I have to show more than one raptor 'cause you will have more than one of the same unit in a strategy game ^^. I think the best way doing this is instancing. I know the multianimation sample but its a little to complicated, and in addition I cant use my own meshes (I can switch view and hear walking sounds but it wont show up anything) What do I have to do to have multiple instances? What do I have to clone exactly (I think the frameroot and animcontroller but I'm not sure)? And how can I copy them during runtime and keep them separated so that my raptors wont do all the same animation? Edit: And how can I move them separately? If I select one and rightklick on the world only the selected one should move and not all instances (I think to know how to select one) but do I need a separate world for each instance or is there an other way to do this more efficient? Thanks in advance Ritti
  4. Ritti

    Bounding Sphere Position

    Well, yes I really answered my own question but I didn't realize it ^^ Thank you for you help you saved me a lot of time =)
  5. Hi, I have a problem with calculating the position of a boundingsphere for an animated mesh (.x file) With D3DXFrameCalculateBoundingSphere( g_pFrameRoot[0], &g_vObjectCenter, &g_fObjectRadius ) ; I can calculate the center every frame, but I think the center is referred to the mesh (and not to the world), so it won't change if I move the mesh with D3DXMatrixTranslation. So my question is: How do I calculate the x,y,z coordinates of the Sphere/Box? Btw: to recalculate the sphere every frame seems a little inefficient, so how can I make this less CPU intensive? I hope somebody can help me. Thanks in advance Ritti
  6. Yeah that sounds good, I knew there would be an "easy" solution ^^ Thank you very much for your help
  7. Hi, I'm programming a Strategy Game but have a Problem moving objects to the cursor. If i set the camera vEye(-5,0,0) vAt(.... it's no problem to read the cursor coordinates and send a Unit to them. But if i set vEye(-5,-2.0) so that a unit which is on the bottom of the screen is nearer than one on top (i think its like in warcraft3), I have problems sending a unit to the cursor. if i click on the top of the screen the unit will do only half the way (the same with left and right). I tried to multiply the cursor coordinates but then the negative one woudln't match any more. I know this happens because the unit does the same way but because of the angle it seems shorter. But I don't know what to do to solve this? Should I change the camera settings? Or is there a simple math formula to adjust the distance to the coordinates? I hope you understand what i mean ^^ Thanks, Ritti
  8. Ritti

    animate .obj meshes

    Thank you for your reply, thats good to know I tried the cansin collada loader (http://thecansin.com/2010/10/collada-loading-for-directx/) but i have to comment out the skinned meshes section at the end of MeshManager.h because it wouldn't start otherwise (read access violation). Is there any tutorial or other sample source for loading collada files? That was the only "easy to understand" one I found on the net.
  9. Hi, I'm searching for a tutorial for animate .obj files. An example project for animating .x files comes with the dx sdk, but since .x isn't the best format (and i read that it isn't supported any more in d3d10/11) I would like to do that with .obj files. I know how to create an animated mesh in blender or zbrush, but how can i tell my dx program to animate the object if I move it from a to b? Thanks, Ritti
  10. Ritti

    Draw Multiple Objects

    Hi, thank you for your reply. I didn't think about using meshes since meshes are explained in the next chapters I'll do it as you explained since it sounds more familiar than all other guides I've found on the net ^^ Thanks, best regards, Ritti
  11. Hi, 'm new to DirectX and following the DirectX SDK Tutorials. For now I am able to draw cubes, pyramids and other shapes. I can turn a cube around an axis and let another cube bounce around. But how can i draw two indipendent shapes and move them differently (i.e. a cube and a pyramid)? I assume I need two Vertex Buffers and two Index Buffers but I wasn't able to write an executable code. I've attached the Tutorials code, maybe somebody can point me to the right direction, because I wasn't able to find anything useful in the net. Thanks, Ritti [attachment=5261:Tutorial05.txt]
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!