Mesh Editor

New releases and general discussions.

Post » Sun May 24, 2009 6:59 pm

i really appreciate the new feature, and i was wondering if it was possible to edit the meshes in any other editor, since i've never heard of the .mesh format before.
if that's not possible, i'd be interested in the rationale behind inventing another 'proprietary' format versus rolling with any of the existing, widespread & readable ones...
B
2
S
2
G
4
Posts: 171
Reputation: 1,792

Post » Sun May 24, 2009 7:53 pm

because all it is is coordinates for distort maps
it isn't an actual 3d mesh that you can rotate

it also is much more trouble writing a plugin to interpret an existing format than to just make one up
at least in this case
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sun May 24, 2009 7:59 pm

It's not really a format, it's more a piece of functionality which has no reason or compelling way to be compatible with any other application.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sun May 24, 2009 9:35 pm

I just made up the .mesh format purely for the purposes of saving from the mesh editor and importing in to games. It's very simple, just a list of points essentially. I can't see how it would be useful to use another format, I'm sure nearly every other editor in the world has much more advanced features which can't be reproduced in a simple sprite mesh. Also, it's not a proprietary format, the Sprite object and its .mesh reading/writing code is all open source and I'd be happy to detail the format to anyone who wants to write format converters or anything like that.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Sun May 24, 2009 10:51 pm

well, the beauty (& potential) of a feature is in the eye of its users :)
you never know what people might come up with, so i'm a strong advocate of offering as many entry points as possible.

ashley, it would be very nice if you could spare the time to drop me a note (or wikipage) describing the format; i'd really like to try this, but i'm too much of a scriptkiddie to seriously unravel constructs source code.
B
2
S
2
G
4
Posts: 171
Reputation: 1,792

Post » Mon May 25, 2009 12:27 am

OK, the format of saved meshes in the Sprite object is:


A 4-byte ASCII string saying 'HSEM' ('MESH' backwards because I'm lazy about endian) to identify the MESH file
int32: version integer (always 1 right now, reserved for future use)
int32: horizontal number of points
int32: vertical number of points

Then, repeated for each point (number of times = horizontal points x vertical points), in column order:
float32: x offset (as a fraction of the original image width)
float32: y offset (as a fraction of the original image height)
float32: z elevation
float32: u offset
float32: v offset
float32 x 4: a, r, g, b for point opacity and filter, from 0.0 to 1.0.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Mon May 25, 2009 11:29 am

thanks!
B
2
S
2
G
4
Posts: 171
Reputation: 1,792


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest