Hallo,
I have another problem. I have made an textured
BaseLevel Objekt. Also I have added the Key Navigator Object to the
Scenegraph.
Now the problem. If I stand ca. 2 meters with the
view object by the textured object the texture not not shown correctly. Same
problem if I look at textured object in an angle not of 90 degrees * X. I have
made the following Appearance Code. Do you know a way to made
texture will show correct. You can find my program
at http://java3d.stilleronline.de
My appearance code for textured
object:
private Appearance createAppearance
(Appearance app,String Picture)
{ TexCoordGeneration tcg = new TexCoordGeneration(TexCoordGeneration.EYE_LINEAR, TexCoordGeneration.TEXTURE_COORDINATE_2); URL TexFileURL =
getClass().getResource("/"+Picture);
TextureLoader textureLoader = new TextureLoader(TexFileURL, null); ImageComponent2D TexImage = textureLoader.getImage(); if(TexImage == null) { System.out.println("File not found: "+TexFileURL); } Texture2D texture = new Texture2D(Texture.BASE_LEVEL, Texture.RGB, TexImage.getWidth(), TexImage.getHeight()); texture.setImage(0, TexImage); texture.setMinFilter(Texture.NICEST); texture.setEnable(true); PolygonAttributes pa = new
PolygonAttributes();
pa.setPolygonMode (PolygonAttributes.POLYGON_FILL); pa.setCullFace(PolygonAttributes.CULL_NONE); app.setPolygonAttributes(pa); app.setTexture(texture); app.setTexCoordGeneration(tcg); return app;
} --
Markus Stiller Fon 0711 / 407 77 74 Cell 0178 / 517 46 76 Fax 0180 / 50 52 55 66 21 51 eMail: [EMAIL PROTECTED] Java 3D Experiments: http://java3d.stilleronline.de |
- [JAVA3D] Textures Markus Junginger
- Re: [JAVA3D] Textures G . Veith
- Re: [JAVA3D] Textures Kelvin Chung
- [JAVA3D] textures b. white
- Re: [JAVA3D] textures Tobias Stjernefeldt
- Re: [JAVA3D] Textures Markus Stiller
- Re: [JAVA3D] Textures John Wright
- Re: [JAVA3D] Textures Markus Stiller
- Re: [JAVA3D] Textures John Wright
- Re: [JAVA3D] Textures J. Lee Dixon
- Re: [JAVA3D] Textures Markus Stiller
- [JAVA3D] Textures Zak
- [JAVA3D] textures Frank Bellegarde
- [JAVA3D] Textures Seatizen
- Re: [JAVA3D] Textures Russell East