Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TedMar, AndrewAMD), 1,344 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: various MDL related MDL7 SDK questions [Re: HeelX] #393354
02/02/12 17:39
02/02/12 17:39
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Wladimir said that the groups function in the MDL7 SDK was for a future extension to make models similar to WMB files, with many meshes. It's currently not supported by the engine. I should know because I'm the guy who would have to implement it grin.

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
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: jcl
It's currently not supported by the engine. I should know because I'm the guy who would have to implement it grin.


Haha... funny smile 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: HeelX] #393359
02/02/12 17:55
02/02/12 17:55
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I think that there's a misunderstanding, MED offers the functionality of Groups, it even has a Group Mode along with Vertex and Triangle Mode. Those groups are in fact distinct meshes (/ mesh groups/ subsets) that can be f.i. disabled in the engine via vmask.

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?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
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
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Quote:
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:

Code:
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: HeelX] #393426
02/03/12 11:29
02/03/12 11:29
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Superku is correct: The word "group" is used for many different things in Gamestudio, this might be confusing. F.i. collision groups, or subset groups. 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.

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
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: jcl
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
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: jcl
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 wink

[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);

wink

Last edited by HeelX; 02/03/12 11:42.
Re: various MDL related MDL7 SDK questions [Re: HeelX] #393723
02/06/12 16:45
02/06/12 16:45
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The function is in mdlr.h:

int TriangleSkin(int &skin, int skinset=0);
// to be called after Triangle(), read the skin index per triangle

The skin index is the number of the submesh that you set up in MED in Group mode. skinset is 0 or 1 dependent on whether it's the first or second UV set.

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
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

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
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

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":

Quote:
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"...???

Page 2 of 3 1 2 3

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1