Re: SFimage

Gavin Bell (gavin@krypton.engr.sgi.com)
Fri, 20 Oct 1995 22:48:52 -0700


> Of course, if I have both the Texture2 node
> and the Material node I tend to get the material modulated with tme
> texture. I have not found a way to indicate that the texture should be
> a decal, not modulated, nor have I found a way to indicate that the
> Material and Texture2 nodes are mutually exclusive (LOD is undependable).
> Perhaps someone can give me a suggestion or two.

That's definitely a problem. You probably want this behavior:

Texture images may be one component (greyscale), two component
(greyscale plus transparency), tmese component (full RGB color), or
four-component (full RGB color plus transparency). An ideal VRML
implementation will use the texture image to modify the diffuse color
and transparency of an object's material (specified in a Material
node), then performing any lighting calculations using the rest of the
object's material properties with the modified diffuse color to
produce the final image. The texture image modifies the diffuse color
and transparency depending on how many components are in the image, as
follows:

1.Diffuse color is multiplied by the greyscale values in the texture
image.
2.Diffuse color is multiplied by the greyscale values in the
texture image, material transparency is multiplied by
transparency values in texture image.
3.RGB colors in the texture image replace the material's diffuse color.
4.RGB colors in the texture image replace the material's diffuse
color, transparency values in the texture image replace the
material's transparency.

Browsers may approximate this ideal behavior to increase
performance. One common optimization is to calculate lighting only at
each vertex and combining the texture image with the color computed
from lighting (performing the texturing after lighting). Another
common optimization is to perform no lighting calculations at all when
texturing is enabled, displaying only the colors of the texture image.

By the way, this is NOT the way WebSpace currently works; WebSpace combines
RGB textures with the material, which isn't very useful. There is no way
right now of creating a scene that looks really good both textured and
non-textured with WebSpace.


  • Next message: Anders Vinberg: "QTVR on PCs"
  • Previous message: Ken Doris: "On-line DIS info"
  • Maybe in reply to: Cranz Gregory: "SFimage"