> From: "Jack E. Rumskas" <[EMAIL PROTECTED]>
>
> Is it possible to Tile a single small texture in Java3D across a single
> large structure such as a Box or Sphere? I have tried various settings and
> the textures seems to be stretched out over the surface. Assume that the
> Box is quite large, say 1000m with only 4verts per side and the texture is
> say 100pixels X 100pixels.
>  If anyone has an answer or example, it would be appreciated.


The texture is defined as extending from 0,0 to 1,1 in texture coordinates.  

To make your texture tile across your quad, use texture coordinates which are 
outside of the range 0->1 and tell J3D to "WRAP" the texture coordinates.  For 
example:

        texCoords = 0,0,  
                    10, 0
                    10, 10
                    0, 10
        texture.setBoundaryModeS(Texture.WRAP);
        texture.setBoundaryMoseT(Texture.WRAP);
        
Will make replicate the texture ten times along the x and y axes of your quad, 
tiling the quad with 100 copies of the texture.

Doug Gehringer
Sun Microsystems

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to