PDA

View Full Version : Blender export to M15 file format



Michael Hartlef
23-02-2007, 11:16
Petr, I was thinking about some kind of preview/viewer program for the blender export script. A few minutes ago I found the AT-AT model with a viewer script on your forum. This seems to be a perfect framework for what I want to do. Now that we have thinbundle, I can try to get this working. I just have to find out, how to start an external app from the blender API.

Again, thanks for the script.

Btw. does someone know a little conversion utility (run form the command line) for images? It should be free to use of course. Then I could copy the textures on the fly to and convert them while I'm at it.

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

command line image converter would be great solution.
I have found this: http://www.imagemagick.org/script/index.php, maybe it would be ok ?

Regarding program shelling, I could create PB compiled version of the model viewer script to keep the EXE size minimal possible ( I think I can handle it in 80kB exe ) and with command line based file input. Would it be ok ?

Bye,
Petr

Michael Hartlef
23-02-2007, 13:10
Sure, that would be nice. As command line parameters the path to the mesh and the texturefolder is needed.

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

this is first version, syntax is:

thinEdge_Viewer.exe modelName [ -vtx numOfVertices [ -dst distanceFactor [ -tex textureDirectory ] ] ]

So for example:
thinEdge_Viewer.exe Models\ATAT_Static.m15

or

thinEdge_Viewer.exe Models\ATAT_Static.m15 -vtx 13000

or

thinEdge_Viewer.exe Models\ATAT_Static.m15 -dst 10

or :)

thinEdge_Viewer.exe Models\ATAT_Static.m15 -tex MyNewDirectory

Both full paths and relative to exe should work.
Parameter -vtx is there just for optimization, default value is 50000 which should be enough for most models.

Hope you will like it, just 60 kB...


Bye,
Petr

ErosOlmi
23-02-2007, 13:37
We have to stop to tell "WOW". We can have some problems with Microsoft.

I've linked .M15 extesion files with thinEdge_Viewer.exe in order to be able to double click on .M15 files from the shell but I get error. See image.
Usually shell pass a double quoted file name in command line. This should be the problem. thinEdge_Viewer.exe think it is a relative path.

Ciao
Eros

ErosOlmi
23-02-2007, 13:52
Fantastic utility Petr.

Michael Hartlef
23-02-2007, 13:59
We have to stop to tell "WOW". We can have some problems with Microsoft.

I've linked .M15 extesion files with thinEdge_Viewer.exe in order to be able to double click on .M15 files from the shell but I get error. See image.
Usually shell pass a double quoted file name in command line. This should be the problem. thinEdge_Viewer.exe think it is a relative path.

Ciao
Eros



Ok, no WOW from my side then ;) Fast job, I will test it when I implement the call form the export script. I think it should allways use the full paths, as that is what it will get. Only with the texture path, if it isn't set, then use the usual "/Texture" path.

Petr Schreiber
23-02-2007, 16:10
Thanks for nice words,

I am sorry for this bugs.
Please find new version which should be ok, I also added PageUp, PageDown for zooming.


Hope it will be ok,
Petr

ErosOlmi
23-02-2007, 16:33
Perfect.
It is a pleasure to double click on a .M15 file and get on video on the fly.

Now :D
SHIF modifier to accellerate up,down,left,right
x,y,z little box axes display
mouse usage
source light moving

:D:D:D:D
Just joking.
Thanks a lot for this present.

Petr Schreiber
23-02-2007, 16:43
Hi Eros,

just logged in and see this ;D
I made a little modifications, the model is always centered now - center point is calculated during loading.
Also normal movements are faster, but in any case you can use SHIFT :)

The other stuff ... will come, but not sure if today :)


Thanks,
Petr

Aha, now I see the centering is not always ok, will patch it soon :D
[i]Later: - ok patched version is attached to this post!

Michael Hartlef
23-02-2007, 19:48
I'm back home and could sneek some time from the family ;) Works like a charm. Now I'm off to start/finish texturing and also make the next version of the export script.

kryton9
23-02-2007, 20:18
Nice to have quick access to m15 models now. I read what Eros posted and linked to thinEdge instead of the new program, you can tell I just woke up, anyways linked to the new program and it is really nice to quick view like that, thanks.

With Mike's easy export from Blender to M15, this viewer just adds to it.

Michael Hartlef
23-02-2007, 23:14
Not sure if I get any texturing done, but here is a lookout to the next version of the export script. Changes so far

1 - Message when export is done
2 - You can scale/rotate all axxis
3 - You can start the viewer program right from the exporter

I attached some screenies, just for a tease ;)

Petr Schreiber
23-02-2007, 23:30
Hi,

I can see you found the way to shell the viewer,
other features sound good too !


Bye,
Petr

kryton9
24-02-2007, 01:32
Mike, wow lots of additions to an already awesome script!! Thanks for the efforts and work. Makes things come together so easilly now!!

ErosOlmi
24-02-2007, 15:16
Hi all,

I thought this post was too much important to leave inside other posts so I decided to create a specific forum dedicated to M15 file format and all possible integrations.

Hope you agree
Ciao
Eros