[x3d-public] Nurbs patch coloring
Andreas Plesch
andreasplesch at gmail.com
Thu Apr 23 05:11:28 PDT 2020
Hi Joe,
if I understand correctly, NURBS could be valuable for HAnim because
it maintains smoothness even when control points change positions.
Let's set aside performance issues assuming for now that dynamic
retesselation is not necessary.
I think then the main difficulty can be identified as a kind of
inverse problem. We want to find a nurbs surface which approximates an
explicit mesh (from scanning, for example). That sounds like something
which can be computed. OpenCascade, for example, has algorithms which
reconstruct a surface (Bezier or Nurbs, I think) from points.
Reconstructing from triangles, I think, is hard. But in addition, we
want a find a surface which is suitable for animation. Changing
control points and or weights (of the nurbs knots) should approximate
other animation states of the explicit mesh, in some optimal way. That
sounds like a much harder problem. One approach may be to reconstruct
separately the two end points of an animation with the same
constraints on uv dimensions and other parameters. Then it may be
possible to find the intermediate control points which best
approximate the full animation. One could hope first that just a
linear interpolation of control points and perhaps weights would be
reasonable.
Overall, I think, this would be the job of a modeler tool. Let's say it exists.
Sorry, let me think aloud below:
The HAnim part would be about how to route the control points from an
interpolator to a nurbs used for a skin. Ah, but skins work by
transforming points. Let's assume then we have the appropriate
animation of transforms for control points.
HAnim uses a single set of points which can be transformed by the
joint transformations, the skincoords. Each joint then identifies
which points it affects by listing their indices. Moving to Nurbs,
nurbs do not use indices to identify control points. Control points
are just listed in order. I think that means that for HAnim, nurbs
would need a different data structure, more similar to IFS. The
control point field would become a coordinate node, and an additional
control index field would list the used coordinates from the node.
This should make it possible to use nurbs for skins in the existing
HAnim setup. Perhaps a new node IndexedNurbsPatchSurface. It may only
be useful for HAnim since generally control points would not be reused
for other nurbs ( although the recent discussion on patchworks of
small nurbs may motivate using a single larger set of control points
because it lets you reuse the same points along the borders between
patches, hm, sounds like an idea ).
I think nurb weights could not be animated by HAnim ( not sure if they
are input fields actually ) since it would require a channel in
addition to animating points by transformations.
Apologies again for the somewhat disjointed response, perhaps food for thought,
-Andreas
On Wed, Apr 22, 2020 at 5:51 PM Joseph D Williams <joedwil at earthlink.net> wrote:
>
> With all NURBS, please note the value in hanim where we may want some skin to be NURBS. How to animate (deform) skin in terms of skeleton driven or displacer driven animations where the animation target is one or more points of a target mesh that the animator needs to know in advance?
>
>
>
> Thanks,
>
> Joe
>
>
>
> From: Andreas Plesch
> Sent: Wednesday, April 22, 2020 9:43 AM
> To: Michail Vidiassov
> Cc: X3D Graphics public mailing list
> Subject: Re: [x3d-public] Nurbs patch coloring
>
>
>
> Right, the spec, at
>
>
>
> https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/lighting.html#Lightingmodel
>
>
>
> only says 'interpolated' but not how to interpolate.
>
>
>
> So Nurbs vertex coloring may not be well defined between control
>
> points. But I do think that if there is color for a control point,
>
> including an internal (non-cornerpoint) control point, it needs to
>
> used for points on the Nurbs surface close to that control point.
>
>
>
> -Andreas
>
>
>
> On Wed, Apr 22, 2020 at 12:25 PM Michail Vidiassov <master at iaas.msu.ru> wrote:
>
> >
>
> > Dear Andreas,
>
> >
>
> > you wrote:
>
> > - Not sure if x3dom deals well with RGBA vertex colors
>
> > - Viewer capabilities and conformance are important but secondary to
>
> > design and spec. decisions.
>
> >
>
> > Unless you know another magic trick to fix the RGB part or I have
>
> > missed something,
>
> > in x3dom vertex colors even on a simple Quad work differently,
>
> > depending from what corner point the quad starts:
>
> >
>
> > http://media.iaas.msu.ru/x3d_RGB_test.htm
>
> >
>
> > Other browsers (x_ite, Instant player, view3dscene) showed similar results.
>
> > "Somehow" looks to be the practical answer to the question of how
>
> > colors should vary across a vertex-colored square.
>
> > So worries about the way color should vary on a NURBS patch look
>
> > divorced from the current state of affairs.
>
> >
>
> > Sincerely, Michail
>
>
>
>
>
>
>
> --
>
> Andreas Plesch
>
> Waltham, MA 02453
>
>
>
> _______________________________________________
>
> x3d-public mailing list
>
> x3d-public at web3d.org
>
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
--
Andreas Plesch
Waltham, MA 02453
More information about the x3d-public
mailing list