bugunderware - Bugs: bug #7901, osgcal fails with certain models...

Show feedback again

bug #7901: osgcal fails with certain models for unknown reason

Submitted by:  Bryan Duff <duffolonious>
Submitted on:  Thu 30 Nov 2006 06:33:10 PM UTC  
Category: 3DEffort: 0.00
Priority: 5 - NormalSeverity: 4 - Important
Status: ConfirmedPrivacy: Public
Assigned to: cedric pinson <cpinson>Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Sun 10 Dec 2006 12:16:43 PM UTC, comment #10:

The problem might be indeed with the computation of the camera position, or even different but not having anything to do with the original bug report at all; it's just that I thought that it might be a related problem, so I posted it with the hope that it would help to identify the main problem (such as models exported with specific exporters, versions of them, etc).

And I thought that it might be a related problem since both Bryan and me were having the same error with the same model initially, that's why I posted it in the same bug report. Sorry for adding noise and not explaining clearly that our model make OSGCal crash with the error message reported initially, and that the problem with those Cal3D test models is not crashing but just not seeing them in the OSGCal viewer.

Anyway, if you're still interested in this: I can see Cally, Paladin and Skeleton correctly, but not Heroine, Hero and Thug.

$ pkg-config --modversion cal3d

$ dpkg -l osgcal
ii osgcal 0.1.44-1

If you're not interested please ignore me; or if you prefer to have a separate bug report for this or make more tests, please tell me :)

Manuel A. Fernandez Montecelo <mafm>
Fri 08 Dec 2006 08:56:02 PM UTC, comment #9:

I see.

changing that to MATERIAL="0" fixes the problem. We'll have to do further testing on our end about exporting to cal3d.

As for the other models that give the same error (failing to build index), I'll give you a list or the ones I can find (I know I have a few). Not sure if it's the same exact problem - just the same error. Although I have yet to test them after that patch from griim.

Thanks for all your time on helping us with this bug.

Bryan Duff <duffolonious>
Fri 08 Dec 2006 01:47:34 PM UTC, comment #8:

I can't see the texture too, even with the cal3d miniviewer. Can yo u confirm me that your models are totally working with cal3d 0.11 ? (with the miniviewer_gl)

elf.cfg wasn't loading because mesh did'nt have material id. Now the mesh load, because osgcal doesn't fails anymore if no material is set up, but logicaly no materials are applied.

elf2.cfg has a material, but the mesh material id is -1 (=no material) so the loaded material is not used.

To my mind, the problems seems related to data.

Concerning other models (the ones with cal3d), are you sure the problem is the same ? I know that on some model, the camera position is badly computed, and so model are not visible on screen (but loaded correctly).

Jérôme Jeannin <griim>
Project Member
Fri 08 Dec 2006 12:50:15 AM UTC, comment #7:

Oh wait, I'm sorry - the patch does allow me to view the model (but I can't see the texture). I recompiled with the patch. So this has no material? Hmmmm...

$ osgcal elf2.cfg
Loading cal3d character from elf2.cfg
subloading skeleton: ./Elf_F_271106-2.XSF
subloading animation: ./Elf_F_run_271106-2.XAF
subloading mesh: ./Elf_F_body_271106-2.XMF
subloading material: ./Elf_F_271106-2.XRF
scaling model by 0.1 factor
Time to load = 0.36533

Remember this is not specific to this mesh, but includes your examples (with osgcal) as well as others found on worldforge.

Bryan Duff <duffolonious>
Thu 07 Dec 2006 11:36:48 PM UTC, comment #6:

I don't believe that is the problem.

Here is the xml output of the same model (with a material).

Same error.

(file #1658)

Bryan Duff <duffolonious>
Thu 07 Dec 2006 01:48:11 PM UTC, comment #5:

osgcal does not to load your model because it does not have any materials.

Actually, createSubMeshSoftware fails if no materials are available for a mesh (your model works fine with mesh hardware, you can try with --vertexprogram on the osgcal binary)

To fix your problem, you may add materials to your mesh, or apply the patch (see joined files) to update Model.cpp to have a less restrictive behavior.

Have fun !

(file #1652)

Jérôme Jeannin <griim>
Project Member
Wed 06 Dec 2006 07:39:14 PM UTC, comment #4:

I should say I tested the problem on 0.10 and 0.11 - no clue about >0.10

Bryan Duff <duffolonious>
Wed 06 Dec 2006 07:38:31 PM UTC, comment #3:


I had this problem with 0.10 and 0.11.

isn't the model VERSION="1100"?


Bryan Duff <duffolonious>
Wed 06 Dec 2006 01:55:38 PM UTC, comment #2:

Bryan :

Please, could you tell us wich Cal3d version you're using ?

On my system (with the current Cal3d svn build), the skeleton file (Elf_F_271106.CSF) version mismatch the one expected.

Manuel :

Is the problem exactly the same as Bryan's one (unable to run osgcal with a specific model) or does the model load but is not visible ? In the second case, this may occurs because the camera position is wrongly initialized.

Jérôme Jeannin <griim>
Project Member
Thu 30 Nov 2006 08:16:28 PM UTC, comment #1:

It happens the same with half of the test models that come with cal3d: you can load cally and the skeleton for example, but not the heroes.

Manuel A. Fernandez Montecelo <mafm>
Thu 30 Nov 2006 06:33:10 PM UTC, original submission:

running of osgcal:

//start snip
$ osgcal elf.cfg
Loading cal3d character from elf.cfg
subloading skeleton: ./Elf_F_271106.CSF
subloading animation: ./Elf_F_run_271106.CAF
subloading mesh: ./Elf_F_body_271106.CMF
subloading mesh: ./Elf_F_bootL_271106.CMF
subloading mesh: ./Elf_F_bootR_271106.CMF
subloading mesh: ./Elf_F_hair_271106.CMF
subloading mesh: ./Elf_F_skirt_271106.CMF
subloading mesh: ./Elf_F_top_271106.CMF
scaling model by 0.1 factor
create: Building of the index failed
assert false == mRunning in function ~osgViewer in file osgviewer.cpp at line 70
osgcal: osgviewer.cpp:62: static void Assert::AssertMsg(bool, const std::string&, const std::string&, const std::string&, int): Assertion `condition' failed.
//end snip

This happens with osg 1.0 and osgcal version 1.0.41 and 1.0.44 (that I've tested). This model works in the cal3d miniviewer.

I think the issue has something to do with the meshes, if I comment out the meshes in the cfg file then it loads (but of course I don't see anything).

Bryan Duff <duffolonious>


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #1658:  elf-cal3d-xml.tar.bz2 added by duffolonious (133kB - application/x-bzip)
file #1631:  elf-cal3d.tar.bz2 added by duffolonious (134kB - application/x-bzip)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by griim (Posted a comment)
  • -unavailable- added by mafm (Posted a comment)
  • -unavailable- added by loic (Updated the item)
  • -unavailable- added by duffolonious (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 07 Dec 2006 11:36:48 PM UTCduffoloniousAttached File-=>Added elf-cal3d-xml.tar.bz2, #1658
    Thu 07 Dec 2006 01:48:11 PM UTCgriimAttached File-=>Added Model_createSubMeshSoftware.patch, #1652
    Thu 30 Nov 2006 06:34:34 PM UTCloicSeverity3 - Normal=>4 - Important
      Assigned toNone=>cpinson
    Thu 30 Nov 2006 06:33:10 PM UTCduffoloniousAttached File-=>Added elf-cal3d.tar.bz2, #1631
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup