Author Topic: How to get the texture of obj files  (Read 1738 times)

Offline alex

  • byte
  • *
  • Posts: 19
    • View Profile
How to get the texture of obj files
« on: April 08, 2009, 09:42:01 am »
My program used *.obj files.
in the document of the jpct ,I found out the method readTextureNames3DS(java.lang.String filename)  in Loader Class .
if i load *.obj files, Loader class have no suitable method likes readTextureNames3DS() ?

please give me some suggestion.Thank U.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: How to get the texture of obj files
« Reply #1 on: April 08, 2009, 10:33:17 am »
The texture names are located in the .mtl-file you provide (IF you provide one). It should be easy to load that and parse it for the names, it's plain ASCII.

Offline alex

  • byte
  • *
  • Posts: 19
    • View Profile
Re: How to get the texture of obj files
« Reply #2 on: April 08, 2009, 10:59:10 am »
Oh! I know .
I forgot the mtl files ,Thanks!