[x3d-public] Nurbs patch coloring
Michail Vidiassov
master at iaas.msu.ru
Mon Apr 20 12:06:38 PDT 2020
Dear Andreas,
On Mon, Apr 20, 2020 at 5:16 PM Andreas Plesch <andreasplesch at gmail.com> wrote:
> I think the default texture coordinate for Nurbs surfaces may be
> already what you proposed. So I think NurbsColorCoordinate may boil
> down to constructing a texture image from the provided colors.
> Why do you think the color space nurbs interpolation approach may not
> be general enough ? Can you think about a Nurbs surface where this
> approach could not be used ?
NO I can not.
1) I do not know any use for any color interpolation beyond NURBS.
2) I do not know any use for any color interpolation with NURBS
parameters different from the parameters of geometry (so I see no need
in full-fledged NurbsColorCoordinate, but I am also not aware of how
NurbsTextureCoordinate is used).
3) there may be some potential use for "your" NURBS color
interpolation with the same parameters as geometry, but I need and see
immediate use for something much simpler, that confusing "linear
interpolation"
> I am not quite sure about how linear color interpolation would work. I
> think in uv space, for a given uv look up the closest control point
> colors in u and v, and linearly interpolate colors. Is that what you
> have in mind ?
No, no, NO!
I have in mind bilinear interpolation of 4 vertex colors of 4 corners.
color1*u*v+color2*(1-u)*v+color3*u*(1-v)+color4*(1-u)*(1-v).
It is what I achieve with your current code by giving internal control
points of a Bezier patch artificial colors.
> Just a few thoughts since I have to get back to other things:
Would you please add bilinear interpolation of colors to your code (or
even change the current NURBS color interpolation to bilinear) before
putting NURBS coloring on hold? It looks simpler than your current
scheme (for one not familiar with x3dom internals), it will allow
meaningful variable color on non-patch NURBS surfaces. And it is a
logical next step beyond single-color NURBS that, IMHO, is easy to
document and argue for inclusion in the next version of X3D standard
unless someone (not me) demands "more generality".
> Creative texture coordinate use is rather common in computer graphics.
My point was that they do not fit naturally into _some_ software architectures.
Sincerely, Michail
More information about the x3d-public
mailing list