We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › 'OBJLoader' library.
Page Index Toggle Pages: 1
'OBJLoader' library. (Read 1012 times)
'OBJLoader' library.
Jul 10th, 2009, 6:59am
 
Hello.

In this code, the texture of 'Phobos' is not visible!

  noStroke();
  lights();

  pushMatrix();
  translate(720, 450, 0);
  scale(5.0f);

  model = new saito.objloader.OBJModel(this, "3ds/phobos.obj");
  model.drawMode(POLYGON);
  model.enableTexture();
  model.enableLocalTexture();
  model.setTexture(loadImage("texture/phobos.jpg"));

  model.draw();
  popMatrix();


 
Thank's for your help.

Re: 'OBJLoader' library.
Reply #1 - Jul 10th, 2009, 8:08am
 
Is the texture folder in the data folder of your sketch?
You should load the image in one step and check if null is returned by loadImage().
Re: 'OBJLoader' library.
Reply #2 - Jul 15th, 2009, 8:56am
 
Hello.

Yes, the files '.obj' and '.mtl' are in the 'data' folder.
The '.obj' file is visible, but his color not.

Thank's.
Page Index Toggle Pages: 1