[X3D-Public] [X3D] Invitation: Web3D Town Hall and X3D Interoperability Demonstration; NURBS, TextureTransform problems
michalis.kambi at gmail.com
Sun Jul 22 18:04:22 PDT 2012
Don Brutzman wrote:
> b. The fundamental capability for ImageTexture and TextureTransform is
> not consistent for different players. This discrepancy is pretty astonishing.
> Example scene and documentation:
> BS Contact appears to be correct, or at least it matches the TextureTransform values given in the scene.
> Instant Reality, FreeWrl and OctagaVS match each other but looks quite different.
> Xj3D did not render the TextureTransform image.
> SwirlX3D did not render the scene (at least on a Windows 64-bit machine).
> Other players not tested, reports are welcome.
view3dscene displays the same result as Instant Reality, FreeWrl and
OctagaVS. Screenshot from view3dscene attached.
And, as far as I see, it's a bug of BS Contact (and a bug of this X3D
file, that probably was prepared to match BS Contact result, that
happens to be incorrect)... Other browsers are correct, IMHO. For
example, for Shape named TopSidewalk to appear correct (assuming that
"correct" means you want to see there the "depth..." markers), the
correct transformation is like this:
<TextureTransform scale='-1 1' translation='0 -0.121'/>
<!-- equivalent to above, as 1-0.121=0.879 and texture repeats -->
<TextureTransform scale='-1 1' translation='0 0.879'/>
while the model currently has
<TextureTransform scale='-1 1' translation='0 -0.899'/>
I don't know why -0.899 works in BS Contact like this... But looking at
the PNG file, and remembering how the default texture mapping on
IndexedFaceSet works (see X3D 3.2 spec "13.3.6 IndexedFaceSet" and
"18.2.3 Texture coordinates"), it follows that:
- By default (without <TextureTransform>) a shape TopSidewalk displays
the bottom of the texture.
- If you want to see the texture top (where the "depth" markers are),
you have to shift in Y by a negative value close to 0 (like -0.121) or
positive value close to 1 but still smaller than 1 (like 0.879 = 1 -
- If you shift by a negative value close to -1 but still larger than -1
(like the -0.899, used in current model) then you get a piece of texture
that doesn't contain what you wanted (not the "depth..." markers).
It's a little difficult to explain in words, but hopefully it will make
sense to you :) I imagine a window that cuts part of the texture,
"TextureTransform.translation" is like moving this window over the
texture. Remember that TextureTransform shifts the texture coordinates
(so it works in the opposite direction if you think about "shifting
texture image"; this is even noted explicitly in the spec at
TextureTransform, as "Note that these operations appear reversed when
viewed on the surface of geometry.").
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 100366 bytes
Desc: not available
More information about the X3D-Public