Archived

This topic is now archived and is closed to further replies.

Loading Skin Meshes- nothing seen

This topic is 5515 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

Ok, unfortunately the search is down so I can''t sift through the hundreds of past posts about this subject, as I''m sure it''s a question asked frequently. I''ve seen a few recent ones but none of them asked the question good enough. I''m loading a mesh, whether it''s skinned or not, and I simply for the life of me get it displayed on the screen. Sure, I might just look all around for it, maybe I''m missing it, but I''ve looked everywhere (free camera move around with the arrows). That''s not the weird part either. If I render the mesh before I render my terrain, my computer restarts. I''ve had this problem before, where I tried a call to DrawIndexedPrimitive and told it too many vertices, and my computer rebooted instantly. But I''m so baffled at why I can''t get this working. Unfortunately there aren''t many tutorials out there either, and the way the SDK loads meshes is a little different than how I do it, but it''s the same concept and it looks the same in terms of the sequence of the calls. I also heavily studied the article here at GameDev, [URL]http://www.gamedev.net/reference/programming/features/skinmesh/[/URL]. I replaced the mesh that it loads with my mesh and it loaded fine in that program. I wrote my code myself, but I looked at that source code a *lot*. In fact, once I started having problems, almost everything is the same as that tutorial except I don''t load animations (it doesn''t even have any, my mesh). I just don''t understand why I''m getting weird problems. I set my own vertex and pixel shaders, render the terrain, then set the vertex shaders to mesh->GetFVF and pixel to NULL. Nothing renders except the terrain. If I do it the opposite way, my computer restarts, as I said before. Where can I expect my mesh to be in the world? I''m not exactly sure how to ask the question, because I don''t have a precise question in the first place. I just want to know if there''s anything I should know about loading the FrameTransformationMatrix to position the mesh, but I have it exactly as it is in the demo program, so why wouldn''t it work. The DX Debug says nothing. Or is it possibly not rendering at all, for some reason? Does any body have any idea what''s going on?

Share this post


Link to post
Share on other sites
If you are using the ID3DXSkinMesh object, you MUST first call GenerateSkinnedMesh to obtain an ID3DXMesh object that contains the deformed mesh object. To apply changes to the frame hierarchy and to generate the mesh to render, use the UpdateSkinnedMesh function. From there, render the ID3DXMesh object you obtained from the Generate function call.




Jim Adams
home.att.net/~rpgbook
Author, Programming Role-Playing Games with DirectX
and Focus On: Advanced Animation with DirectX

Share this post


Link to post
Share on other sites
Thank you much, Jim (or Mr. Adams? hmm). I''ll try doing that instead of the ConvertToBlendedMesh function that the tutorial I mentioned in my post does. (http://www.gamedev.net/reference/programming/features/skinmesh/). But I''m still wondering why does that program work with the ConvertBlendedMesh function, or am I using the blended mesh a wrong way or something?

Share this post


Link to post
Share on other sites
No, blended meshes are slightly different. In my previous message, I assumed you used the software processed skinned mesh object. Personally, I use like using vertex shaders for skinned meshes (matrix palette) - they are much easier to work with.

Share this post


Link to post
Share on other sites