i tried that but it still didn't work but i found out it was the exporter i found a different one and it worked fine
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuimport java.io.File;
import java.io.FileOutputStream;
import java.net.URI;
import raft.jpct.bones.AnimatedGroup;
import raft.jpct.bones.BonesIO;
import raft.jpct.bones.BonesImporter;
import raft.jpct.bones.Quaternion;
import com.ardor3d.extension.model.collada.jdom.ColladaImporter;
import com.ardor3d.extension.model.collada.jdom.data.ColladaStorage;
import com.ardor3d.util.resource.ResourceLocatorTool;
import com.ardor3d.util.resource.SimpleResourceLocator;
public class Main {
public static void main(String[] args) throws Exception {
File Spectre = new File("./res/guyidle.dae");
URI uri = Spectre.toURI();
final SimpleResourceLocator resLocater = new SimpleResourceLocator(uri.resolve("./"));
ResourceLocatorTool.addResourceLocator(ResourceLocatorTool.TYPE_MODEL, resLocater);
ColladaImporter Col = new ColladaImporter().loadTextures(false);
ColladaStorage Stor = Col.load(uri.toString());
AnimatedGroup A3D = BonesImporter.importCollada(Stor, 1, new Quaternion());
BonesIO.saveGroup(A3D, new FileOutputStream("res/guyidle.bones"));
}
}
Exception in thread "main" java.lang.RuntimeException: Unable to load collada resource from URL: URLResourceSource [url=file:/home/hubbardh/workspace/Dae%20To%20Bones/res/guyidle.dae, type=.dae]
at com.ardor3d.extension.model.collada.jdom.ColladaImporter.load(ColladaImporter.java:154)
at com.ardor3d.extension.model.collada.jdom.ColladaImporter.load(ColladaImporter.java:91)
at Main.main(Main.java:22)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
at com.ardor3d.extension.animation.skeletal.SkinnedMesh.applyPose(SkinnedMesh.java:264)
at com.ardor3d.extension.model.collada.jdom.ColladaAnimUtils.buildSkinMeshes(ColladaAnimUtils.java:486)
at com.ardor3d.extension.model.collada.jdom.ColladaAnimUtils.buildController(ColladaAnimUtils.java:157)
at com.ardor3d.extension.model.collada.jdom.ColladaNodeUtils.getVisualScene(ColladaNodeUtils.java:115)
at com.ardor3d.extension.model.collada.jdom.ColladaImporter.load(ColladaImporter.java:134)
... 2 more
Page created in 0.021 seconds with 12 queries.