Page 1 of 2

CModTool 1.0.1 for OS X

Posted: 29.05.2005, 05:28
by dirkpitt
I've made an OS X gui wrapper around the 3dstocmod and cmodfix tools:

* Download CModTool 1.0.1

CModTool is a utility for converting 3DS models to Celestia's cmod format, or for optimizing cmod models.

It includes an icon by ElChristou who along with Cham provided valuable feedback.

It should run on OS X 10.2 and later. License is GPL, and source code is available via anonymous SVN access,
https://svn.osxdev.org/project/CModTools/trunk/. Note that it requires the Celestia source code as well to compile.

Features:
- Batch processing of multiple files (no Applescript or Automator yet)
- Drag and drop files onto the window
- Triangle strip optimization
- Simulation mode
- Files are not overwritten if an error occurs

Notes:
- Speed, for me, is roughly similar to using the command line versions of 3dstocmod and cmodfix. That is to say,
for about a 2MB 3ds it takes about 20 seconds on a 1.x GHz G4. The tools are tuned for G5's so expect better
performance on say, recent iMacs.
- In rare cases, certain meshes fail to produce satisfactory results. While fiddling with the various options often
fixes this, if it does not please let me know so I can determine if this is due to the model itself, or issues with the
command line tools, or the GUI.

Posted: 29.05.2005, 09:35
by julesstoop
Thanks!
Another tool for OS X-users.

Posted: 31.05.2005, 19:54
by ElChristou
Hello,

I still have some problem with the "generate tangents"... (bad stuff)
Someone met something like this?

Posted: 31.05.2005, 22:00
by jestr
Yes,I get the same complaint sometimes with the Windows version.It complains it needs texture coordinates to generate tangents,even though the model has them.Odd,sometimes it works sometimes not,Jestr

Re: CModTool 1.0 for OS X

Posted: 12.06.2005, 03:59
by rthorvald
dirkpitt wrote:I've made an OS X gui wrapper around the 3dstocmod and cmodfix tools


Thank you for the app!

It works fine, but i have one question:
It seems transparency does not carry over well from 3ds to cmod. The values for a material??s transparency are changed (becomes less transparent, and in some cases, completely opaque). Is this a limitation of the format, or something to do with my 3ds files, or the settings?

It happens on all the files i have tested. The models are rather complex, the biggest one almost 20MB in size.

-rthorvald

Re: CModTool 1.0 for OS X

Posted: 12.06.2005, 08:48
by dirkpitt
rthorvald wrote:It seems transparency does not carry over well from 3ds to cmod. The values for a material??s transparency are changed (becomes less transparent, and in some cases, completely opaque). Is this a limitation of the format, or something to do with my 3ds files, or the settings?


A quick look at the relevant source code suggests that the opacity is explicitly copied from the 3ds model.
However, as I didn't author the underlying conversion code I'm not 100% sure what happens in the case of
mesh groups and other special cases.

Re: CModTool 1.0 for OS X

Posted: 14.06.2005, 15:50
by rthorvald
dirkpitt wrote:A quick look at the relevant source code suggests that the opacity is explicitly copied from the 3ds model.


Hm... It might have been the models, or some wrong settings during export to 3ds. I have since managed to get it correct, exporting later iterations of the models. Thanks, though.

Another question: i have some files that won??t convert. I have localized the meshes in them that causes the problem, but can??t find out *why* they are problematic; there are no signs... And they do work correct as 3ds, both in Celestia and in several 3D apps. Is there any way to get some diagnostics information out of the CMOD tool? "Bad stuff happened" isn??t too helpful ;-)

- rthorvald

Re: CModTool 1.0 for OS X

Posted: 14.06.2005, 20:13
by dirkpitt
rthorvald wrote:Another question: i have some files that won??t convert. I have localized the meshes in them that causes the problem, but can??t find out *why* they are problematic; there are no signs... And they do work correct as 3ds, both in Celestia and in several 3D apps. Is there any way to get some diagnostics information out of the CMOD tool? "Bad stuff happened" isn??t too helpful ;-)


Sounds like a plan. I'll try to find some time to add a log window during the weekend.

Re: CModTool 1.0 for OS X

Posted: 14.06.2005, 20:18
by ElChristou
dirkpitt wrote:...Sounds like a plan. I'll try to find some time to add a log window during the weekend...


... :?

Re: CModTool 1.0 for OS X

Posted: 14.06.2005, 20:25
by ElChristou
rthorvald wrote:...but can??t find out *why* they are problematic; there are no signs...


Somtime some very small problems (generally visibles by zooming at max) of wrong placements before boolean actions, mix up points without merging etc... can do all kind of "Bad stuff", even crash the file (after various works on small errors...). If you have a mesh as example, I can perhaps have a look on what's wrong...

