Confirmation needed: bug with CmodTool??
-
Topic authorElChristou
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
Confirmation needed: bug with CmodTool??
Here is a problem found by Cham about the CMODtool:
When converting a model with the option "Optimize Triangle Lists to
Strips", the convertion is done but the result is a model with a really low frame rate within Celestia and a very strange wireframe (see picts):
Picture 1: the wireframe of a model in 3DS or in Cmod without "Optimize Triangle Lists to Strips" (good frame rate):
Picture 2 : the same model converted with "Optimize Triangle Lists to
Strips" (very bad frame rate):
The bad point is that a model converted without the option "Optimize Triangle Lists to Strips" is much bigger...
Now this convertion as been done on osX, so before all we need to know if the same problem occurs on Linux/Windows; someone can do the test?
When converting a model with the option "Optimize Triangle Lists to
Strips", the convertion is done but the result is a model with a really low frame rate within Celestia and a very strange wireframe (see picts):
Picture 1: the wireframe of a model in 3DS or in Cmod without "Optimize Triangle Lists to Strips" (good frame rate):
Picture 2 : the same model converted with "Optimize Triangle Lists to
Strips" (very bad frame rate):
The bad point is that a model converted without the option "Optimize Triangle Lists to Strips" is much bigger...
Now this convertion as been done on osX, so before all we need to know if the same problem occurs on Linux/Windows; someone can do the test?
Guys, this problem is very important. It appears on all models (any), but especially on big models with lots of pieces and details.
At first, I didn't noticed that bug, as we don't use the "wireframe" mode (ctrl-w) very often in Celestia. But then, I noticed that some big models became very slow in Celestia, if I used the CMOD version. The frame rate was MUCH lower than for the 3DS version, so there was clearly a problem. I had the idea to watch the model in "wireframe" mode, and discovered all that mess of "random" lines, on MANY big models (not just mine). I then used the CMODTool (OS X version from Dirkpitt) to make some new CMOD versions, trying the various options, and found that the "Optimize triangle lists to strip" was the culprit. Without that option, the CMOD version is working fine, like the 3DS version, but the CMOD file is then much biggger on the hard disk. So, any comments on this ?
Dirkpitt ?
At first, I didn't noticed that bug, as we don't use the "wireframe" mode (ctrl-w) very often in Celestia. But then, I noticed that some big models became very slow in Celestia, if I used the CMOD version. The frame rate was MUCH lower than for the 3DS version, so there was clearly a problem. I had the idea to watch the model in "wireframe" mode, and discovered all that mess of "random" lines, on MANY big models (not just mine). I then used the CMODTool (OS X version from Dirkpitt) to make some new CMOD versions, trying the various options, and found that the "Optimize triangle lists to strip" was the culprit. Without that option, the CMOD version is working fine, like the 3DS version, but the CMOD file is then much biggger on the hard disk. So, any comments on this ?
Dirkpitt ?
"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!"
dirkpitt wrote:or maybe a bad combination of option settings in CModTool.
I was using these options :
- Weld Vertices
- Generate Normals (usually 30% for spaceships and 60% for asteroids)
- Eliminate duplicate vertices
- Optimize triangle lists to strips.
I'm now using only the first, second and third of those options.
"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!"
hmm, I'm not seeing this on the PC version of cmodtool that I downloaded from Selden's page (http://www.lns.cornell.edu/~seb/celestia/) but I'm not sure that it actually uses the NvTriStrip library so results are inconclusive for now.
Dirkpitt,
I'm not using the other two options (Generate Tangents and Merge submeshes), because they are giving me some obscure message errors while trying to convert something. What do they do, anyway?
I'm not using the other two options (Generate Tangents and Merge submeshes), because they are giving me some obscure message errors while trying to convert something. What do they do, anyway?
"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!"
Generating tangents can fail if the 3ds model does not already have normals and texture coordinates specified (I suspect that's why it fails in your case). I'm not sure what merge submeshes actually does or why it can fail.
Update: After some painful hours of debugging on my 400Mhz iMac G3 (the "megahertz myth" is indeed a myth: this piece of junk is certainly more than 3 times slower than my 1.33Ghz PowerBook and feels 10 times slower...), I made a new build of CModTool:
Download CModTool 1.0.2
Please try it out and let me know if it fixes the triangle strip optimization issue.
Update: After some painful hours of debugging on my 400Mhz iMac G3 (the "megahertz myth" is indeed a myth: this piece of junk is certainly more than 3 times slower than my 1.33Ghz PowerBook and feels 10 times slower...), I made a new build of CModTool:
Download CModTool 1.0.2
Please try it out and let me know if it fixes the triangle strip optimization issue.
-
Topic authorElChristou
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
Dirkpitt,
I've just tried the new version.
Well, the mesh in wireframe mode is now clean (no more messy lines), after using the "triangle lists to strip". However, the FrameRate is MUCH lower than without that option selected. On a complex model, I get about 8 FPS with the option selected, while I'm getting around 18 FPS without the option selected. So actually the problem isn't solved at all.
I'm using an ATI video card (X850 XT) on OS X Tiger 10.4.3, dual G5 2.0 GHz.
I've just tried the new version.
Well, the mesh in wireframe mode is now clean (no more messy lines), after using the "triangle lists to strip". However, the FrameRate is MUCH lower than without that option selected. On a complex model, I get about 8 FPS with the option selected, while I'm getting around 18 FPS without the option selected. So actually the problem isn't solved at all.
I'm using an ATI video card (X850 XT) on OS X Tiger 10.4.3, dual G5 2.0 GHz.
"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!"
I've just made another test on another complexe model. With the new version and the option selected, I get a nice looking mesh in wireframe mode, but 6.6 FPS (in normal mode). The same model without the option selected gives 15.3 to 15.7 FPS.
"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!"
-
Topic authorElChristou
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
dirkpitt wrote:Is the size of your generated mesh smaller or bigger with the triangle-strip option selected, compared to when the option is not selected?
The file is bigger when it's made WITHOUT the triangle option.
The difference can be as big a one megabyte.
"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!"
-
Topic authorElChristou
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
Since the triangle strip optimization reduced the geometry size, it really shouldn't increase rendering times unless something else is wrong, such as if the triangles were now being rendered double-sided. What this means it could be a problem with the triangle strip optimization library being used. Fixing the library, or trying out a different one will take some time unfortunately.
-
Topic authorElChristou
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
ElChristou wrote:but then, why the problem don't occur on the Windows version???
I can't confirm personally that the Windows version of cmodfix uses NvTriStrip (the triangle strip optimizer), and if it does, whether the same problem exists. The library is supposed to be cross-platform (see here: http://developer.nvidia.com/object/nvtr ... brary.html ), and ought to produce the same results on both Windows and OS X.