2
« on: June 08, 2008, 05:15:42 pm »
Hello ever body.
i found a littel problem, this problem occur when load model .obj or .3ds, the position and rotation is different but thy are exporting of same model, with blender.
i used this code
World worldx = new World();
ModelFactory modelFactory = ModelFactory.getInstance();
BaseEntity[] fields = new BaseEntity[4];
Object3D[] cruz = null;
if (SHOW_ORIGIN){
/* cruz = Loader.loadOBJ("/home/miguel/perfectday_project/TestProfectDay3D/models/xCoord.obj", "/home/miguel/perfectday_project"" /TestProfectDay3D/models/xCoord.mtl", 1.0f);*/
// cruz = Loader.load3DS("/home/miguel/perfectday_project/TestProfectDay3D/models/xCoord.3ds", 1.0f);
for (int i = 0; i < cruz.length; i++) {
worldx.addObject(cruz[i]);
}
}
worldx.buildAllObjects();
/**
* Place the camera at the starting position.
*/
Camera camera = worldx.getCamera();
camera.setPosition(this.xCamara,this.yCamara , this.zCamara);
camera.lookAt(SimpleVector.ORIGIN);
Config.fadeoutLight = false;
worldx.getLights().setOverbrightLighting(Lights.OVERBRIGHT_LIGHTING_DISABLED);
worldx.getLights().setRGBScale(Lights.RGB_SCALE_2X);
worldx.setAmbientLight(25, 30, 30);
/**
* Place the lightsources...
*/
worldx.addLight(new SimpleVector(0, -150, 0), 25, 22, 19);
worldx.addLight(new SimpleVector(-1000, -150, 1000), 22, 5, 4);
worldx.addLight(new SimpleVector(1000, -150, -1000), 4, 2, 22);
return worldx;
is it normal?, if this is normal. which postion and rotation are initial with .3ds and .obj?.
Thank very much
Sorry for my english