PDA

View Full Version : TBGL OBJ to M15 converter [ UPDATED to v 1.5 ]



Petr Schreiber
31-12-2007, 21:20
Hi guys,

year 2007 is approaching to its end here very fast here and thinBASIC/TBGL programmer has no editor independent OBJ to M15 conversion tool.

I would not sleep well tonight :)

Blender users have no trouble because of Mike Hartlefs fantastic exporter, thinEdge users can do this too, but what others ?

For those desperate souls here comes first release of official OBJ2M15 tool.

It has been tested to convert properly OBJ files from all corners of internet, as well as ZBrush tricky OBJs ( use both $CRLF and $LF to determine line break ) or for example Wings3D export.

Program is designed as kind of "wizard". You just specify which files ( step 1 ), adjust texturing options ( step 2 ) and convert them all at once ( step 3 ).

Hope it will serve well.


Happy New Year,
Petr

Update history
- v 1.1 improves stability, MTL handling and importing ZBrush OBJs
- v 1.2 corrects serious bug in case of models without textures
- v 1.4 adds support for new M15 file format revision, allowing import of normals
- v 1.5 adds support for rare OBJ files with negative coordinates (produced for example by CryEngine editor)

kryton9
31-12-2007, 23:51
Wow thanks Petr!

Going to play with it now to test it out. Will write more in a bit...

...Hey that's really nice Petr, thanks.

I should mention that it comes with a test obj file, so for those who are wondering about where to get one or how to make one, don't worry. You can see how the new tool works from the download.

Petr Schreiber
01-01-2008, 11:56
Thanks Kent,

main advantage of this tool is that you can convert multiple files in one run, other sides of the program still have some reserves, but that will be improved in future versions.


Bye,
Petr

Michael Hartlef
01-01-2008, 16:18
Thanks man, that is great!

Petr Schreiber
02-01-2008, 20:35
Hi,

just updated program to version 1.1.

It improves stability ( more checking ), MTL files handling ( gets also diffuse color ) and generally importing MTL files generated by ZBrush 3.1 ( love that program, 27 days of trial left :'( ).
Also more informational messages added.

With this update OBJ2M15 becomes more powerful and reliable than thinEdge importer, so highly recommended for all.

Let me know if you will find any problem, or need some feature :)


Bye,
Petr

Michael Hartlef
02-01-2008, 21:39
Yeah ZBrush is awesome, I got it when it was on version 1.23.

kryton9
03-01-2008, 02:17
Thanks for update Petr.

Guys, doesn't zbrush end up making very high poly meshes? Can you then cut down polys?

Michael Hartlef
03-01-2008, 07:18
I think you can, but you can also create lowpoly meshes.

Petr Schreiber
03-01-2008, 11:26
Hi,

lowest poly mesh I managed to create from ZBrush so far was about 1600 polys, not bad.
For the primitive objects I found some kind of detail slider, which allows to choose detail level.

But you can also import any OBJ file to ZBrush, edit it and export again.

How to create true low poly in completely in ZBrush ... Mike must teach us, I did not find way yet ( maybe idea for article - ZBrush for thinBASIC game development :-X ).


Bye,
Petr

Michael Hartlef
03-01-2008, 12:03
Well, to be true, I would rather use a different tool for real lowpoly meshes Like Hexagon, Silo, Blender, etc. . I have no experienced with ZBs block modeling approach, I'm only familiar with the zspheres.

Petr Schreiber
03-01-2008, 17:38
Ok Mike,

I use ZBrush trial first few days :)
Do Silo and Hexagon provide OBJ export ? If yes, could you create some basic shapes and try to use OBJ2M15 on them ?


Thanks,
Petr

ErosOlmi
03-01-2008, 17:57
Petr,

I've converted triceratops.obj to triceratops.m15
Than I've tried to open triceratops.M15 with thinedge_viewer.exe version 1.0.0.6 but it GPF.
Any idea?

Hey, obj2m15.exe has a very nice UI!

Ciao
Eros

Petr Schreiber
03-01-2008, 18:03
You scared me to death,

checking right now :o


Thanks,
Petr

Petr Schreiber
03-01-2008, 18:06
Hi Eros,

