Results 1 to 6 of 6

Thread: How can I read collada geometry faster?

  1. #1
    Junior Member
    Join Date
    Apr 2006
    Posts
    6

    How can I read collada geometry faster?

    Hello.
    I am working in an Augmented Reality project based on ARToolkit, and other libraries like openCV. I am using Collada geometry to represent the virtual information on the scene. The image below shows a little about it.



    However, a big problem occurs when the 3D objects are complex enough, and the reading of those become very hard.
    Then, I would like to know how can I read complex xml objects (.dae) faster. Is there any binary format of Collada geometry?

    Thanks for now, and sorry for my English mistakes.

    Douglas

  2. #2
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    Hi Douglas, sounds like a cool project. Welcome to COLLADA.

    First, I recommend that you profile your application to see if there's anything in particular that's very slow. Sometimes there's a very simple change you can make to speed things up.

    Beyond that, are you using the COLLADA DOM or some other library to load data? If not, what xml parser are you using? Need more info.

  3. #3
    Junior Member
    Join Date
    Apr 2006
    Posts
    6
    Hi sthomas.

    I am using the COLLADA DOM to load the objects, and the COLLADA RT to render them using openGL. My code is based on the sample viewer code existent in the COLLADA RT.

    Even using the COLLADA RT viewer, the process of reading and rendering a 3D complex object takes a considered time. Differently from, for example, reading a binary file of the same object, like .mb (maya binary extension).

    Douglas

  4. #4
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    Which version of the DOM are you using? In revision 77 (May 7th) I submitted some code that seriously hurt geometry load performance. I submitted a fix in revision 109 (June 4th). If you grabbed code from svn in that interval it might explain the problem.

    Aside from that, it's not all that surprising that loading an xml document takes longer than loading a binary file with the same content. Loading text requires much more data parsing. The DOM has some support for storing the geometry out in binary files. See this post for more details. I think you would turn this on with dae.getIOPlugin()->setOption("saveRawBinary");

  5. #5
    Junior Member
    Join Date
    Apr 2006
    Posts
    6
    I am using the package COLLADA 1.4.1 DOM 1.2.0 (COLLADA_DOM_FX_RT_1.2.0_VC8.exe). Ive tried to use de 1.3.0 version, but Ive had some problems to load the objects.
    I think the code I am using was grabbed in the interval that you have mentioned. I willl update it, and try again.

    Thanks for the link of the post. The .raw extension can be the solution for my problem. By the way, where can I find more about it?

  6. #6
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    I think the code I am using was grabbed in the interval that you have mentioned.
    If you didn't pull the code from subversion then there's no worry that you got the bad code.
    The .raw extension can be the solution for my problem. By the way, where can I find more about it?
    In daeLIBXMLPlugin.cpp and daeRawResolver.cpp. We have a lot of DOM documentation on the Wiki but I can't seem to find any .raw file documentation. I guess I should write some. Anyway the jist is that you set the "saveRawBinary" option with the code I mentioned earlier. Then you save your document and you get .raw files. At load time it automatically loads any .raw files referenced by a .dae. I just tested this on Linux and it's completely busted. It should work on Windows though.

    Two additional caveats. (a) It was submitted by Andy on Jan 4th 2007, which is after the DOM 1.2.0 release. So you may not have the code in your version, in which case you'd need to update. (b) This is a custom extension used by the DOM and clients of the DOM (e.g. COLLADA RT and the Refinery conditioners). Don't expect other apps to work with these .raw files.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •