<div dir="ltr">Holger,<div>There are now 2 implementations of PTM.</div><div><br><div>I got a bit implemented in latest freewrl based on Kwan-Hee's (older freewrl) hacks.</div><div>I found the upVector handy, and notice it's not on the draft v4 specs fields for the TextureProjectorParallel</div><div>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.</div><div>- and I generalized that so I have 8 projectors, 16 texture descriptors, and 4 texture units.</div><div>-- with textureDescriptor being a single Texture from a MultiTexture (or if not multi-texture in the projector, then Texture 1:1 with TextureDescriptor)</div><div>- projector 1: m textureDescriptor m:1 sampler2D</div><div>? not sure my abstract indefinite shader loops will compile/run on gles2.1</div><div>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</div><div>Q. how did you reliably compute it for example rectangle2D has no reliable normals, solid=FALSE? how did you do it?</div><div><br></div><div>Thanks,</div><div>-Doug Sanden</div><div><br></div><div><div dir="ltr"><div>windows executable:</div><a href="https://sourceforge.net/projects/freewrl/files/freewrl-win32/4.0/" target="_blank">https://sourceforge.net/projects/freewrl/files/freewrl-win32/4.0/</a> <div>- desiktop x64 440.msi</div><div><br></div><div>source code > current develop branch:</div><div><a href="https://sourceforge.net/p/freewrl/git/ci/develop/tree/freex3d/src/lib/scenegraph/Component_PTM.c" target="_blank">https://sourceforge.net/p/freewrl/git/ci/develop/tree/freex3d/src/lib/scenegraph/Component_PTM.c</a> </div><div><a href="https://sourceforge.net/p/freewrl/git/ci/develop/tree/freex3d/src/lib/opengl/Compositing_Shaders.c" target="_blank">https://sourceforge.net/p/freewrl/git/ci/develop/tree/freex3d/src/lib/opengl/Compositing_Shaders.c</a><br></div><div>in #ifdef PROJTEX blocks:</div><div>vertex shader L.606 </div><div>frag shader L.1113</div><div><br></div><div>test files:</div><div><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana"><a href="http://dug9.users.sourceforge.net/web3d/tests/PTM" target="_blank">http://dug9.users.sourceforge.net/web3d/tests/PTM</a></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">screen shots:</p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana"><a href="http://dug9.users.sourceforge.net/web3d/tests/PTM/PTM_8modulate.jpg" target="_blank">http://dug9.users.sourceforge.net/web3d/tests/PTM/PTM_8modulate.jpg</a><br><a href="http://dug9.users.sourceforge.net/web3d/tests/PTM/PTM_corner.jpg" target="_blank">http://dug9.users.sourceforge.net/web3d/tests/PTM/PTM_corner.jpg</a><br><a href="http://dug9.users.sourceforge.net/web3d/tests/PTM/PTM_planes_parallel.jpg" target="_blank">http://dug9.users.sourceforge.net/web3d/tests/PTM/PTM_planes_parallel.jpg</a><br></p></div></div><div class="gmail-yj6qo gmail-ajU" style="outline:none;padding:10px 0px;width:22px;margin:2px 0px 0px"><br class="gmail-Apple-interchange-newline"></div></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 30, 2020 at 1:23 AM Holger Seelig <<a href="mailto:holger.seelig@googlemail.com">holger.seelig@googlemail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>I implemented Projective Texture Mapping exactly as described in</p>
<p><a href="http://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD1/Part01/components/ProjectiveTextureMapping.html" target="_blank">http://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD1/Part01/components/ProjectiveTextureMapping.html</a></p>
<p>there is a preview of PTM implementation at <br>
</p>
<p><a href="http://media.create3000.de/components/ProjectiveTextureMapping/TextureProjectorPerspective/example.html" target="_blank">http://media.create3000.de/components/ProjectiveTextureMapping/TextureProjectorPerspective/example.html</a></p>
<p>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.</p>
<p>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.<br>
</p>
<p>Holger</p>
<p><br>
</p>
<div>On 30.01.20 00:59, GPU Group wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Andreas - I like your Viewpiont-re-use ideas, if necessary
split viewpoint</div>
Viewpoint :: Camera
<div>Projector :: Camera</div>
<div>And yes - same orientation methods as Viewpoint would make
sense.</div>
<div>Holger what did you do?</div>
<div><br>
</div>
<div>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.</div>
<div>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.</div>
<div>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.</div>
<div>Holger what did you do?</div>
<div>-Doug</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2020 at 3:57
PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi
Michalis,<br>
<br>
I took the opportunity to look at<br>
<a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD1/Part01/components/ProjectiveTextureMapping.html" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD1/Part01/components/ProjectiveTextureMapping.html</a><br>
and some of the history.<br>
<br>
My main thought was why not reuse the existing, abstract
viewpoint<br>
nodes to define the projector characteristics. The projector
node<br>
fields just reiterate the viewpoint node fields, for the most
part.<br>
But probably there are enough differences since viewpoint
mixes camera<br>
and navigation options.<br>
<br>
Why not follow viewpoint and use orientation as a rotation
instead of<br>
direction and upVector ? Seems more consistent and simpler.<br>
<br>
The definition of the coordinate system for location/direction
seems<br>
to be missing. It is probably implied that it is the local
coordinate<br>
system.<br>
<br>
Overall, it feels strange to have a global projector to affect
all<br>
appearances by default but perhaps that is the most common
scenario.<br>
The term Texture Mapping rather implies that it is a way to
compute<br>
texture coordinates for a given texture, similar to<br>
TextureCoordinateGenerator, and on a similar level:<br>
ProjectiveTextureGenerator. DEF/USE would allow applying it to<br>
multiple Appearances easily.<br>
<br>
-Andreas<br>
<br>
On Mon, Jan 27, 2020 at 6:18 PM Michalis Kamburelis<br>
<<a href="mailto:michalis.kambi@gmail.com" target="_blank">michalis.kambi@gmail.com</a>>
wrote:<br>
><br>
> Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>>
wrote:<br>
> ><br>
> > x3dom has an extra explorationMode field which
restricts mouse function in examine/turntable mode.<br>
> > zoom, pan, rotate values restrict to only these.<br>
> > -zoom, -pan, -rotate disable these.<br>
> > The field tends to be quite useful.<br>
> ><br>
> > I think x-ite implemented Projective Texture
Mapping.<br>
><br>
> Good news we have an implementation of PTM.<br>
><br>
> I had some questions about how the Projective Texture
Mapping in X3D<br>
> v4 applies the texture -- what happens if the shape
already has a<br>
> ImageTexture, what happens if shape already has
MultiTexture etc. I<br>
> listed them on "TODO: Address how the projective
texturing in spec<br>
> affects existing textures" in<br>
> <a href="https://github.com/michaliskambi/x3d-tests/wiki/Clarify-%22Projective-texturing%22-component#todo-address-how-the-projective-texturing-in-spec-affects-existing-textures" rel="noreferrer" target="_blank">https://github.com/michaliskambi/x3d-tests/wiki/Clarify-%22Projective-texturing%22-component#todo-address-how-the-projective-texturing-in-spec-affects-existing-textures</a><br>
> . I'll test how X_ITE answered these questions.<br>
><br>
> Regards,<br>
> Michalis<br>
><br>
> ><br>
> > ---on the phone---<br>
> ><br>
> > On Mon, Jan 27, 2020, 3:00 PM <<a href="mailto:x3d-public-request@web3d.org" target="_blank">x3d-public-request@web3d.org</a>>
wrote:<br>
> >><br>
> >> Send x3d-public mailing list submissions to<br>
> >> <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
> >><br>
> >> To subscribe or unsubscribe via the World Wide
Web, visit<br>
> >> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
> >> or, via email, send a message with subject or
body 'help' to<br>
> >> <a href="mailto:x3d-public-request@web3d.org" target="_blank">x3d-public-request@web3d.org</a><br>
> >><br>
> >> You can reach the person managing the list at<br>
> >> <a href="mailto:x3d-public-owner@web3d.org" target="_blank">x3d-public-owner@web3d.org</a><br>
> >><br>
> >> When replying, please edit your Subject line so
it is more specific<br>
> >> than "Re: Contents of x3d-public digest..."<br>
> >><br>
> >><br>
> >> Today's Topics:<br>
> >><br>
> >> 1. Re: x3d v4 proposed changes > 2
opensource criteria > any<br>
> >> that are short (GPU Group)<br>
> >><br>
> >><br>
> >>
----------------------------------------------------------------------<br>
> >><br>
> >> Message: 1<br>
> >> Date: Mon, 27 Jan 2020 12:18:39 -0700<br>
> >> From: GPU Group <<a href="mailto:gpugroup@gmail.com" target="_blank">gpugroup@gmail.com</a>><br>
> >> To: X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
> >> Subject: Re: [x3d-public] x3d v4 proposed
changes > 2 opensource<br>
> >> criteria > any that are short<br>
> >> Message-ID:<br>
> >> <<a href="mailto:CAM2ogRfqXoH1duy9iGvX9BEmLFCpiLbYYO_HwMuR7HbYXkRvmg@mail.gmail.com" target="_blank">CAM2ogRfqXoH1duy9iGvX9BEmLFCpiLbYYO_HwMuR7HbYXkRvmg@mail.gmail.com</a>><br>
> >> Content-Type: text/plain; charset="utf-8"<br>
> >><br>
> >> INVENTORY<br>
> >> FREEWRL<br>
> >> * X3Dv4 Implementations<br>
> >> <a href="https://www.web3d.org/x3dv4-implementations" rel="noreferrer" target="_blank">https://www.web3d.org/x3dv4-implementations</a><br>
> >> 1) 43 Projective Texture Mapping<br>
> >> x freewrl does not implement, document is
mistaken<br>
> >> 2) 23.4.4 NavigationInfo > TURNTABLE<br>
> >> * freewrl implemented<br>
> >> (other freewrl navmodes and related not in v3.3:<br>
> >> DIST - explicit control over distance to pivot
point for examine, turntable<br>
> >> - touchpads don't need RMB<br>
> >> SHIFT - turns off sensors<br>
> >> HOVER - isOver mode (useful for touch pad -
allows triggering of isOver<br>
> >> only)<br>
> >> PEDAL - can drag 'floating cursor' in steps<br>
> >> SPHERICAL - like FLY: YAWPITCH except rotations
constrained to viewpoint<br>
> >> local axes)<br>
> >> subsets of FLY: YAWZ, XY, YAWPTICH,ROLL)<br>
> >> 3) GeoSpatial > GeoOrigin - freewrl still
allows in v3.3, never deprecated<br>
> >> in freewrl<br>
> >> 4) The rest freewrl has not implemented<br>
> >> /FREEWRL<br>
> >> Does this table miss anything?<br>
> >> /INVENTORY<br>
> >> -Doug Sanden<br>
> >> PS who's doing projective texture mapping?
Should start with that?<br>
> >><br>
> >><br>
> >> On Mon, Jan 27, 2020 at 11:59 AM GPU Group <<a href="mailto:gpugroup@gmail.com" target="_blank">gpugroup@gmail.com</a>> wrote:<br>
> >><br>
> >> > INVENTORY<br>
> >> > FREEWRL<br>
> >> > * X3Dv4 Implementations<br>
> >> > <a href="https://www.web3d.org/x3dv4-implementations" rel="noreferrer" target="_blank">https://www.web3d.org/x3dv4-implementations</a><br>
> >> > 1) 43 Projective Texture Mapping<br>
> >> > x freewrl does not implement, document is
mistaken<br>
> >> > 2) 23.4.4 NavigationInfo > TURNTABLE<br>
> >> > * freewrl implemented<br>
> >> > (other freewrl navmodes and related not in
v3.3:<br>
> >> > DIST - explicit control over distance to
pivot point for examine,<br>
> >> > turntable - touchpads don't need RMB<br>
> >> > SHIFT - turns off sensors<br>
> >> > HOVER - isOver mode (useful for touch pad -
allows triggering of isOver<br>
> >> > only)<br>
> >> > PEDAL - can drag 'floating cursor' in steps<br>
> >> > SPHERICAL - like FLY: YAWPITCH except
rotations constrained to viewpoint<br>
> >> > local axes)<br>
> >> > subsets of FLY: YAWZ, XY, YAWPTICH,ROLL)<br>
> >> > 3) GeoSpatial > GeoOrigin - freewrl
still allows in v3.3, never deprecated<br>
> >> > in freewrl<br>
> >> > 4) The rest freewrl has not implemented<br>
> >> > /FREEWRL<br>
> >> > Does this table miss anything?<br>
> >> > /INVENTORY<br>
> >> ><br>
> >> ><br>
> >> > On Mon, Jan 27, 2020 at 11:14 AM Don
Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br>
> >> ><br>
> >> >> Thanks for writing Doug.<br>
> >> >><br>
> >> >> On 1/27/2020 6:01 AM, GPU Group wrote:<br>
> >> >> > A rule of <a href="http://web3d.org" rel="noreferrer" target="_blank">web3d.org</a> <<a href="http://web3d.org" rel="noreferrer" target="_blank">http://web3d.org</a>> is that
changes to the spec<br>
> >> >> need a least 2 opensource
implementations.<br>
> >> >><br>
> >> >> * Web3D Standards Adoption Process<br>
> >> >> <a href="https://www.web3d.org/standards/adoption-process" rel="noreferrer" target="_blank">https://www.web3d.org/standards/adoption-process</a><br>
> >> >><br>
> >> >> 5.c. "Identify at least two independent
and interoperable implementations<br>
> >> >> (at least one should be open source)"<br>
> >> >><br>
> >> >> > Q. are there any proposed changes
that do not yet have 2 opensource<br>
> >> >> implementations?<br>
> >> >><br>
> >> >> Yes, plenty. We have not taken a
recent inventory of features yet, but<br>
> >> >> will be tracking that at<br>
> >> >><br>
> >> >> * X3Dv4 Implementations<br>
> >> >> <a href="https://www.web3d.org/x3dv4-implementations" rel="noreferrer" target="_blank">https://www.web3d.org/x3dv4-implementations</a><br>
> >> >><br>
> >> >> Our prominent open-source
implementations for X3Dv3.3 include FreeWrl,<br>
> >> >> X_ITE, X3DOM, Castle Game Engine. Soon
Xj3D will be back on the table as<br>
> >> >> well. There are also non-rendering
X3Dv4 implementations for Java,<br>
> >> >> JavaScript, Python, conversions and
validation. Not sure about Titania but<br>
> >> >> presumably yes. X3D-Editv4 is on the
horizon. Interestingly everything on<br>
> >> >> this list is open source.<br>
> >> >><br>
> >> >> Hoping that FreeWrl developers are keen
to keep their record-setting X3D<br>
> >> >> support accomplishments continuing! 8)<br>
> >> >><br>
> >> >> All feedback welcome, appreciate your
many efforts.<br>
> >> >><br>
> >> >> > Thanks,<br>
> >> >> > Doug Sanden<br>
> >> >> > -freewrl<br>
> >> >><br>
> >> >> all the best, Don<br>
> >> >> --<br>
> >> >> Don Brutzman Naval Postgraduate
School, Code USW/Br<br>
> >> >> <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
> >> >> Watkins 270, MOVES Institute, Monterey
CA 93943-5000 USA<br>
> >> >> +1.831.656.2149<br>
> >> >> X3D graphics, virtual worlds, navy
robotics<br>
> >> >> <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
> >> >><br>
> >> ><br>
> >> -------------- next part --------------<br>
> >> An HTML attachment was scrubbed...<br>
> >> URL: <<a href="http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200127/53a57192/attachment-0001.html" rel="noreferrer" target="_blank">http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200127/53a57192/attachment-0001.html</a>><br>
> >><br>
> >> ------------------------------<br>
> >><br>
> >> Subject: Digest Footer<br>
> >><br>
> >> _______________________________________________<br>
> >> x3d-public mailing list<br>
> >> <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
> >> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
> >><br>
> >><br>
> >> ------------------------------<br>
> >><br>
> >> End of x3d-public Digest, Vol 130, Issue 49<br>
> >> *******************************************<br>
> ><br>
> > _______________________________________________<br>
> > x3d-public mailing list<br>
> > <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
> > <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
<br>
<br>
<br>
-- <br>
Andreas Plesch<br>
Waltham, MA 02453<br>
<br>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
x3d-public mailing list
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a>
</pre>
</blockquote>
<pre cols="72">--
Holger Seelig
Digital Media Designer
Scheffelstraße 31a
04277 Leipzig
Germany
Cellular: +49 176 420 479 37
E-Mail: holger.seelig at <a href="http://create3000.de" target="_blank">create3000.de</a>
Web: <a href="http://create3000.de" target="_blank">http://create3000.de</a></pre>
</div>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div>