Author Topic: Loading Bones on Android  (Read 69918 times)

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: Loading Bones on Android
« Reply #60 on: September 06, 2011, 07:29:35 pm »
"Remove Duplicate Vertices" (another one for the wiki!) did the trick. I'm up to 35 fps with both skeletal and pose animation (although it should be mentioned I must have exported pose wrong because I don't see the morphs happening so maybe it'll yet slow down but probably not).

Offline amizorach

  • byte
  • *
  • Posts: 5
    • View Profile
Re: Loading Bones on Android
« Reply #61 on: September 08, 2011, 06:44:39 pm »
Hi All
I am trying to compile the android apllication with no success it seems I need to compile bones into the app is this correct.
Is there a readme/tutorial that explains how to set up the project on android

 

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Loading Bones on Android
« Reply #62 on: September 08, 2011, 06:51:32 pm »
Bones is just an ordinary library from Android's point of view. Just put bones.jar in your build bath.

for genaral jPCT and Android information have a look at:
http://www.jpct.net/wiki/index.php/Main_Page#jPCT-AE_-_a_port_of_jPCT_to_Android

Offline amizorach

  • byte
  • *
  • Posts: 5
    • View Profile
Re: Loading Bones on Android
« Reply #63 on: September 08, 2011, 07:12:20 pm »
I tried to add the bones jar but am getting

[2011-09-09 02:10:12 - NinjaDemoActivity] Dx
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lraft/jpct/bones/Animated3D$VertexController;
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.dex.file.DexFile.add(DexFile.java:143)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main.processClass(Main.java:372)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:346)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main.access$400(Main.java:59)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:294)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main.processOne(Main.java:313)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:233)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.dx.command.dexer.Main.run(Main.java:185)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at java.lang.reflect.Method.invoke(Unknown Source)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:179)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:585)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:490)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
[2011-09-09 02:10:12 - NinjaDemoActivity] Dx 1 error; aborting
[2011-09-09 02:10:12 - NinjaDemoActivity] Conversion to Dalvik format failed with error 1

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Loading Bones on Android
« Reply #64 on: September 08, 2011, 07:17:34 pm »
NinjaDemo project depends on Bones project. so it already has all the necessary bones classes. if you add bones.jar to project, there becomes two copies bones classes. try either removing project dependency or removing bones.jar

Offline amizorach

  • byte
  • *
  • Posts: 5
    • View Profile
Re: Loading Bones on Android
« Reply #65 on: September 08, 2011, 07:26:01 pm »
When you say depends on what do you mean

Whjat do I need to do to get ninjademo to compile for android

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Loading Bones on Android
« Reply #66 on: September 08, 2011, 07:30:23 pm »
are you using Eclipse?

Offline amizorach

  • byte
  • *
  • Posts: 5
    • View Profile
Re: Loading Bones on Android
« Reply #67 on: September 08, 2011, 07:32:24 pm »
yes but when I try to build ninja without the bones.jar it is missing files

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: Loading Bones on Android
« Reply #68 on: September 08, 2011, 07:35:10 pm »
what do you mean by build? run the project or?

Offline amizorach

  • byte
  • *
  • Posts: 5
    • View Profile
Re: Loading Bones on Android
« Reply #69 on: September 08, 2011, 07:37:18 pm »
I dont know how but its working now
thanks