[X3D-Public] Announcement: view3dscene 3.8.0

Michalis Kamburelis michalis.kambi at gmail.com
Fri Jan 7 12:27:19 PST 2011


Joe D Williams wrote:
> OK, Michelis, Thanks for the response.
> I think I understand what you said.
> I have depended upon default texture mapping and also depended that the
> texture pixel stayed stuck to the same vertex when the mesh is moved
> under control of the joint or parent(s). I didn't think the mapping
> would be recomputed each frame, and that the initial mapping would stick
> until I actually changed it.

Ah, after reading this and seeing the screenshot, I understand the
problem. You want the texture mapping to stay stuck. But it's not how it
works, at least in view3dscene and InstantReality (so I'm not the only
one who implemented it this way :) I'd say this looks more like a bug in
BS Contact (possibly they calculate and store the tex coords in CPU, and
do it only once). The spec isn't clear about this, but I would say that
view3dscene and InstantReality behavior is more natural here. For tex
coord generation, you want the shape to "swim" through the texture. If
you want the texture to stay stuck, then assign explicit texture coords.

In my previous answer, I thought that you're aware that geometry "swims"
through the shape, and you only want the determination which axis is
largest / 2nd largest, for the sake of automatic texture mapping on
IndexedFaceSet, to be done only once. Looking at InstantReality, they
seem to do it like that, so I also changed view3dscene to follow it. You
can grab view3dscene binary from nightly builds
(http://michalis.ii.uni.wroc.pl/vrmlengine-snapshots/ ) and replace with
it the binary inside released view3dscene 3.8.0, to test :)

So the texture mapping on your JoeH-AnimKick0a.x3dv in view3dscene
behaves exactly like in InstantReality at least.

> The idea of me attempting a texture transform to try and chase the mesh
> around did not even enter my plans, ever, except for more realistic
> multitexture/lights/reflections/refractions/raytracing advanced stuff
> and even shaders, like for real tears.

I wasn't suggesting anything too involved. Simply

  texCoord TextureCoordinateGenerator { mode "COORD" }

inside IndexedFaceSet and

    textureTransform TextureTransform { rotation 1.57 }

inside Appearance give the similar effect as the default mapping.
However, the object "swims" through the texture --- I understand now
that this is not what you want.

Hm, so my only advice is: you have to use explicit texture coords to get
the result you desire. At least view3dscene and InstantReality require
it. I tried testing with other browsers: xj3d maps the texture in some
other different way (incompatible with both BS Contact and view3dscene /
InstantReality results) and FreeWRL doesn't animate humanoid at all.

Michalis



More information about the X3D-Public mailing list