2 registered members (TedMar, AndrewAMD),
1,344
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: various MDL related MDL7 SDK questions
[Re: jcl]
#393357
02/02/12 17:47
02/02/12 17:47
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
It's currently not supported by the engine. I should know because I'm the guy who would have to implement it . Haha... funny but it is a riddle to me why the model is properly rendered, though. And as far as I remember that feature existed since A7, because I know I used it to animate a character for an A7 game prototype.
Last edited by HeelX; 02/02/12 17:48.
|
|
|
Re: various MDL related MDL7 SDK questions
[Re: Superku]
#393361
02/02/12 18:05
02/02/12 18:05
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Then there's another thing called group in the MDL7 SDK, it allows something different like in WMB files, but has nothing to do with the current mesh group feature in MED (and the engine). Correct? I don't want to be nitpicking, but I believe that these are the same and that this submesh feature already works. The SDK reports the MED groups correctly and when I throw away all groups but group one, only the sphere is saved. This is what I get from the SDK, when I load the model; iterating over all groups:
group 0 numSkins = 3 numSkinpoints = 87 numTriangles = 120 numVertices = 62 numFrames = 0
group 1 numSkins = 0 numSkinpoints = 13 numTriangles = 12 numVertices = 8 numFrames = 0
group 2 numSkins = 0 numSkinpoints = 43 numTriangles = 48 numVertices = 26 numFrames = 0
Which reflects exactly the properties of the groups and their group numbers shown in MED (see the model I uploaded) - in this order: - sphere - cube - cylinder
|
|
|
Re: various MDL related MDL7 SDK questions
[Re: jcl]
#393427
02/03/12 11:33
02/03/12 11:33
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
2) Bones indexes start with the root bone, so there should be no forward references. I'm not sure if the SDK sorts the indexes, but I believe it doesn't. Ok, I got this, as expected, though: - given: two bones b1 and b2 and b1 is the parent of b2 - if you save them in order (first b1, then b2) and the index of b1 is lower than b2's (no forward referencing), the bones and the parent' reference is correctly saved - other than that (wrong order or wrong ordered indices), the bones are saved, too; but as root bones Conclusion: Sort your bones yourself before you push them into the SDK! The underlying graph-theoretical problem is the problem of Topological Sorting, which you have to solve. Best way to embed that is to do it right when you add a bone to your model (or when you remove it).
|
|
|
Re: various MDL related MDL7 SDK questions
[Re: jcl]
#393428
02/03/12 11:39
02/03/12 11:39
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
What you set up in MED with the Group function are mesh subsets. The mesh subset a triangle belongs to is read with the mdl7.TriangleSkin() function in the MDL7 SDK. Thanks for the explanation. Though, there is no TriangleSkin function in the whole SDK. At least not in mine which I got from the download page. ... I just use the instructions (and their order) from the LoadMDL7-example as template to start from. I also came up with the term "groups", because that is what the member functions indicated by their names, and, which are in fact used to read triangles and vertices and skinpoints - this might be an excuse for my nitpicking, because it leads to the assumptions I made all the way [EDIT] Like... virtual bool Head(long & bones_num, long & groups_num,long & mdllump_size, long & entlump_size, long & medlump_size); virtual bool Group(unsigned char & typ, long & groupdata_size, char * name = NULL); virtual bool Group(long& skins, long & stpts,long & tris, long & verts, long & frames);
Last edited by HeelX; 02/03/12 11:42.
|
|
|
Re: various MDL related MDL7 SDK questions
[Re: jcl]
#393727
02/06/12 17:35
02/06/12 17:35
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
I'm sorry, there is no "mdlr.h" file in the wmpmdlsdk7 archive which is available for download here: http://server.conitec.net/down/wmpmdlsdk7.zip --- I also opened all files in the inc\ folder and searched for "TriangleSkin", but there were no matches. What am I doing wrong?
|
|
|
Re: various MDL related MDL7 SDK questions
[Re: HeelX]
#394032
02/09/12 11:48
02/09/12 11:48
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Question 5) I figured out, that I can only properly save a MDL file with bones, when the bones are not only in topological order (for back referencing by indices), but also uniquely named. So, what I do is that if I have bones with the same name, I enumerate them by adding a '#' plus an ascending integer. As I am not interested in the way bones are named, I always generate bones with "" as name, which leads to names like "#0", "#1", ... "#42" ... and so on. Now, I read by accident in the manual for "ent_bonehandle": Entity scene and bone names must consist of at least 3 characters. Is this a secret boundary condition which I must be aware of or is this old and can be waived? Because I didn't read that anywhere in the SDK and I also was able to properly save a MDL with a bone named "#0"...???
|
|
|
|