Hi I posted the below. Wanted to tell you why i had this strange goings on.. others may be expeiencing it too!
 
Having experimented much on textureing to a simple GeometryArray i have concluded that my code for creating Geometry, setting normals, texture Coordinates and a textured appearance had absolutely nothing wrong with it. When i used the geometry within a SimpleUniverse utility and a KeyNavigatorBehavior it worked exactly as it should and looked... even if i do say so me self... absolutly-blooming-fantastic! :-)
 
This did however raise the question as to what was wrong with my original code.  In order to facilitate the type of user options and behaviors I wanted, I had decided to create  the View myself attaching the required ViewPlatform, PhysicalBody, PhysicalEnvironment and Canvas3D etc. Based on the Java3DCommunity RawJ3D tutorial on Cameras and Viewers
 http://www.j3d.org/tutorials/raw_j3d/chapter1/viewing.html  code.. in this Justin use's as backClipDistance of 100.0
When I choose a lower number here say to 10.0 it solved all the texture oddities I had been experiencing. It does mean however that my viewing distance is reduced. What exactly had I done here? It seemed to me that if the backClipDistance had been relative to the point the View was directly looking at, its virtual location being half way between me and backClipDistance? meaning close textures had a distorted effect?
 
What are my options here... Should i use a Clip node to facilitate the viewing of far distances and keep my View.setBackClipDistance to a low number ( < 50)? or should i use ofther View parameters settings to compensate for the texture distortion?
 
Martin
 
----- Original Message -----
From: martin
Sent: Thursday, February 20, 2003 12:40 AM
Subject: [JAVA3D] Texture oddity

Hi
 
Im having some trouble with Textureing anyone help or tell me what i might be doing wrong?
 
Im making a simple QuadArray item consiting of COORDINATES,  NORMALS and TEXTURE_COORDINATE_2 items. I have set 4 Point3f items defining my coordinates and have used GeometryInfo and NormalGenerator to create Normal Vectors. I have also set and array of TexCoord2f mapping my texture over my GeometryArray, producing a Square shape with a texture mapped once over it nicely effected by lighting.
 
when I view my scene my texture seems fine if im some distance away, but the Texture Coordinates seem to get confused if i navigate the scene near the object distorting and angeling my texture. Ive tried different TexCoordGeneration settings and different TexCoor2f's but cant seem to shake off the problem.
 
Martin

Reply via email to