jPCT - a 3d engine for Java > Bugs

Loader.loadOBJ OutOfBounds Exception.

(1/2) > >>

Socke:
If i start Blender end export the cube (Blender create one on start) and load this with


--- Code: ---Object3D[] tests = Loader.loadOBJ("models/course1.obj", "models/course1.mtl", 0.2f);
--- End code ---

it works fine.

If i add a second cube and exports this and load this i become:


--- Code: ---Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at com.threed.jpct.Loader.loadOBJ(Unknown Source)
at com.threed.jpct.Loader.loadOBJ(Unknown Source)
--- End code ---


http://84.201.4.116/downloads/models.rar

KittenKoder:
I don't believe Blender formats the mtl file in a way that jPCT likes, I found that error as well when I tried loading the mtl file but without the mtl file everything loads fine.

Socke:
I tried with second parameter null. No difference.

EgonOlsen:
I'll have a look at the models tomorrow....boy, do i hate the obj format. It's a piece of junk that every exporter writes as he wishes.

Socke:
Does obj support animations? I just wanted to test this. Blender can not export into md2 and 3ds does not support animations.

Navigation

[0] Message Index

[#] Next page

Go to full version