Hi all!
I have a problem with loading 3ds model to JME. I want to create a multi-player tank shooter for my first JME game.
Found a 3ds tank model on a free 3dsmax page. want to load it, but it looks very bad.
what do i wrong?
is it a problem with my code or it is possible, that my vga card is too weak for that? i use my laptop, that is for offical use, so i think it's vga card bad. should i try it on a stronger PC?
My code for 3ds loading:
private void addPlayer(URL maxFileLocation) {
Node model = null;
try {
MaxToJme maxToJme = new MaxToJme();
ByteArrayOutputStream out = new ByteArrayOutputStream();
maxToJme.convert(maxFileLocation.openStream(), out);
BinaryImporter importer = new BinaryImporter();
model = (Node) importer.load(out.toByteArray());
model.setLocalScale(.030f);
model.setModelBound(new BoundingBox());
model.updateModelBound();
}
catch (IOException ioe) {
ioe.printStackTrace();
}
Quaternion quaternion = new Quaternion();
quaternion.fromAngleAxis(-FastMath.PI/2, Vector3f.UNIT_X);
playerNode = new Tank("Tankmode", model);
((Vehicle)playerNode).setAcceleration(15);
((Vehicle)playerNode).setBreaking(25);
((Vehicle)playerNode).setWeight(50);
((Vehicle)playerNode).setTurnSpeed(0.3f);
playerNode.updateWorldBound();
playerNode.attachChild(model);
model.setLocalRotation(quaternion);
model.updateRenderState();
playerNode.setLocalTranslation(new Vector3f(50,2,80));
scene.attachChild(playerNode);
scene.updateGeometricState(0, true);
playerNode.setRenderQueueMode(Renderer.QUEUE_OPAQUE);
}