saito obj loader problem
in
Contributed Library Questions
•
2 years ago
I'm having problems loading a obj file with a texture with the saito obj loader.
Basically what is happening is that the model shape loads fine but the texture only maps to the first quad in the model, rather than all the quads
From the screenshot you can see what I mean.
I'm using processing 1.2 and the latest version of saito objloader on xp
This is the code btw:
- void setup()
- {
- size(600,400,OPENGL);
- model = new OBJModel(this, "Wormhole_03-02-2011_Textured.obj", "relative", QUADS);
- model.enableMaterial();
- model.enableTexture();
- startPos=model.getVertex(0);
- println("Start pos " + startPos.x + " " + startPos.y + " " + startPos.z);
- }
- void draw(){
- background(128);
- rotateX(radians(rotateAngleX));
- rotateY(radians(rotateAngleY));
- rotateZ(radians(rotateAngleZ));
- translate(-startPos.x+x,-startPos.y+y,-startPos.z+z);
- model.draw();
- }
1