Author Topic: Question regarding the 3DS loading process  (Read 3699 times)

Offline Klaudiusz

  • int
  • **
  • Posts: 75
    • View Profile
Question regarding the 3DS loading process
« on: September 28, 2007, 03:28:10 pm »
Hi,

While the 3DS file is loaded, some materials and textures are created:

Quote
File head2.3DS loaded...79376 bytes
Processing new material Material #25!
Texture named AFRICAN_.JPG added to TextureManager!
Processing new material Material #26!
Processing new material Material #27!
Processing new material Material #28!
Texture named EYE_DARK.TIF added to TextureManager!
Processing new material Material #29!
Processing new material Material #30!
Processing new material Material #31!
Processing new material Material #32!
Processing new material Material #33!
Processing new material Material #34!
Processing object from 3DS-file: head2
Object 'head2_jPCT0' created using 2880 polygons and 1487 vertices.

I suppose those textures are created as dummy.

How can i remove this creating? (I havy my own texture loader and i'm affraid whether the name of some new texture can be taken by some of the dummies)
What it's "new material Material #**" ? What's that mean in JPCT?

Thank You

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Question regarding the 3DS loading process
« Reply #1 on: September 28, 2007, 03:40:17 pm »
Yes, those textures are dummy ones and they have to be created to be able get a reference to the textures in the 3ds. You can replace them  via the TextureManager (by name) or (and better), add textures with that names to the manager before loading the 3ds. Then, the loader will not create new ones but use the existing ones.
The materials are part of the 3ds-format. They may contains texture and/or color information. jPCT is using some information from those materials, but not all.
« Last Edit: September 28, 2007, 03:44:18 pm by EgonOlsen »

Kearnan

  • Guest
Re: Question regarding the 3DS loading process
« Reply #2 on: October 14, 2007, 01:14:11 am »
You can use one of these...

public static String[] readTextureNames3DS(String string) { return null;}
public static String[] readTextureNames3DS(URL uRL, String string) { return null;}
public static String[] readTextureNames3DS(InputStream inputStream) { return null;}

... to collect a convenient list of texture names from the model.  I use those to audit my world file (where I save my world structure).  It seems, to me, that textures should be loaded with your own method before the 3DS model (as models use textures and textures don't use models, but then you'd need to create a list beforehand) if you'd rather not have the "load3DS" method create dummy texture names.  Although, I haven't seen that it makes any real difference by the time everything is loaded beyond the duplicate texture warning.