Re: LANG: syntax for image files

PAUL ([email protected])
Thu, 12 Oct 95 17:31:15


At 4:28 PM on 10/12/95, P.J. O'Rourke wrote:

> I have a simple .wrl file featuring, among other things, a square

>block, floating out there in space. What I want to do is to "paste" an

>image (file) onto one side of this block, could be a .gif or .jpeg file,

>doesn't matter to me. Is this possible, and if so, what would the syntax

>look like?

Coordinate3 { point [100 102.4 -102.4, 100 102.4 102.4, 100 0 102.4,
100 0 -102.4 ] }

# identifies in this case, only 1 face, a rectangle; in your case,
all the points

# of the block would be identified.

ShapeHints {

vertexOrdering CLOCKWISE

faceType CONVEX

}

# IndexedFaceSet node here could setup other faces of the block,

# using current material & texture.

Texture2 {

filename "earth.bmp"

}

IndexedFaceSet {

coordIndex [ 0,1,2,3,-1,]

} # the face you want the graphic pasted on.

How well this works would depend on your VRML Browser, at this stage of

development - some don't handle bitmaps yet, some don't handle them well.

You can also use TextureCoordinate2 to scale & position the graphic, if
the

Browser supports that node.

Your alternative is to place the texture on the face of the Cube in a
world-

building program such as 3DWeb Spinner (if you're working on a PC in

Windows).

Good luck,

Paul S. Hoffman

VP/Crsative Director

Cognetics Corporation

[email protected]

http://www.cognetics.com

At 4:28 PM on 10/12/95, P.J. O'Rourke wrote:

> I have a simple .wrl file featuring, among other things, a square

>block, floating out there in space. What I want to do is to "paste" an

>image (file) onto one side of this block, could be a .gif or .jpeg file,

>doesn't matter to me. Is this possible, and if so, what would the syntax

>look like?

It is only possible if your "block" is an indexed face set, rather than

a Cube primitive. (setting the Texture2 to a graphic file for a Cube
texturizes

the entire Cube)

Here's a sample I've used:


  • Next message: Dave Blackburn: "October 19 VRSIG at ECI"
  • Previous message: Cranz Gregory: "GUNZIP for the mac?"
  • Maybe in reply to: Reb Matrix: "LANG: syntax for image files"
  • Next in thesad: Reb Matrix: "Re: LANG: syntax for image files"