PDA

View Full Version : M15 file format description?



Michael Hartlef
12-02-2007, 11:23
Hi Petr,

is it possible to get a format description of your M15 file format?

Michael

Petr Schreiber
12-02-2007, 11:58
Hi Mike,

sure it is possible.

You must wait for day when is full moon, drink 3 cups of tea from frogs and place green floppy disk in middle of nearest forest.
After year and one day the floppy will be filled with required data and you can pick it up from the forest ;D

Or ... maybe want easier solution ?
Try http://psch.thinbasic.com/thinEdge.html. On this page there is some scary info, but in the lowest part there is link to M15 specification. Just text file, I did not have time to make it nice yet.

But don't worry, whole my website is currently in process of "remake", so get ready for new layout and remixed tutorials + new articles.

Do you have some special wishes for the format and your use of it ?


Bye,
Petr

Michael Hartlef
12-02-2007, 16:28
Ouch, maybe my wife can help me then. She's a witch, so she put a spell on me and I won't suffer from any negative consequences ;D

Seriously I thought about trying to code an export script for blender. I will look into your link you provided. Thank you and keep up the great job you do.

Best wishes
Michael

Petr Schreiber
12-02-2007, 17:36
Hi,

good the forest solution is good for you :D

Blender import/export - wow, that would be something! I bet kryton9 would be very happy.

I am developing separate OBJ2M15 import proggie, usable for all modelers able to throw out OBJ. But direct support from the Blender would be nice, I would be very happy if you could spend some time on it.
So please ask about M15 when something is unclear. It is very simple format, no scary binary encryption ( yet :) ), just almost CSV file.


Bye and thanks,
Petr

kryton9
12-02-2007, 21:25
I am heading to the forest to help Mike with the spells, yes an export from blender would be awesome!!!
Especially with rigging and animation info, not sure if possible, but I am looking for magic frogs and other ingredients to make it happen :)

Petr Schreiber
12-02-2007, 21:35
Hi kryton9,

animation and rigging is not native part of M15

You can use layers from thinEdge model to specify TBGL bone, but this is better for mechanisms, not characters for example ( although I am prepairing something with characters done this way ;) ).

Regarding animation - problem is to decide, what is better...
Define bones in Blender and export them with animation keyframes ( of bones ),
or export whole geometry keyframes?

First method would result in smaller datafiles, but lot of calculations in real time execution of script;
the second in probably extremely big datafiles but interpolation between frames of animation is easy task even for 486 :)

I am afraid I must go to the forest with you, hope to get some ideas in its fresh air :)


Bye,
Petr

Michael Hartlef
12-02-2007, 22:04
ROFL, my wife had a great time reading your comments guys. Yes, I will try to get an exporter done. I was working on a Blitz3D exporter before but lost the code on it during an uninstall. I will go an study the M15 fileformat now.

kryton9
12-02-2007, 22:29
:) I think it would be great if you guys can work out the details for bringing rigging and animation from Blender into TBGL. Since the M15 format is open in that aspect now, maybe together you guys can make the right format adjustments or plans. Good luck, sounds like a daunting task to me, but will be a very powerful addition!!!

I have a black cat on loan from my sister, if that helps with the magic :)

ErosOlmi
12-02-2007, 22:43
A Long Time Ago in a Forest Far, Far Away ...

hoops, sorry ;D

Well, not so long time ago Petr already prepared a ...
forest script example. Here it is.

Have fun :D

Petr Schreiber
12-02-2007, 23:36
Eros, thanks for recovering the example ;)
I can see it needs some facelift, maybe some bloodthirsty vampire squirells ???

kryton - take the cat for sure ! ;D

Tuning M15 would be nice... lot of brain pain for me now. I am scratching one paper after another.
I think I will go to visit library/inet, read about some really nice animation software and see what is needed.
Any input is more than welcome !


Bye,
Petr

