A problem with the textures.

How i can load the textures in java 3d.I tried several times but so far I have only colored the objects in some randomcolor.

TextureLoader loader = new TextureLoader("rujda.bmp",this);
Texture3D brick = (Texture3D)loader.getTexture();
TextureAttributes ta = new TextureAttributes();	    
Appearance ap = new Appearance();
   ap.setTextureAttributes(ta);
   ap.setTexture(brick);

Java3d isn’t used so often nowadays, why don’t you give lwjgl a shot? You’d get a LOT more help with it than with J3d. At least here :slight_smile:

If I have to guess, the problem MAY be around
TextureLoader loader = new TextureLoader(“rujda.bmp”,this);
Texture3D brick = (Texture3D)loader.getTexture();

I personally don’t like the (Texture3D)loader.getTexture();, but it might be just me…

lwjgl is very low-level. And I know for this error.When I try with Texture2D the effect is the same.

No, it isn’t.

| Nathan

Everything’s relative… =S

That depends… :slight_smile: