[x3d-public] extra NavigationInfo modes, ptm

GPU Group gpugroup at gmail.com
Thu Feb 20 13:30:54 PST 2020


Holger,
There are now 2 implementations of PTM.

I got a bit implemented in latest freewrl based on Kwan-Hee's (older
freewrl) hacks.
I found the upVector handy, and notice it's not on the draft v4 specs
fields for the TextureProjectorParallel
I found I could have more projectors than texture units: if 2 or more
projectors (re-)use the same texture, then only one sampler2D is needed.
- and I generalized that so I have 8 projectors, 16 texture descriptors,
and 4 texture units.
-- with textureDescriptor being a single Texture from a MultiTexture (or if
not multi-texture in the projector, then Texture 1:1 with TextureDescriptor)
- projector 1: m textureDescriptor m:1 sampler2D
? not sure my abstract indefinite shader loops will compile/run on gles2.1
x freewrl doesn't reliably set GL_CULL_FACE from solid=true, and I don't
know how to backside culling without this, so I added an extension field to
the TextureProjectorxxx nodes SFBool backCull FALSE
Q. how did you reliably compute it for example rectangle2D has no reliable
normals, solid=FALSE? how did you do it?

Thanks,
-Doug Sanden

windows executable:
https://sourceforge.net/projects/freewrl/files/freewrl-win32/4.0/
- desiktop x64 440.msi

source code > current develop branch:
https://sourceforge.net/p/freewrl/git/ci/develop/tree/freex3d/src/lib/scenegraph/Component_PTM.c

https://sourceforge.net/p/freewrl/git/ci/develop/tree/freex3d/src/lib/opengl/Compositing_Shaders.c
in #ifdef PROJTEX blocks:
vertex shader L.606
frag shader L.1113

test files:

http://dug9.users.sourceforge.net/web3d/tests/PTM

screen shots:

http://dug9.users.sourceforge.net/web3d/tests/PTM/PTM_8modulate.jpg
http://dug9.users.sourceforge.net/web3d/tests/PTM/PTM_corner.jpg
http://dug9.users.sourceforge.net/web3d/tests/PTM/PTM_planes_parallel.jpg



On Thu, Jan 30, 2020 at 1:23 AM Holger Seelig <holger.seelig at googlemail.com>
wrote:

