[X3D-Public] [X3D] Invitation: Web3D Town Hall and X3D Interoperability Demonstration; NURBS, TextureTransform problems

Don Brutzman brutzman at nps.edu
Thu Jul 26 19:44:33 PDT 2012

wow this is great, many thanks Kambi!

you are exactly correct about the genesis of this scene, manually performed.

when time permits i will try your fix, check it in, report a bs contact bug, etc.

wondering, will you be at Web3D Conference or SIGGRAPH in LA?

can you participate in the interoperability session in the Web3D Town Hall,
or else (if not there) have someone else demonstrating view3dscene for you?

again thanks for your many impressive efforts.

On 7/22/2012 6:04 PM, Michalis Kamburelis wrote:> 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:
>> https://savage.nps.edu/Savage/Locations/MontereyPeninsulaCollege/PoolMontereyPeninsulaCollege.x3d
>> https://savage.nps.edu/Savage/Locations/MontereyPeninsulaCollege/PoolMontereyPeninsulaCollege.html
>> 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'/>
> or
>    <!-- 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 - 0.121).
> - 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.").
> Regards,
> Michalis

all the best, Don
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman

More information about the X3D-Public mailing list