Table of Contents Previous Chapter Summary Chapter Viewpoint Slideshow Javadoc for translated java source Next Chapter Summary X3D Resources

X3D Example Archives: Conformance Nist, Appearance, Image Texture

 

ImageTexture maps a 2D-image file onto a geometric shape. Texture maps have a 2D coordinate system (s, t) horizontal and vertical, with (s, t) values in range [0.0, 1.0] for opposite corners of the image.

X3D Tooltips of interest: ImageTexture.

X3D Specification sections of interest: Texturing componentc 18.4.1 ImageTexture.

X3D Examples Archives of related interest:

 
  31 X3D Scenes       Scene Descriptions
all_jpg all jpg Test JPG ImageTexture mapping onto a sphere, cone, cylinder and box. For the sphere, the texture should cover the entire surface, and wrap counterclockwise from the back of the sphere (when viewed from above). For the cone, the texture should wrap counterclockwise (viewed from above) starting at the back of the cone. A circle cutout of the texture is applied right side up to the base of the cone when the cone is tilted toward the viewer. For the cylinder, the texture should wrap counterclockwise (viewed from above above) starting at the back of the cylinder. A circle cutout of the texture is applied to the top and bottom caps of the cylinder, and appears right-side-up when tilted toward the viewer. For the box, the texture should be applied in its entirety to each face of the box, and appear right-side-up when viewed from the +Z direction.
all_png all png Test mapping PNG ImageTexture to all primitive geometry. Test browser ability to map an RGB (24 bit color) and 8 bit "palette" on a purple background should map onto a sphere, cone, cylinder and box. The "palette" version of the ImageTexture is mapped to the Sphere and the Cone. The RGB 24 bit color ImageTexture is mapped to the Cylinder and Box. For the sphere the texture should cover the entire surface, and wrap counterclockwise from the back of the sphere. For the cone, the texture should wrap counterclockwise (from above) starting at the back of the cone. A circle cutout of the texture is applied right side up to the base of the cone when the cone is tilted toward the -z axis. For the cylinder, the texture should wrap counterclockwise (from above) starting at the back of the cylinder. A circle cutout of the texture is applied right side up to the top and bottom caps of the cylinder. For the box, the texture should be applied right side up in its entirety to each face of the box.
complex_greyscale_alpha complex greyscale alpha Test browser ability to map a greyscale with alpha-opacity PNG file and a greyscale with binary transparency PNG file onto the faces of complex geometry. A greyscale version of the VTS logo, with transparent background should onto an Extrusion, an Elevationgrid and an IndexedFaceSet. Because alpha opacity is set to 0 (transparent) for the image background on the Extrusion (left) and IndexedFaceSet (right). The middle geometry, an ElevationGrid, has a binary transparent background color. All geometry will be transparent, except for the VTS logo. The transparent image will be mapped to each geometry using default texture mapping rules.
complex_rgb_alpha complex rgb alpha Test browser ability to map an RGB with alpha-opacity PNG file onto the faces of complex geometry. An red, green and blue version of the VTS logo, with transparent background should onto an Extrusion (palette plus binary transparency), an Elevationgrid (RGB plus alpha) and an IndexedFaceSet (RGB plus binary transparency). Because alpha opacity is set to 0 (transparent) for the image background on the Extrusion (left) and IndexedFaceSet (right), and binary transparency is set for the PNG image mapped to the middle geometry (the ElevationGrid), all geometry will be transparent, except for the VTS logo. The transparent image will be mapped to each geometry using default texture mapping rules.
ElevationGrid Elevation Grid Map a JPG image to an ElevationGrid. An ElevationGrid is default texture mapped by aligning the S (horizontal) axis of the VTS logo with the X axis of the ElevationGrid and the T (vertical) axis of the VTS logo with the Z axis of the ElevationGrid. The bottom of the VTS logo coincides with the first row of grid points and the top of the VTS logo maps to the last row of grid points
ElevationGridPNG Elevation Grid PNG Map a PNG image to an ElevationGrid. An ElevationGrid is default texture mapped by aligning the S (horizontal) axis of the VTS logo with the X axis of the ElevationGrid and the T (vertical) axis of the VTS logo with the Z axis of the ElevationGrid. The bottom of the VTS logo coincides with the first row of grid points and the top of the VTS logo maps to the last row of grid points
Extrusion Extrusion Map a JPG image to an Extrusion. An ImageTexture is applied to an Extrusion by aligning the bottom of the VTS logo with the first cross-section at the first spint point, and the top of the VTS logo coincides with the last cross-section at the last spine point. The left side of the VTS logo is aligned with the first cross-section point of all spine points, and the right side of the VTS logo coincides with the last cross-section point for all spine points. For the ends of the extrusion, The VTS logo will map with the S (horizontal) texture axis aligning with the X axis of the cap, and the T (vertical) texture axis aligning with the Z axis of the cap.
ExtrusionPNG Extrusion PNG Map a PNG image to an Extrusion. An ImageTexture is applied to an Extrusion by aligning the bottom of the VTS logo with the first cross-section at the first spint point, and the top of the VTS logo coincides with the last cross-section at the last spine point. The left side of the VTS logo is aligned with the first cross-section point of all spine points, and the right side of the VTS logo coincides with the last cross-section point for all spine points. For the ends of the extrusion, The VTS logo will map with the S (horizontal) texture axis aligning with the X axis of the cap, and the T (vertical) texture axis aligning with the Z axis of the cap.
greyscale_alpha_png greyscale alpha png Test greyscale texture with alpha opacity PNG mappint to primitive geometry. Using binary opacity for the Sphere and Cone and binary transparency for the Cylinder and Box)onto the faces of primative onto a sphere, cone, cylinder and box. All geometry will be transparent, cover the entire surface, and wrap counterclockwise from the back of the sphere. For the cone, the texture should wrap counterclockwise (from above) starting at the back of the cone. A circle cutout of the texture is applied right side up to the base of the cone when the cone is tilted toward the -z axis. For the cylinder, the texture should wrap counterclockwise (from above) starting at the back of the cylinder. A circle cutout of the texture is applied right side up to the top and bottom caps of the cylinder. For the box, the texture should be applied right side up in its entirety to each face of the box.
greyscale_jpg greyscale jpg Test greyscale JPG mapping onto a sphere, cone, cylinder and box. For the sphere, the texture should cover the entire surface, and wrap counterclockwise from the back of the sphere. For the cone, the texture should wrap counterclockwise (from above) starting at the back of the cone. A circle cutout of the texture is applied right side up to the base of the cone when the cone is tilted toward the -z axis. For the cylinder, the texture should wrap counterclockwise (from above) starting at the back of the cylinder. A circle cutout of the texture is applied right side up to the top and bottom caps of the cylinder. For the box, the texture should be applied right side up in its entirety to each face of the box.
greyscale_jpg_Color greyscale jpg Color Test browser ability to combine a greyscale JPEG ImageTexture with the color field value of a Color node.By adding a "red" diffuseColor to all geometry primitives, a "red" greyscale version of the VTS logo should cover the entire surface, and wrap counterclockwise from the back of the sphere. For the cone, the texture should wrap counterclockwise (from above) starting at the back of the cone. A circle cutout of the texture is applied right side up to the base of the cone when the cone is tilted toward the -z axis. For the cylinder, the texture should wrap counterclockwise (from above) starting at the back of the cylinder. A circle cutout of the texture is applied right side up to the top and bottom caps of the cylinder. For the box, the texture should be applied right side up in its entirety to each face of the box.
greyscale_jpg_diffuseColor greyscale jpg diffuse Color Test browser ability to combine a greyscale JPEG ImageTexture with the diffuseColor value of a Material node.By adding a "red" diffuseColor to all geometry primitives, a "red" greyscale version of the VTS logo should onto a sphere, cone, box and box. For the sphere, the texture should cover the entire surface, and wrap counterclockwise from the back of the sphere. For the cone, the texture should wrap counterclockwise (from above) starting at the back of the cone. A circle cutout of the texture is applied right side up to the base of the cone when the cone is tilted toward the -z axis. For the cylinder, the texture should wrap counterclockwise (from above) starting at the back of the cylinder. A circle cutout of the texture is applied right side up to the top and bottom caps of the cylinder. For the box, the texture should be applied right side up in its entirety to each face of the box.
greyscale_png greyscale png Test mapping a greyscale PNG image onto a sphere, cone, cylinder and box. For the sphere, the texture should cover the entire surface, and wrap counterclockwise from the back of the sphere. For the cone, the texture should wrap counterclockwise (from above) starting at the back of the cone. A circle cutout of the texture is applied right side up to the base of the cone when the cone is tilted toward the -z axis. For the cylinder, the texture should wrap counterclockwise (from above) starting at the back of the cylinder. A circle cutout of the texture is applied right side up to the top and bottom caps of the cylinder. For the box, the texture should be applied right side up in its entirety to each face of the box.
greyscale_png_Color greyscale png Color Test browser ability to combine a greyscale PNG ImageTexture with the color field value of a Color node.By adding a "red" diffuseColor to all geometry primitives, a "red" greyscale version of the VTS logo should cover the entire surface, and wrap counterclockwise from the back of the sphere. For the cone, the texture should wrap counterclockwise (from above) starting at the back of the cone. A circle cutout of the texture is applied right side up to the base of the cone when the cone is tilted toward the -z axis. For the cylinder, the texture should wrap counterclockwise (from above) starting at the back of the cylinder. A circle cutout of the texture is applied right side up to the top and bottom caps of the cylinder. For the box, the texture should be applied right side up in its entirety to each face of the box.
greyscale_png_diffuseColor greyscale png diffuse Color Test browser ability to combine a greyscale PNG ImageTexture with the diffuseColor value of a Material node.By adding a "red" diffuseColor to all geometry primitives, a "red" greyscale version of the VTS logo should cover the entire surface, and wrap counterclockwise from the back of the sphere. For the cone, the texture should wrap counterclockwise (from above) starting at the back of the cone. A circle cutout of the texture is applied right side up to the base of the cone when the cone is tilted toward the -z axis. For the cylinder, the texture should wrap counterclockwise (from above) starting at the back of the cylinder. A circle cutout of the texture is applied right side up to the top and bottom caps of the cylinder. For the box, the texture should be applied right side up in its entirety to each face of the box.
IndexedFaceSet Indexed Face Set Test PixelTexture mapping to an IndexedFaceSet geometry. By projecting the image through the geometry bounding box face with the long and second-longest axes, and onto the IndexedFaceSet geometry, faces between the front and back are smeared with the horizontal size of the bouding box. Any ImageTexture pixels extending beyond the geometry in the +T direction are removed to prevent image wharping. As a result, the top of the VTS logo should appear chopped off.
IndexedFaceSetPNG Indexed Face Set PNG Test mapping a PNG image to an IndexedFaceSet. The VTS logo should map to an IndexedFaceSet geometry by projecting the image through the geometry bounding box face with the long and second-longest axes, and onto the IndexedFaceSetgeometry. A horizontally reversed VTS logo is mapped to the opposite side of the IndexedFaceSet. Geometry faces between the front and back are smeared with the projected end-pixels of the ImageTexture. The VTS logo is scaled to the horizontal size of the bouding box. Any ImageTexture pixels extending beyond the geometry in the +T direction are removed to prevent image wharping. As a result, the top of the VTS logo should appear chopped off.
repeats repeats Test browser default ability to repeat a half-scale JPEG texture horizontally only to primitive geometry. Two side-by-side VTS logos should appear at the base of all geometry faces. The remaining portion of each face of each geometry will be vertically "smeared" with the last pixels along the top edge of the VTS logos.
repeatt repeatt Test browser default ability to repeat a half-scale JPEG texture vertically only on primitive geometry.Two vertical VTS logos should appear on the left side of all geometry faces. The remaining portion of each face of each geometry will be horizontally smeared with the last pixels along the right edge of the VTS logos.
repeatt_png repeatt png Test browser default ability to repeat a half-scale PNG texture vertically only to fill a primitive geometry.Two vertical VTS logos should appear on the left side of all geometry faces. The remaining portion of each face of each geometry will be horizontally smeared with the last pixels along the right edge of the VTS logos.
rgb_alpha_png rgb alpha png Test browser ability to map an RGB PNG file (with background alpha-transparency set to 0 for the two left geometry, and binary transparency onto the faces of primative onto a sphere (RGB plus alpha), cone (RGB plus alpha), cylinder (RGB plus transparency) and box (palette plus transparency). Because the image background is transparent, all geometry, except for the cover the entire surface, and wrap counterclockwise from the back of the sphere. For the cone, the texture should wrap counterclockwise (from above) starting at the back of the cone. A circle cutout of the texture is applied right side up to the base of the cone when the cone is tilted toward the -z axis. For the cylinder, the texture should wrap counterclockwise (from above) starting at the back of the cylinder. A circle cutout of the texture is applied right side up to the top and bottom caps of the cylinder. For the box, the texture should be applied right side up in its entirety to each face of the box.
st st Test browser default ability to repeat a half-scale JPEG texture horizontally and vertically to fill primitive geometry. A 2 by 2 matrix of VTS logos should map to the cone, sphere, cylinder, and each face of the box. For the cone, cylinder and sphere and sides of the box, the text should face the viewer and be horizontal. The top of the box shall have a 2 by 2 matrix of VTS logos facing the viewer, and reading left-to-right when the box top is tilted toward the initial viewpoint. The bottom of the box shall have a 2 by 2 matrix of VTS logos reading left-to-right when the bottom of the box is tilted toward the initial viewpoint.
st_png st png Test browser default ability to repeat a half-scale PNG texture horizontally and vertically to map primitive geometry. A 2 by 2 matrix of VTS logos should map to the cone, sphere, cylinder, and each face of the box. For the cone, cylinder and sphere and sides of the box, the text should face the viewer and be horizontal. The top of the box shall have a 2 by 2 matrix of VTS logos facing the viewer, and reading left-to-right when the box top is tilted toward the initial viewpoint. The bottom of the box shall have a 2 by 2 matrix of VTS logos reading left-to-right when the bottom of the box is tilted toward the initial viewpoint.
texture_256jpg texture 256jpg Map a 256 by 256 pixel JPG image to a box. For the sides, the S texture axis should be parallel to the XZ plane, and the T texture axis should be parallel to the YZ plane. For the top of the box, the S (horizontal) axis of the texture should be parallel with the X axis, and the T (vertical) axis should be parallel with the Z axis. When viewed from the top, S texture values should increase to the right, and T values should increase upward. For the bottom of the box, the S (horizontal) axis of the texture should be parallel with the X axis, and the T (vertical) axis should be parallel with the Z axis. When viewed from the bottom, S values should increase to the right, and T values should incrase upward.
texture_256png texture 256png Map a 256 by 256 pixel PNG image to a box. For the sides, the S texture axis should be parallel to the XZ plane, and the T texture axis should be parallel to the YZ plane. For the top of the box, the S (horizontal) axis of the texture should be parallel with the X axis, and the T (vertical) axis should be parallel with the Z axis. When viewed from the top, S texture values should increase to the right, and T values should increase upward. For the bottom of the box, the S (horizontal) axis of the texture should be parallel with the X axis, and the T (vertical) axis should be parallel with the Z axis. When viewed from the bottom, S values should increase to the right, and T values should incrase upward.
threesides threesides Test JPG texture mapping to 3 equal length sides of a bounding box. The bounding box for this geometry is equal length on all sides. By default the JPG ImageTexture should map the S (horizontal) axis to the X axis, and the T (vertical) axis to the Y axis. IndexedFaceSet. All remaining faces have the "smeared" end pixels of the front and rear textures.
threesidesPNG threesides PNG Test PNG texture mapping to 3 equal length sides of a bounding box. The bounding box for this geometry is equal length on all sides. By default the PNG ImageTexture should map the S (horizontal) axis to the X axis, and the T (vertical) axis to the Y axis. IndexedFaceSet. All remaining faces have the "smeared" end pixels of the front and rear textures.
twosidesbig twosidesbig Test image mapping with 2 equal length sides of a bounding box. The bounding box for this geometry has two equal length long sides (Y and Z) and one short side (X). The JPG image VTS logo will be projected onto the bounding box with the S (image horizontal) axis parallel with the Y axis, the T (image vertical) axis parallel to the Z axis. The result: the VTS logo should appear "sideways" on the sides of the IndexedFaceSet, with the bottom of the logo along the Y axis. All remaining faces have the "smeared" end pixels of the front and rear textures.
twosidesbigPNG twosidesbig PNG Test PNG image texture mapping with 2 equal length sides of a bounding box. The bounding box for this geometry has two equal length long sides (Y and Z) and one short side (X). The PNG image VTS logo will be projected onto the bounding box with the S (image horizontal) axis parallel with the Y axis, the T (image vertical) axis parallel to the Z axis. The result: the VTS logo should appear "sideways" on the sides of the IndexedFaceSet, with the bottom of the logo along the Y axis. All remaining faces have the "smeared" end pixels of the front and rear textures
twosidessmall twosidessmall Test JPG mappping with two equal length small sides of a bounding box. Map a JPG image to an IndexedFaceSet. The bounding box for this geometry has two equal length short sides (X and Y) and one longer side (Z). The VTS logo will be projected onto the bounding box with the S axis corresponding to the long Z axis of the bounding box, and the T axis corresponding to the X axis. The result: the top and bottom of the IndexedFaceSet should have the VTS logo, with the bottom of the logo along the Z axis. All remaining faces have the "smeared" end pixels of the front and rear textures.
twosidessmallPNG twosidessmall PNG Test PNG mappping with two equal length small sides of a bounding box. Map a PNG image to an IndexedFaceSet. The bounding box for this geometry has two equal length short sides (X and Y) and one longer side (Z). The VTS logo will be projected onto the bounding box with the S axis corresponding to the long Z axis of the bounding box, and the T axis corresponding to the X axis. The result: the top and bottom of the IndexedFaceSet should have the VTS logo, with the bottom of the logo along the Z axis. All remaining faces have the "smeared" end pixels of the front and rear textures.

Online at http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/ImageTexture

Validate XHTML 1.1

Master source-code model archive is under subversion control at
http://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/ImageTexture

The X3D Resources: Examples page and Savage Developers Guide provide more information about the production of this archive.

Table of Contents Previous Chapter Summary Chapter Viewpoint Slideshow Javadoc for translated java source Next Chapter Summary X3D Resources