> I implemented Projective Texture Mapping exactly as described in
>
>
> http://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD1/Part01/components/ProjectiveTextureMapping.html
>
> there is a preview of PTM implementation at
>
>
> http://media.create3000.de/components/ProjectiveTextureMapping/TextureProjectorPerspective/example.html
>
> I think 'direction' and 'upVector' are a nice feature, because it is an
> easy way to get the texture always 'up'. The issue that the texture
> projector can be 'global' is more complicated to implement, because it
> requires some more sampler2D in the shader, and as everybody knows sampler
> are limited in the shader. The worst case is that there are only 8 samplers
> available, and I need already some samplers for Texture2D and Texture3D and
> shadows. Even in the best case I only support 2 global texture projectors,
> this means if you need more, than you have to use 'local' texture
> projectors.
>
> Another point which is not yet mentioned is what is with the backwarding
> polygons (where the dot product of the normal with the vector from the
> projectors location to the vertex is less than zero). I implemented that
> these polygons are not affected by the texture projector because it is an
> easy and cheap test, and it makes the projector more realistic.
>
> Holger
>
>
> On 30.01.20 00:59, GPU Group wrote:
>
> Andreas - I like your Viewpiont-re-use ideas, if necessary split viewpoint
> Viewpoint :: Camera
> Projector :: Camera
> And yes - same orientation methods as Viewpoint would make sense.
> Holger what did you do?
>
> I think because it's slow/busy shader code you wouldn't want it to apply
> universally - you'd want to pair it explicitly with whatever shapes are
> going to get it.
> Projector maybe implies the wrong thing. It's not like you are shooting
> rays from the projector and seeing what geom it htis. It should be the
> other way I think for sanity and efficiency - when you have geometry that's
> getting PTM then you run a special shader and give it the relative pose of
> the projector and (ortho or perspective) and construct a ray from your
> shape surface pixel back toward the projectors image plane - through the
> perspective center / focal point if perspective, or perpendicular to the
> image plane if ortho.
> The image plane is an infinite plane. And when your ray hits that plane
> you get an xy on the plane, and you see if its inside the image. If not,
> its a miss, else it's a hit, and you do a smapler2D on the image and do
> your modulate or replace or whatever.
> Holger what did you do?
> -Doug
>
>
>
> On Wed, Jan 29, 2020 at 3:57 PM Andreas Plesch <andreasplesch at gmail.com>
> wrote:
>
>> Hi Michalis,
>>
>> I took the opportunity to look at
>>
>> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD1/Part01/components/ProjectiveTextureMapping.html
>> and some of the history.
>>
>> My main thought was why not reuse the existing, abstract viewpoint
>> nodes to define the projector characteristics. The projector node
>> fields just reiterate the viewpoint node fields, for the most part.
>> But probably there are enough differences since viewpoint mixes camera
>> and navigation options.
>>
>> Why not follow viewpoint and use orientation as a rotation instead of
>> direction and upVector ? Seems more consistent and simpler.
>>
>> The definition of the coordinate system for location/direction seems
>> to be missing. It is probably implied that it is the local coordinate
>> system.
>>
>> Overall, it feels strange to have a global projector to affect all
>> appearances by default but perhaps that is the most common scenario.
>> The term Texture Mapping rather implies that it is a way to compute
>> texture coordinates for a given texture, similar to
>> TextureCoordinateGenerator, and on a similar level:
>> ProjectiveTextureGenerator. DEF/USE would allow applying it to
>> multiple Appearances easily.
>>
>> -Andreas
>>
>> On Mon, Jan 27, 2020 at 6:18 PM Michalis Kamburelis
>> <michalis.kambi at gmail.com> wrote:
>> >
>> > Andreas Plesch <andreasplesch at gmail.com> wrote:
>> > >
>> > > x3dom has an extra explorationMode field which restricts mouse
>> function in examine/turntable mode.
>> > > zoom, pan, rotate values restrict to only these.
>> > > -zoom, -pan, -rotate disable these.
>> > > The field tends to be quite useful.
>> > >
>> > > I think x-ite implemented Projective Texture Mapping.
>> >
>> > Good news we have an implementation of PTM.
>> >
>> > I had some questions about how the Projective Texture Mapping in X3D
>> > v4 applies the texture -- what happens if the shape already has a
>> > ImageTexture, what happens if shape already has MultiTexture etc. I
>> > listed them on "TODO: Address how the projective texturing in spec
>> > affects existing textures" in
>> >
>> https://github.com/michaliskambi/x3d-tests/wiki/Clarify-%22Projective-texturing%22-component#todo-address-how-the-projective-texturing-in-spec-affects-existing-textures
>> > . I'll test how X_ITE answered these questions.
>> >
>> > Regards,
>> > Michalis
>> >
>> > >
>> > > ---on the phone---
>> > >
>> > > On Mon, Jan 27, 2020, 3:00 PM <x3d-public-request at web3d.org> wrote:
>> > >>
>> > >> Send x3d-public mailing list submissions to
>> > >>         x3d-public at web3d.org
>> > >>
>> > >> To subscribe or unsubscribe via the World Wide Web, visit
>> > >>         http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>> > >> or, via email, send a message with subject or body 'help' to
>> > >>         x3d-public-request at web3d.org
>> > >>
>> > >> You can reach the person managing the list at
>> > >>         x3d-public-owner at web3d.org
>> > >>
>> > >> When replying, please edit your Subject line so it is more specific
>> > >> than "Re: Contents of x3d-public digest..."
>> > >>
>> > >>
>> > >> Today's Topics:
>> > >>
>> > >>    1. Re: x3d v4 proposed changes > 2 opensource criteria > any
>> > >>       that are short (GPU Group)
>> > >>
>> > >>
>> > >>
>> ----------------------------------------------------------------------
>> > >>
>> > >> Message: 1
>> > >> Date: Mon, 27 Jan 2020 12:18:39 -0700
>> > >> From: GPU Group <gpugroup at gmail.com>
>> > >> To: X3D Graphics public mailing list <x3d-public at web3d.org>
>> > >> Subject: Re: [x3d-public] x3d v4 proposed changes > 2 opensource
>> > >>         criteria > any that are short
>> > >> Message-ID:
>> > >>         <
>> CAM2ogRfqXoH1duy9iGvX9BEmLFCpiLbYYO_HwMuR7HbYXkRvmg at mail.gmail.com>
>> > >> Content-Type: text/plain; charset="utf-8"
>> > >>
>> > >> INVENTORY
>> > >> FREEWRL
>> > >> * X3Dv4 Implementations
>> > >>    https://www.web3d.org/x3dv4-implementations
>> > >> 1) 43 Projective Texture Mapping
>> > >> x freewrl does not implement, document is mistaken
>> > >> 2) 23.4.4 NavigationInfo > TURNTABLE
>> > >> * freewrl implemented
>> > >> (other freewrl navmodes and related not in v3.3:
>> > >> DIST - explicit control over distance to pivot point for examine,
>> turntable
>> > >> - touchpads don't need RMB
>> > >> SHIFT - turns off sensors
>> > >> HOVER - isOver mode (useful for touch pad - allows triggering of
>> isOver
>> > >> only)
>> > >> PEDAL - can drag 'floating cursor' in steps
>> > >> SPHERICAL - like FLY: YAWPITCH except rotations constrained to
>> viewpoint
>> > >> local axes)
>> > >> subsets of FLY: YAWZ, XY, YAWPTICH,ROLL)
>> > >> 3) GeoSpatial > GeoOrigin - freewrl still allows in v3.3, never
>> deprecated
>> > >> in freewrl
>> > >> 4) The rest freewrl has not implemented
>> > >> /FREEWRL
>> > >> Does this table miss anything?
>> > >> /INVENTORY
>> > >> -Doug Sanden
>> > >> PS who's doing projective texture mapping? Should start with that?
>> > >>
>> > >>
>> > >> On Mon, Jan 27, 2020 at 11:59 AM GPU Group <gpugroup at gmail.com>
>> wrote:
>> > >>
>> > >> > INVENTORY
>> > >> > FREEWRL
>> > >> > * X3Dv4 Implementations
>> > >> >    https://www.web3d.org/x3dv4-implementations
>> > >> > 1) 43 Projective Texture Mapping
>> > >> > x freewrl does not implement, document is mistaken
>> > >> > 2) 23.4.4 NavigationInfo > TURNTABLE
>> > >> > * freewrl implemented
>> > >> > (other freewrl navmodes and related not in v3.3:
>> > >> > DIST - explicit control over distance to pivot point for examine,
>> > >> > turntable - touchpads don't need RMB
>> > >> > SHIFT - turns off sensors
>> > >> > HOVER - isOver mode (useful for touch pad - allows triggering of
>> isOver
>> > >> > only)
>> > >> > PEDAL - can drag 'floating cursor' in steps
>> > >> > SPHERICAL - like FLY: YAWPITCH except rotations constrained to
>> viewpoint
>> > >> > local axes)
>> > >> > subsets of FLY: YAWZ, XY, YAWPTICH,ROLL)
>> > >> > 3) GeoSpatial > GeoOrigin - freewrl still allows in v3.3, never
>> deprecated
>> > >> > in freewrl
>> > >> > 4) The rest freewrl has not implemented
>> > >> > /FREEWRL
>> > >> > Does this table miss anything?
>> > >> > /INVENTORY
>> > >> >
>> > >> >
>> > >> > On Mon, Jan 27, 2020 at 11:14 AM Don Brutzman <brutzman at nps.edu>
>> wrote:
>> > >> >
>> > >> >> Thanks for writing Doug.
>> > >> >>
>> > >> >> On 1/27/2020 6:01 AM, GPU Group wrote:
>> > >> >> > A rule of web3d.org <http://web3d.org> is that changes to the
>> spec
>> > >> >> need a least 2 opensource implementations.
>> > >> >>
>> > >> >> * Web3D Standards Adoption Process
>> > >> >>    https://www.web3d.org/standards/adoption-process
>> > >> >>
>> > >> >> 5.c. "Identify at least two independent and interoperable
>> implementations
>> > >> >> (at least one should be open source)"
>> > >> >>
>> > >> >> > Q. are there any proposed changes that do not yet have 2
>> opensource
>> > >> >> implementations?
>> > >> >>
>> > >> >> Yes, plenty.  We have not taken a recent inventory of features
>> yet, but
>> > >> >> will be tracking that at
>> > >> >>
>> > >> >> * X3Dv4 Implementations
>> > >> >>    https://www.web3d.org/x3dv4-implementations
>> > >> >>
>> > >> >> Our prominent open-source implementations for X3Dv3.3 include
>> FreeWrl,
>> > >> >> X_ITE, X3DOM, Castle Game Engine.  Soon Xj3D will be back on the
>> table as
>> > >> >> well.  There are also non-rendering X3Dv4 implementations for
>> Java,
>> > >> >> JavaScript, Python, conversions and validation.  Not sure about
>> Titania but
>> > >> >> presumably yes.  X3D-Editv4 is on the horizon. Interestingly
>> everything on
>> > >> >> this list is open source.
>> > >> >>
>> > >> >> Hoping that FreeWrl developers are keen to keep their
>> record-setting X3D
>> > >> >> support accomplishments continuing!  8)
>> > >> >>
>> > >> >> All feedback welcome, appreciate your many efforts.
>> > >> >>
>> > >> >> > Thanks,
>> > >> >> > Doug Sanden
>> > >> >> > -freewrl
>> > >> >>
>> > >> >> 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
>> > >> >>
>> > >> >
>> > >> -------------- next part --------------
>> > >> An HTML attachment was scrubbed...
>> > >> URL: <
>> http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200127/53a57192/attachment-0001.html
>> >
>> > >>
>> > >> ------------------------------
>> > >>
>> > >> Subject: Digest Footer
>> > >>
>> > >> _______________________________________________
>> > >> x3d-public mailing list
>> > >> x3d-public at web3d.org
>> > >> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>> > >>
>> > >>
>> > >> ------------------------------
>> > >>
>> > >> End of x3d-public Digest, Vol 130, Issue 49
>> > >> *******************************************
>> > >
>> > > _______________________________________________
>> > > x3d-public mailing list
>> > > x3d-public at web3d.org
>> > > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
>>
>>
>> --
>> Andreas Plesch
>> Waltham, MA 02453
>>
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
>
> _______________________________________________
> x3d-public mailing listx3d-public at web3d.orghttp://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
> --
> Holger Seelig
> Digital Media Designer
>
> Scheffelstraße 31a
> 04277 Leipzig
> Germany
>
> Cellular: +49 176 420 479 37
> E-Mail:   holger.seelig at create3000.de
> Web:      http://create3000.de
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200220/4d79e2c3/attachment-0001.html>


More information about the x3d-public mailing list