Loading X file with morphs

Started by
9 comments, last by GameDev.net 18 years, 7 months ago
i am trying to load my X file character that contains morphes to his head but it is not loaded , is there a special technique to load it i am using C# . if any one knows anything about this problem plz help me and if u know any sites or codes that would help please load it to this thread :(:(
Advertisement
I'm not positive about morph targets specifically, but the x format in general doesn't contain a lot of extras. For stuff like that you usually need to write your own format and an exporter.

Matt Hughson
__________________________________[ Website ] [ Résumé ] [ [email=contact[at]matthughson[dot]com]Contact[/email] ][ Have I been Helpful? Hook me up! ]
I haven't seen any code that loads the X file with morphs.

I know that for skinned animation, you use the ...LoadHierarchy... set of functions. However, that's documented as "loading the first hierarchy from a .x file". If the morph targets are further hierarchies in the file, you probably have to use the raw X file parser interfaces, and parse out the templates yourself.
enum Bool { True, False, FileNotFound };
i know that i should write the code for loading the morph by my self because directx doesnot support meshes so i need any help on how to implement this thanx for u all reply if u can help with anything
sorry direct x doesn't support morphs
there is no common or well supported x file template for morphs. The morphs often just show up as extra meshes if they were visible and it would be up to you to do as you please with them. If there is any additional morph specific information that you needed you would have to modify the exporter to write out that extra information into your own custom template.
so no body used this technique before??? :(:(
Quote:Original post by jad_salloum
so no body used this technique before??? :(:(

I added morph target support by having an .x file per morph target (just as I do for skeletal animations) and than writing the morph target system to utilize that. It's actually quite simple even when mixing with skeletal animation.
can u paste some code plz (saruman)
Sorry it was for a commercial engine so that is not possible. Although all you have to do is load your target mesh and morph in a shader using interpolation, I am guessing there quite a few papers out there on using morph targets.

This topic is closed to new replies.

Advertisement