P.S. I have played with character animation today, on my PC I am able to get 25 characters with individual animation in realtime now. 81 if they have the same, but then it looks baaad :P
Please see the monsters on picture, they were quick modeled in thinEdge, so they look kind of weird :)

Michael Hartlef
12-02-2007, 23:45
Yip, looks weird. :) I looked at the fileformat and I think it should be possible to come up with something blender related. I'll try to tackle it soon.
Still, your OBJ2M15 tool would also be very very handy for other 3D tools.

Petr Schreiber
12-02-2007, 23:55
Hi,

looking forward to it :)
Python is needed for Blender plugins ?


Bye,
Petr

kryton9
13-02-2007, 04:19
Wow I loved that picture of the monsters! The performance sounds really good Petr. Anyway to see a movie of the monsters moving, I liked the look, very eerie and cool!!

Mike, Petr had also mentioned maybe supporting Collada, I hope I remember the name correctly. It is the format picked by the opengl group for handling objects, animation and related for opengl. Maybe that would be the best and most flexible system. There is also FBX another similar format widely adapted that supports lots of the cool 3d stuff.

I am very excited by the possibilities and future!!

Michael Hartlef
13-02-2007, 10:32
Yes, possibilities are always great. I'm sure Collada and FBX exporters will appear from the blender community one day.

Petr Schreiber
13-02-2007, 12:23
Hi Mike,

I think COLLADA exports is already present in Blender.
It is not complicated format, it is kind of XML. So lot of various info can be stored, but the sfile ize is often quite big.


Bye,
Petr

Michael Hartlef
13-02-2007, 13:02
Hi,

looking forward to it :)
Python is needed for Blender plugins ?


Bye,
Petr


I overlooked this question. Yes, Python is the script language of Blender. It does a great job in that.

Michael Hartlef
15-02-2007, 12:58
Hi Petr,

looking at the models that you distribute with thinEdge (F15 for an example),
I can't seem to get the logic of the PolygonStopFlag.
I would have expect it to be set every 3rd or 4th vertex. But it looks not like this to me.
Can you please enlight me?

Michael

kryton9
15-02-2007, 18:13
Very excited about all of this new format conversion talk. My c++ OpenGL video tutorial bundle came from 3dBuzz. Hopefully in a few weeks I will be able to better understand all of this and actually add to some of the work and fun. So the conversation here will be very valuable for future use, thanks guys for this thread and discussion!

Petr Schreiber
15-02-2007, 19:54
:)

hi Mike,

you didn't pick up the floppy at full moon, did you ? ;D

It is pretty basic ! thinEdge polygon has theoretically no limit on number of vertices.
Although it is quite unusual, it is good for fast modeling, you can always divide it to triangles later.

Want 3 ? Want 4 ? Want 8 ? No problem !
The poly stop flag is 0 for all vertices except the last one in polygon.

I usually never go over 4.

If you want to have 7 vertices polygon, the first 6 vertices has polyStop = 0 and the 7th has polyStop = 1.

So to sumarize:

in one model not all polygons has to be just 3 vertices or 4 vertices long - it can vary from polygon to polygon
minimal number of vertices is 3
last vertex of poly has polyStopFlag set to 1


Please ask if it is not clear yet !,
Petr

Michael Hartlef
15-02-2007, 22:42
Thanks Petr, totally clear. I just didn't know that it was possible to have more than 4 vertices for a polygon.

Michael Hartlef
16-02-2007, 08:56
Ok, last night I finally understood Blender's Python API enough to extract the vertices when you loop through the faces. Now I have to figure out how to get the texture-uv info and the color values in the same process.
Press your thumbs, maybe I have the exporter done by sunday. At least that is my goal.

Petr Schreiber
16-02-2007, 11:31
Hi Mike,

this is great !
UV in Blender and others should be the same as TexX, TexY in thinEdge.

Thanks,
Petr

kryton9
16-02-2007, 20:20
Go Mike Go, wow never expected something soon and as possible as that. Even if it takes a month I would have been very surprised. Good luck, I am very impressed with your progress on this!!