Show Posts

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.


Topics - alakat

Pages: [1]
1
Support / Texture and MD2
« on: June 09, 2008, 09:54:07 pm »

hi all
i have just read in Loader javadoc http://www.jpct.net/doc/com/threed/jpct/Loader.html#loadMD2(java.lang.String,%20float) that if i load an md2 file, and in this model  two (or more) mesh with textures have been created, these textures are not loaded. is that true?

If it is true, when i load an md2 file using loadMD2 method i supposedly get one only Object3D (not an array like in the rest of loadXXX methods) how could i set different textures to each mesh?

Thanks very much


2
Support / Initial position and rotation
« 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
Code: [Select]
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

3
Support / Problems loading models and applying textures
« on: June 01, 2008, 06:42:38 pm »
Hi all,i am a new jpct programer
at the moment i work  in a turn strategic game, in this game i use jpct but i am in trouble with textures and models.
i will explain my difficulties:
With this code i load a model and apply texture on it. but textures are not shown.
Code: [Select]
TextureManager textureManager = TextureManager.getInstance();
textureManager.addTexture("metal", new Texture(new FileInputStream("/home/miguel/perfectday_project/JPCTExm/textures/rocks.jpg")));
model = Loader.load3DS(new FileInputStream("/home/miguel/perfectday_project/blender_model/obj_export/plano.3ds"), 1);
Object3D field = model[0];
field.setTexture("metal");
if i don t load any model, and use Primitive to create a plane and apply texture on it the textures are shown.  ???
Code: [Select]
Object3D plane = Primitives.getPlane(1, 4);
        plane.translate(SimpleVector.ORIGIN);
        plane.setTexture("metal");
        plane.rotateX((float) (Math.PI /-2));
        plane.setEnvmapped(Object3D.ENVMAP_DISABLED);
        plane.build();
i have tried loading .obj and .3ds and textures are not applied tomy models ( i even tried loading very simple model like a cube or a plane)
I created these models  by using Blender 2.45  and exporting then to .0bj and 3ds. I dont know if the problem occurs when exporting the models or if it is due to the jpct configuration.
CarTest example works
Thank you  very much.
sorry for my english

Pages: [1]