Thread: [Plib-devel] Importers/Exporters
Brought to you by:
sjbaker
From: Wolfram K. <w_...@rz...> - 2000-03-20 20:31:54
|
Hi, I tested some importers and exporters. I used three files with 36000, 18000 and 550 polygons. *.3ds loader: crashes with the two larger files, loads the small file ok. The colours of the small object seemed wrong. *.3ds writer: Polytrans says about the object: not 3ds file or version not recognized. However, we don't have the newest PolyTrans. *.dxf loader: Always reads exactly one triangle :-). *.dxf writer: Polytrans thought, it would be an ASCII file, which it wasn't. *.obj loader: works, hallelujah! *.obj writer: Polytrans says: password for encrypted file xxxx is wrong. Import aborted VRML import: crashes on all three files, both VRML1.0 and VRML 2.0. BTW, when I "save as" and give a nonsense extension, like "hhh", there is no warning. This is quite dangerous, since you think, plib can write wrl etc. Besides these three objects, I tried two *.dxf files. Both loaded, but all polygons were converted into triangles by ignoring the rest of the vertices, so one quad became one triangle. In one of the files, there was also a nonsense triangle, probably with wrong vertex coordinates. Lastly, I tested a simple textured box. I wasn't able to load it textured into PPE with any format. That maybe due to problems with either polytrans or the texture-path or the texture-format, or maybe with the file loaders. *.3ds crashed. *.wrl loaded something, but it wasn't even a box. *.obj worked, apart from the missing texture. *.dxf gave the by now familiar triangle. Bye bye, Wolfram Kuss. |
From: Per L. <li...@ho...> - 2000-03-20 22:51:18
|
On Mon, 20 Mar 2000, Wolfram Kuss wrote: > *.3ds loader: crashes with the two larger files, loads the small file > ok. The colours of the small object seemed wrong. Could you *pleeeeeaaaaase* make the models available for download somewhere? Since I don't own a 3d editor of any kind (waiting for you guys to make PPE :-), I have a really hard time testing my own code... it worked with the five 3ds files I have. > *.3ds writer: Polytrans says about the object: > not 3ds file or version not recognized. Hmmm...AFAIK there is no plib 3ds-writer, and that's one plausible reason for this error :-) > *.3ds crashed. I want that model, and I want it NOW! ;-) Best regards, Per Liedman -- / Per Liedman / li...@ho... / www.mdstud.chalmers.se/~md6pl / 031-825659 / 0705-520455 |
From: Wolfram K. <w_...@rz...> - 2000-03-21 12:24:26
|
Per Liedman <li...@ho...> wrote: >On Mon, 20 Mar 2000, Wolfram Kuss wrote: > >> *.3ds writer: Polytrans says about the object: >> not 3ds file or version not recognized. > >Hmmm...AFAIK there is no plib 3ds-writer, and that's one plausible reason for >this error :-) :-) So PolyTrans is absolutely right. Well, it shows again that there should be a warning: When you tell PPE to write test.3ds, it does. So, you think, it is a *.3ds-file :-). >> *.3ds crashed. > >I want that model, and I want it NOW! ;-) I am sending my test-objects to you and Dave via e-mail NOW :-). BTW, here are some URLs for free models. *.3ds: http://www.personal-connections.com/arkon/models/freemodels/index.html MANY *.3ds and *.DXF, a few *.obj (in anatomy and animals) www.3dcafe.com Sample model of a dolphin in some file formats. http://www.flashfire.com/ Sample model of a helicopter in some file formats and in some sizes (LODs). www.viewpoint.com More links (I didnt try them): www.3dcafe.com I am still looking for more textured models, if I find some, I will send them to you. > >Best regards, >Per Liedman |
From: Steve B. <sjb...@ai...> - 2000-03-22 04:37:33
|
Wolfram Kuss wrote: > > Per Liedman <li...@ho...> wrote: > > >On Mon, 20 Mar 2000, Wolfram Kuss wrote: > > > >> *.3ds writer: Polytrans says about the object: > >> not 3ds file or version not recognized. > > > >Hmmm...AFAIK there is no plib 3ds-writer, and that's one plausible reason for > >this error :-) Not really. > :-) > So PolyTrans is absolutely right. Well, it shows again that there > should be a warning: When you tell PPE to write test.3ds, it does. > So, you think, it is a *.3ds-file :-). No - the writer function returns TRUE if it saved the file sucessfully, FALSE otherwise. If there is no writer for a particular format, it won't create the output file. Applications MUST check the error return from both ssgLoad and ssgSave. The only problem (at present) is that when something goes wrong with the file load/save process, you know that it went wrong - but there is no way to tell WHY it went wrong. SSG really needs a comprehensive ssgGetError() system. So much work - so few hours :-( -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |
From: Dave M. <dp...@ef...> - 2000-03-22 06:10:36
|
Steve wrote: > The only problem (at present) is that when something goes wrong with > the file load/save process, you know that it went wrong - but there > is no way to tell WHY it went wrong. > > SSG really needs a comprehensive ssgGetError() system. i'm using a few printfs sprinkled through ssgLoadASE to give detailed information. ssgGetError() => SSG_ERR_MALFORMED_VERTEX is less helpful than foo.ASE, line 6: missing z coordinate on the console. but if you want to spec something out i don't mind implementing a more formal error handling method. |
From: Steve B. <sjb...@ai...> - 2000-03-22 06:34:09
|
Dave McClurg wrote: > > SSG really needs a comprehensive ssgGetError() system. > > i'm using a few printfs sprinkled through ssgLoadASE > to give detailed information. Ditto. > ssgGetError() => SSG_ERR_MALFORMED_VERTEX > > is less helpful than > > foo.ASE, line 6: missing z coordinate > > on the console. but if you want to spec something out > i don't mind implementing a more formal error handling method. I think a formal error handler is needed because SSG gets used for full-screen graphics where a printout to stderr isn't going to be noticed. For a program like PPE, you'd like to stuff the error message into a dialog box. -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |
From: Wolfram K. <w_...@rz...> - 2000-03-22 17:48:50
|
Steve Baker <sjb...@ai...> wrote: >I think a formal error handler is needed because SSG gets used >for full-screen graphics where a printout to stderr isn't going >to be noticed. For a program like PPE, you'd like to stuff the >error message into a dialog box. Yes, that would be nice. I normally have the console-window behind the other two windows. However, I think if there is one error in a dialog and all the details are in the console window, that is good enough for a long time. But in reality, no error message comes in either a dialog nor in the console. All the *.3ds, *.wrl, *.obj etc that are saved have exactly the same size. I found the error! In PPE, it read if ( ! ssgSaveSSG ( last_fname, model ) ) instead of if ( ! ssgSave ( last_fname, model ) ) I just committed the fix. So, it is not surprising that all the exporters didnt seem to work, since everything was saved in ssg-format. Also, I found a new program (3D exploration on Windo$), which among other things, allows me to test *.ase. The new results for the file-writers are very good: *.obj: I saw no bug. *.dxf: I saw no bug. *.ase: Works quite well, but seems to exchange frontfaces and backfaces. Bye bye, Wolfram. |
From: Wolfram K. <w_...@rz...> - 2000-03-23 09:18:42
|
Ok, so now the file writers are actually used and I get an error-dialog. However, there is still no explanation of the error. Steve, if its ok by you, as a short or medium term-solution, please add the line(s): fprintf ( stderr, "Not saved: There is no writer for the format \"%s\".\n", extn); into file ssg.cxx, at the end of ssgSave, just before the: return FALSE ; Bye bye, Wolfram Kuss. |
From: Steve B. <sjb...@ai...> - 2000-03-24 03:49:26
|
Wolfram Kuss wrote: > > Ok, so now the file writers are actually used and I get an > error-dialog. However, there is still no explanation of the error. > > Steve, if its ok by you, as a short or medium term-solution, please > add the line(s): > > fprintf ( stderr, > "Not saved: There is no writer for the format \"%s\".\n", extn); > > into file ssg.cxx, at the end of ssgSave, just before the: > return FALSE ; Yep - good idea. You still need to check the return result and pop up a dialog box if it returns FALSE though. I've just committed that change...go grab a copy from CVS. -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |
From: Per L. <li...@ho...> - 2000-04-05 22:02:32
|
On Mon, 20 Mar 2000, Wolfram Kuss wrote: > I tested some importers and exporters. > I used three files with 36000, 18000 and 550 polygons. > *.3ds loader: crashes with the two larger files, loads the small file > ok. The colours of the small object seemed wrong. It seems that I have made an assumption about the ordering of the chunks in the 3ds file that not all 3ds models follow, which makes Wolframs models crash the loader - the texture coords get defined after the ssgVtxTable, so I'm copying from a NULL-pointer :-( Unfortunately, this will take some effort to reorganize, so I'm not really sure when I get it ready (I just have one hour or two to work on it each day), but hopefully within a week. That might be too late for the 1.2 release, though. Paolo Leoncini has also made some modifications to the loader that I think should be included - at least some improvement over the current loader (better texture support). Perhaps Paolo could send the files directly to Steve for incorporation? Regards, Per Liedman -- / Per Liedman / li...@ho... / www.mdstud.chalmers.se/~md6pl / 031-825659 / 0705-520455 |
From: Steve B. <sjb...@ai...> - 2000-04-06 07:46:39
|
Per Liedman wrote: > > On Mon, 20 Mar 2000, Wolfram Kuss wrote: > > I tested some importers and exporters. > > I used three files with 36000, 18000 and 550 polygons. > > *.3ds loader: crashes with the two larger files, loads the small file > > ok. The colours of the small object seemed wrong. > > It seems that I have made an assumption about the ordering of the chunks in the > 3ds file that not all 3ds models follow, which makes Wolframs models crash > the loader - the texture coords get defined after the ssgVtxTable, so I'm > copying from a NULL-pointer :-( > > Unfortunately, this will take some effort to reorganize, so I'm not really sure > when I get it ready (I just have one hour or two to work on it each day), but > hopefully within a week. That might be too late for the 1.2 release, though. I think the 3DS loader is sufficiently important that we should wait for these fixes before declaring 1.2 ready. The alternatives are either: * Release a 1.2 with a known-broken 3DS loader (that doesn't fit my definition of a 'stable' release). * Remove the 3DS loader from the 1.2 release - and make loading 3DS files be a 1.3 feature - that won't be stable until 1.4. I don't think either of those are acceptable...so we should hold up 1.2. It would be possible to launch 1.3's CVS area while we are waiting for 1.1 to metamorphose into 1.2...Mesa did that for example. I'm reluctant to do that though...it causes a LOT of confusion. The reason I'd hoped to get 1.2 done soon was to get it onto SuSE 6.4 - but I fear that we are already too late for that. > Paolo Leoncini has also made some modifications to the loader that I think > should be included - at least some improvement over the current loader (better > texture support). Perhaps Paolo could send the files directly to Steve for > incorporation? OK - would it be better just to grant CVS access to people working this stuff though. I'm so busy right now - that it'll be a while before I can catch up with some of these new changes. -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |
From: Per L. <li...@ho...> - 2000-04-06 11:22:57
|
Steve Baker wrote: > Per Liedman wrote: > > Unfortunately, this will take some effort to reorganize, so I'm not really sure > > when I get it ready (I just have one hour or two to work on it each day), but > > hopefully within a week. That might be too late for the 1.2 release, though. > > I think the 3DS loader is sufficiently important that we should wait for these > fixes before declaring 1.2 ready. The alternatives are either: > > * Release a 1.2 with a known-broken 3DS loader (that doesn't fit my > definition of a 'stable' release). > > * Remove the 3DS loader from the 1.2 release - and make loading 3DS > files be a 1.3 feature - that won't be stable until 1.4. > > I don't think either of those are acceptable...so we should hold up 1.2. Ok, I'll work as fast as I can. It seems I should get some free time this evening. Regards, Per -- =========================================================================== Per Liedman md...@md... Nilssonsberg 7 http://www.mdstud.chalmers.se/~md6pl/ 411 43 Göteborg tel: 031-825659 / 0705-520455 =========================================================================== |