CModTool 1.0.1 for OS X
CModTool 1.0.1 for OS X
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.
* 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.
Last edited by dirkpitt on 18.06.2005, 13:33, edited 1 time in total.
-
- Posts: 408
- Joined: 27.03.2002
- With us: 22 years 7 months
- Location: Leiden, The Netherlands
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
Re: CModTool 1.0 for OS X
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
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
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
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.
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
Re: CModTool 1.0 for OS X
dirkpitt wrote:...Sounds like a plan. I'll try to find some time to add a log window during the weekend...
...
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
Re: CModTool 1.0 for OS X
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
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
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
Re: CModTool 1.0 for OS X
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
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
A new version of CModTool is available:
* Download CModTool 1.0.1
This version adds a log window (Window > Messages).
* Download CModTool 1.0.1
This version adds a log window (Window > Messages).
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.
* 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.
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:
Note that if i change the mapping to some other value (any other), the mesh goes through just fine.
- rthorvald
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
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?
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).
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"