Author Topic: No animations found in collada file!  (Read 35092 times)

Offline jaychang0917

  • int
  • **
  • Posts: 50
    • View Profile
No animations found in collada file!
« on: March 07, 2017, 10:48:12 am »
Hi, I am trying the sample "ProceduralAnimationSample", it throws the following exception when i use my own .dea file. I want to ask if the animations is necessary? It is because i animate the model programatically, so there is no predefined animations in the model.

Code: [Select]
Exception in thread "main" java.lang.IllegalArgumentException: ColladaStorage contains no skins.
at raft.jpct.bones.BonesImporter.importCollada(BonesImporter.java:52)
at bones.samples.ProceduralAnimationSample.initialize(ProceduralAnimationSample.java:84)
at bones.samples.AbstractSample.loop(AbstractSample.java:91)
at bones.samples.ProceduralAnimationSample.main(ProceduralAnimationSample.java:312)

Thanks!

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: No animations found in collada file!
« Reply #1 on: March 07, 2017, 11:51:07 am »
most possibly if there is no animation, skeleton data is not exported. just try to put a dummy animation

Offline jaychang0917

  • int
  • **
  • Posts: 50
    • View Profile
Re: No animations found in collada file!
« Reply #2 on: March 07, 2017, 04:55:34 pm »
Thanks raft. I will try and get back to you.

Also I saw a sample that uses .bone file format, is it faster in terms of loading the model? Is it similar with the serialization object format in jpct-ae? How can I covert my .dae file to .bone?

Does bone support .obj format?

Sorry, too many questions. Thanks.
« Last Edit: March 07, 2017, 04:57:58 pm by jaychang0917 »

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: No animations found in collada file!
« Reply #3 on: March 07, 2017, 05:05:44 pm »
yes, Bones' binary format should be faster and more important it has no runtime dependency other then Bones and jPCT. remember when loading Collada or Ogre3D format, Ardor3D's or jME's loader / parser is used, then converted to Bones format.

this has nothing to do with .obj format. just a binary representation of Bones animation model.

you can use the scripts in the /scripts folder to convert to Bones' binary format. they should provide help with -help switch

Offline jaychang0917

  • int
  • **
  • Posts: 50
    • View Profile
Re: No animations found in collada file!
« Reply #4 on: March 08, 2017, 03:30:09 am »
Quote
this has nothing to do with .obj format
you means that i can covert .obj to .bone format too?
« Last Edit: March 08, 2017, 03:50:58 am by jaychang0917 »

Offline jaychang0917

  • int
  • **
  • Posts: 50
    • View Profile
Re: No animations found in collada file!
« Reply #5 on: March 08, 2017, 04:01:43 am »
In my .dae file, it defines some texture file paths like
Code: [Select]
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
  <asset><contributor><author></author><authoring_tool>FBX COLLADA exporter</authoring_tool><comments></comments></contributor><created>2017-03-03T10:42:33Z</created><keywords></keywords><modified>2017-03-03T10:42:33Z</modified><revision></revision><subject></subject><title></title><unit meter="0.010000" name="centimeter"></unit><up_axis>Y_UP</up_axis></asset>
  <library_images>
    <image id="file3-image" name="file3"><init_from>file://D:/Project/myproject/sourceimages/mymodel/file3.png</init_from></image>
    <image id="file2-image" name="file2"><init_from>file://D:/Project/myproject/sourceimages/mymodel/file2.png</init_from></image>
    <image id="file6-image" name="file6"><init_from>file://D:/Project/myproject/sourceimages/mymodel/file6.png</init_from></image>
    <image id="file5-image" name="file5"><init_from>file://D:/Project/myproject/sourceimages/mymodel/file5.png</init_from></image>
    <image id="file1-image" name="file1"><init_from>file://D:/Project/myproject/sourceimages/mymodel/file1.png</init_from></image>
    <image id="file4-image" name="file4"><init_from>file://D:/Project/myproject/sourceimages/mymodel/file4.png</init_from></image>
  </library_images>
...

How can i tell .bone where my texture are?

Offline jaychang0917

  • int
  • **
  • Posts: 50
    • View Profile
