[x3d-public] Specification editors mantis issues, PointProperties
Andreas Plesch
andreasplesch at gmail.com
Fri Sep 4 18:16:07 PDT 2020
Working next on sprite texturing for PointProperties, I found it
pretty straightforward to start to support textures of any kind since
the shader or shader generation needs to deal with those already. The
only difference to other geometry is to use gl_PointCoord as tex.
coord, rather than provided tex. coords. This is a simple
intensity-alpha 3x3 PixelTexture mixed with the Material color:
https://raw.githack.com/andreasplesch/x3dom/PointSetNormals/test/regression-suite/test/cases/points/pointset_archie_normal.html
CSS or PBR textures with normal and other nice maps should also work,
for example.
It looks like it is time to test a bit more and then merge with the
x3dom dev. branch.
Here is another test with 1.5 million points, adopted from
http://metagrid2.sv.vt.edu/~yansh93/catawba_blinn.html
https://raw.githack.com/andreasplesch/x3dom/PointSetNormals/test/regression-suite/test/cases/points/catawba50.html
Lidar surveys easily generate large point clouds like this. The
PointSet is actually much subsampled. I also discovered that the
original binary data has some interesting tail which may or may not be
junk from processing.
It was difficult to generate and deal with a very large xml file, so I
had to put the data in separate files and load via js. The final scene
is still xml (actually DOM) in memory, generated with a few lines of
js DOM manipulation.
x3dom has BufferGeometry for binary geometry data (used for glTF)
which becomes really necessary for these kind of datasets. As far as I
remember x3dv4 will not have an equivalent. Maybe I should check how
hard it would be to support PointProperties for BufferGeometry (which
can be points).
The test shows that vertex colors also work with shading and
PointProperties, after mixing in a white diffuseColor. I think this is
as expected since vertex colors used to be emissive. Actually, I am
changing my mind. I think vertex colors should be treated as diffuse
color (or base color for PBR) if normals are present. Let's see how
this looks in the shader generation for x3dom.
-Andreas
Andreas
On Thu, Sep 3, 2020 at 6:06 PM Andreas Plesch <andreasplesch at gmail.com> wrote:
>
> Since both x_ite and
>
> http://metagrid2.sv.vt.edu/~yansh93/archimedes_pp_normal.html
>
> use circles for point rendering, this x3dom draft implementation now
> also uses circles:
>
> https://raw.githack.com/andreasplesch/x3dom/PointSetNormals/test/regression-suite/test/cases/points/pointset_archie_normal.html
>
> Circles are only used for untextured points. For textured points, eg.
> sprites, the masking for circles will be omitted.
>
> Should the spec. require circles for untextured points ? They look
> better but perhaps such a requirement is too opinionated.
>
> -Andreas
>
> On Thu, Sep 3, 2020 at 4:33 PM Andreas Plesch <andreasplesch at gmail.com> wrote:
> >
> > I updated the implementation and the scene to reflect the latest
> > changes in the spec. draft:
> >
> > https://raw.githack.com/andreasplesch/x3dom/PointSetNormals/test/regression-suite/test/cases/points/pointset_archie_normal.html
> >
> > There are no visual differences.
> >
> > -Andreas
> >
> > On Thu, Sep 3, 2020 at 4:08 PM Andreas Plesch <andreasplesch at gmail.com> wrote:
> > >
> > > I had some time to refocus on PointProperties and found this note on
> > > spec. changes:
> > >
> > > > Date: Mon, 31 Aug 2020 10:33:40 -0700
> > > > From: Don Brutzman <brutzman at nps.edu>
> > > > To: Michalis Kamburelis <michalis.kambi at gmail.com>,
> > > > "puk at igraphics.com" <puk at igraphics.com>
> > > > Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
> > > > Subject: Re: [x3d-public] Specification editors mantis issues: PBR
> > > > review
> > > > ..
> > > > On 8/24/2020 12:48 PM, Michalis Kamburelis wrote:
> > > > >
> > > > > [...]
> > > > > Answers are inline below.
> > > > >
> > > > > Don Brutzman <brutzman at nps.edu <mailto:brutzman at nps.edu>> wrote:
> > > > >
> > > > > ---
> > > > > 2. Spec questions.
> > > > >
> > > > > a. see new inquiries today regarding PointProperties from Andreas and Holger.? Let's continue/contribute on that thread please.
> > > > >
> > > > > I do not see input from Holger in the PointProperties thread. If there's some communication off-list, maybe because someone forgot to use "Reply All", please resend it to the mailing list :)
> > > >
> > > > Separate thread found at
> > > >
> > > > [1] [x3d-public] PointProperties revisited
> > > > https://web3d.org/pipermail/x3d-public_web3d.org/2020-August/013447.html
> > > >
> > > > We agreed to remove 'colorMode' and updated both spec & Mantis 1252.
> > > >
> > > > We replaced final 2 paragraphs in 11.4.11 PointSet with
> > > >
> > > > "If the normal field of the PointSet node contains normal vectors, then points are rendered using the same lighting equations as the other geometry and can be lit. If the normal vectors are not provided, the points are rendered following the "unlit" lighting equations. If the PointSet is used with the Material node, and the normal vectors of points are not provided, the points shall be rendered as unlit, using the emissiveColor field of the Material node. In both cases, the points look can be customized using textures, Color, ColorRGBA, and UnlitMaterial nodes."
> > >
> > > That sounds great, and should cover all situations.
> > >
> > > I developed a first implementation of PointProperties with normals,
> > > ignoring textures for now:
> > >
> > > https://raw.githack.com/andreasplesch/x3dom/PointSetNormals/test/regression-suite/test/cases/points/pointset_archie_normal.html
> > >
> > > This is the archie example modified to use a diffuseColor material for
> > > shading with normals, and a non-default attenuation factor of "1 1 0",
> > > eg. with a linear distance dependence.
> > >
> > > The point size attenuation looks similar to how x_ite is scaling
> > > (x_ite ignores the normals currently), so that is good sign. Here is
> > > the x3d xml version:
> > >
> > > https://raw.githubusercontent.com/andreasplesch/x3dom/PointSetNormals/test/regression-suite/test/cases/points/pointset_archie_normal.x3d
> > >
> > > freeWrl 4.7 does not seem to do the size attenuation with distance,
> > > not sure if it is not implemented or another interpretation.
> > >
> > > Oh, I see that this draft
> > >
> > > https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html#PointProperties
> > >
> > > changed the attenuation field from MFFloat to SFVec3f, and the name
> > > from pointSizeAttenuation to just attenuation. Should be a quick fix.
> > >
> > > In the same spirit, I would also suggest renaming "pointSizeMinValue"
> > > to "pointSizeMin" or just "sizeMin" (we are in _Point_Properties,
> > > after all), and "pointSizeMaxValue" accordingly.
> > >
> > > -Andreas
> > >
> > > --
> > > Andreas Plesch
> > > Waltham, MA 02453
> >
> >
> >
> > --
> > Andreas Plesch
> > Waltham, MA 02453
>
>
>
> --
> Andreas Plesch
> Waltham, MA 02453
--
Andreas Plesch
Waltham, MA 02453
More information about the x3d-public
mailing list