Re: CModTool 1.0 for OS X

Posted: 14.06.2005, 20:39
by rthorvald
ElChristou wrote:If you have a mesh as example, I can perhaps have a look on what's wrong...


Thank you, but it would be better to learn how to find out... Else, i??m just as stuck next time...

So, how to isolate something that small in a mesh containing say 50.000 points?

-rthorvald

Re: CModTool 1.0 for OS X

Posted: 14.06.2005, 20:49
by ElChristou
rthorvald wrote:...So, how to isolate something that small in a mesh containing say 50.000 points?...


At this level, you have a big problem... (it's on your Titan scenery?)
You can try by cuting the problem in two, test both pieces, then recut the one with problem and so on... If there is lots of meshes, you can make groups and test... It's long but unfortunatly I don't have other solution without looking at the mesh...

Re: CModTool 1.0 for OS X

Posted: 15.06.2005, 01:31
by rthorvald
ElChristou wrote:You can try by cuting the problem in two, test both pieces, then recut the one with problem and so on... If there is lots of meshes, you can make groups and test...

Yes, this is what i did to narrow it down to a single mesh. Unfortunately, that one is a monster... I hoped anyone knew of a sort of diagnostics tool - well, have to slice it up then, i guess.

-rthorvald

Posted: 18.06.2005, 13:32
by dirkpitt
A new version of CModTool is available:

* Download CModTool 1.0.1

This version adds a log window (Window > Messages).

Posted: 08.10.2006, 08:06
by dirkpitt
I've finally updated CModTool with the latest versions of 3dstocmod and cmodfix:

* Download CModTool 1.0.3 (build 4)

Note: If you have downloaded an earlier build of 1.0.3 (check the About CModTool box... the new build downloaded from the above link should say "1.3.0 (4)"), you are strongly encouraged to upgrade to this new build.

Apart from being Universal and incorporating latest fixes from Chris for specular surfaces, this version should work with a lot more models than before. This is because previous versions would simply quit if they couldn't generate either normals or tangents for certain parts of a model; this build will not abort in such cases and continue to generate a valid model.

Posted: 18.10.2006, 10:08
by rthorvald
Using the latest version [1.0.3 (4)], i get a weird error:

I get the dreaded "Bad stuff happened" error message on a mesh only by changing the UV mapping.

This is the outputted message:

Code: Select all

2006-10-18 12:06:09 +0200 Converting .3ds to .cmod...
Replacing /Users/rthorvald/Desktop/test.3ds
Group: #0, indices=3141
cmodfix(455) malloc: ***  Deallocation of a pointer not malloced: 0x205000; This could be a double free(), or free() called with the middle of an allocated block; Try setting enviroAn error occured while processing "/Users/rthorvald/Desktop/test.3ds". The file may be an unsupported format or corrupted.



Note that if i change the mapping to some other value (any other), the mesh goes through just fine.

- rthorvald

Posted: 18.10.2006, 13:30
by dirkpitt
rthorvald wrote:Using the latest version [1.0.3 (4)], i get a weird error:

I get the dreaded "Bad stuff happened" error message on a mesh only by changing the UV mapping.

This is the outputted message:

Code: Select all

2006-10-18 12:06:09 +0200 Converting .3ds to .cmod...
Replacing /Users/rthorvald/Desktop/test.3ds
Group: #0, indices=3141
cmodfix(455) malloc: ***  Deallocation of a pointer not malloced: 0x205000; This could be a double free(), or free() called with the middle of an allocated block; Try setting enviroAn error occured while processing "/Users/rthorvald/Desktop/test.3ds". The file may be an unsupported format or corrupted.



Note that if i change the mapping to some other value (any other), the mesh goes through just fine.

- rthorvald


I'd like to reproduce this but this isn't enough information. Could you mail me the 3ds and let me know what settings you used?

Posted: 18.10.2006, 15:41
by rthorvald
dirkpitt wrote:Could you mail me the 3ds and let me know what settings you used?


See PM.

- rthorvald

Posted: 18.10.2006, 17:15
by Cham
Hmmm, I didn't encountered any problem with that version, yet. I'm doing *LOTS* of modeling these days, and I'm converting to CMOD about 20 times a day (mostly asteroids and test models). Everything works fine until now. I'm curious what may cause your problem, Runar. What options are you using, with the CMODTool ? I'm using all of them, except the last one (optimize triangle lists to strip, which gives weird results).

Posted: 18.10.2006, 17:37
by rthorvald
Cham wrote:What options are you using, with the CMODTool ? I'm using all of them, except the last one (optimize triangle lists to strip, which gives weird results).


I used the first two and the last two.
... What weird behaviour do you get with the optimize triangle lists option?

- rthorvald