latest version is 1.0.0.7 SP1, you can get it here:
http://community.thinbasic.com/index.php?topic=593.msg3116#msg3116

Please let me know whether it works ok on your PC, here no problems.


Thanks,
Petr

ErosOlmi
03-01-2008, 18:09
No, again GPF, sorry.

Petr Schreiber
03-01-2008, 18:11
Thanks Eros :-\,

on my PC still no troubles, is the converted file 791 435 bytes long ?


Petr

ErosOlmi
03-01-2008, 18:11
Here the data

Petr Schreiber
03-01-2008, 18:16
Thanks,

this is correct file, does viewer GPF with others too ?

I will go through the source code and try to find possible problem.
Does at least first frame appear ?


Thanks,
Petr

ErosOlmi
03-01-2008, 18:21
It starts, black screen, GPF. See image.
Ciao
Eros

ErosOlmi
03-01-2008, 18:23
Other .M15 files seem ok.

Petr Schreiber
03-01-2008, 18:40
Eros,

could you try this debug version ?
It generates log file so I could better track problem down.

Thanks and sorry,
Petr

REMOVED

Michael Clease
03-01-2008, 20:04
Same for me I also get a GPF

here is the log file details


ProgramStarted
About to load triceratops.m15 50000 5Textures\
About to init buffers
About to load model
..File opened
..Ready to scan lines
..About to calc normals
..About to do display list

Petr Schreiber
03-01-2008, 20:23
Abraxas,

fantastic!
As I do not presume there is a bug in both your and Eros drivers ( display lists ), it must be in model drawing function.


Thanks a lot,
Petr

ErosOlmi
03-01-2008, 20:32
Sorry for delay Petr. I was driving home under the snow ;D
I get the same log as Abraxas:


ProgramStarted
About to load triceratops.m15 50000 5Textures\
About to init buffers
About to load model
..File opened
..Ready to scan lines
..About to calc normals
..About to do display list

Petr Schreiber
03-01-2008, 20:35
Hi,

Eros, no problem :)
Could you try this version - I think I found the problem.


Thanks,
Petr

ErosOlmi
03-01-2008, 20:38
Got it!
Now working fine but very slow. I imagine due to log writing.
Perfect!

Petr Schreiber
03-01-2008, 20:41
Abraxas, Eros!

Thanks a lot then, I will clean it up and put out new release.


Thanks,
Petr

Petr Schreiber
03-01-2008, 20:44
Very slow ;D,

should not be, try last pre-release please.


Thanks,
Petr

Michael Clease
03-01-2008, 20:52
Debug2 works and is slow as Eros said but debug3 doesnt work that crashes.

Petr Schreiber
03-01-2008, 20:54
Debug 3 crashes ?

Debug 2 used #DEBUG ERROR ON, that could cause slowness and also that it tolerated some more array out of bounds bug.
Thanks for all the help, will continue in search for error.


Petr

ErosOlmi
03-01-2008, 21:06
Confirm. Debug 2 GPF.

Petr Schreiber
03-01-2008, 22:18
Problem fixed

OBJ2M15 had a little issue ( yes, a bug :) ) in processing of models without any texture, please download version 1.2 (http://community.thinbasic.com/index.php?topic=1418.msg10052#msg10052).

Also thinEdge_Viewer ( included also in Mikes Blender exporter ) has been updated to release 1.0.0.8 (http://community.thinbasic.com/index.php?topic=593.msg3116#msg3116) - recommended service download!


Thanks to all who helped!,
Petr

Michael Clease
03-01-2008, 22:24
Thanks Petr

Its working fine now.

Petr Schreiber
03-01-2008, 22:34
Thanks Abraxas,

main problem was in OBJ2M15, viewer has been updated to share the important code with TBGL.


Bye,
Petr

kryton9
04-01-2008, 01:59
Thanks for the fix Petr.

Petr Schreiber
18-08-2011, 16:37
I updated the tool to v1.5 (please see the first post of this thread)

The most visible change is adding support for quite rare OBJs where indices are negative.
Such a OBJ files are produced by recently released CryEngine (http://www.crydev.net/dm_eds/download_detail.php?id=4) editor, for example.


Petr