Re: No animations found in collada file!
« Reply #6 on: March 08, 2017, 04:53:30 am »
i am wondering why bones need the animations compulsorily? it is because there is a case that we animate the model programatically instread of playing a predefined animation.

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: No animations found in collada file!
« Reply #7 on: March 08, 2017, 09:46:16 am »
Quote
you means that i can covert .obj to .bone format too?
nope, you cannot. unless you write an importer for that ;)

Quote
How can i tell .bone where my texture are?
texture names are not imported. you need to set texture after Animated3D is constructed, check the samples. and for sure this also means same Animated3D cannot have multiple textures. unless you modify textures of polygons "manually"

Quote
i am wondering why bones need the animations compulsorily? it is because there is a case that we animate the model programatically instread of playing a predefined animation.
because typically exporters do not export skeleton without animation. no skeleton -> no programatic animation

Offline jaychang0917

  • int
  • **
  • Posts: 50
    • View Profile
Re: No animations found in collada file!
« Reply #8 on: March 08, 2017, 04:55:56 pm »
Quote
because typically exporters do not export skeleton without animation. no skeleton -> no programatic animation
Actually i have no idea what the animation defined in .dae file is about. My model is a human head, and i want to programatically animate the mouth based on facial landmarks detected. If i put a dummy animation in my .dae file, is the function of dummy animation only make exportation (.dae -> bones) works?

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: No animations found in collada file!
« Reply #9 on: March 08, 2017, 06:50:12 pm »
what is facial landmarks?

Bones only support skeleton animation in Collada files (yet dont know if other type of animation exist in Collada files, anyway) for sure you need a skeleton rigged to your model for that.

facial animations are generally pose animations (although not a strict rule), Bones only support it via Ogre3D not via Collada. have a look at FacialAnimationSample for that

Offline jaychang0917

  • int
  • **
  • Posts: 50
    • View Profile
Re: No animations found in collada file!
« Reply #10 on: March 29, 2017, 10:16:53 am »
I got a new model from designer yesterday. But unfortunately it still can't be loaded, same error "ColladaStorage contains no skins." shows. I used text editor to open the working .dae file (Seymour.dae) and my model .dae file, i found there are two differences that my model lacks two nodes (library_controllers and library_physics_scenes).

Is this the root cause of the error? Thanks!

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: No animations found in collada file!
« Reply #11 on: March 29, 2017, 11:04:36 am »
you compare it with what?

yes, possibly missing library_controllers is the reason

Offline jaychang0917

  • int
  • **
  • Posts: 50
    • View Profile
Re: No animations found in collada file!
« Reply #12 on: March 30, 2017, 12:06:40 pm »
you compare it with what?

yes, possibly missing library_controllers is the reason

New errors occurred, it shows `There are more than one skeletons in ColladaStorage.` Have any idea?

Code: [Select]
Exception in thread "main" java.lang.IllegalArgumentException: There are more than one skeletons in ColladaStorage.
at raft.jpct.bones.BonesImporter.findUniqueArdorSkeleton(BonesImporter.java:359)
at raft.jpct.bones.BonesImporter.importCollada(BonesImporter.java:66)
at bones.samples.ProceduralAnimationSample.initialize(ProceduralAnimationSample.java:84)
at bones.samples.AbstractSample.loop(AbstractSample.java:91)
at bones.samples.ProceduralAnimationSample.main(ProceduralAnimationSample.java:311)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: No animations found in collada file!
« Reply #13 on: March 30, 2017, 12:20:03 pm »
well, the error is descriptive I suppose :) there are multiple skeletons. maybe you are exporting multiple models with separate skeletons?

you can have multiple models and all should be attached to a single skeleton

Offline jaychang0917

  • int
  • **
  • Posts: 50
    • View Profile
Re: No animations found in collada file!
« Reply #14 on: March 31, 2017, 04:16:53 am »
well, the error is descriptive I suppose :) there are multiple skeletons. maybe you are exporting multiple models with separate skeletons?

you can have multiple models and all should be attached to a single skeleton

You mean the designer doesn't put the models under a root model?