[x3d-public] Nurbs patch coloring

Andreas Plesch andreasplesch at gmail.com
Thu Jan 25 17:34:47 PST 2018


If 2x2 textures would work, it.may be possible to use PixelTextures which
could be constructed from the control point color information perhaps
pretty directly. Actually, such a PixelTexture may be more appropriate
 than a hypothetical controlColor MFColor field since the non control
vertices would have to be colorized by some interpolation in a texture
mapping like process anyways. But there may be an upper limit to the number
of textures.

Andreas


Message: 2
Date: Thu, 25 Jan 2018 14:32:52 +0300
From: Michail Vidiassov <master at iaas.msu.ru>
To: Michalis Kamburelis <michalis.kambi at gmail.com>
Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: Re: [x3d-public] (no subject)
Message-ID:
        <CALDha9N5xjS50GFSh=LmqkK6jkZVf12Osy2rwpN5mYDaW=56-w at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Dear Michalis,

On Thu, Jan 25, 2018 at 10:50 AM, Michalis Kamburelis
<michalis.kambi at gmail.com> wrote:
> 2018-01-24 13:25 GMT+01:00 Michail Vidiassov <master at iaas.msu.ru>:
>>
>> is it possible in X3D to store NURBS patches with vertex colours?

> In short: It is not possible, i.e. there's no field in the X3D
> specification to pass something like "color per control point" (like a
> Color or ColorRGBA node) to a NURBS surface, as far as I see.
>
> However, there are some solutions that you can use to "colorize" the
> NurbsPatchSurface:
>
> 1. You can apply a texture to NurbsPatchSurface. So you can draw your
> colors to an image, and apply them this way. NurbsPatchSurface
> automatically calculates sensible texture coordinates (or you can pass
> explicit "texCoord" field).
>
> 2. You can use shaders, like ComposedShader, to colorize your
> NurbsPatchSurface.

Thank you for the definitive answer.

In may case, first approach is not an option, since in case of
Asymptote coloured Bezier patches are output primitives, the
information on the colour palette used to assign colours to vertices
(if there was any) is long lost when data comes to output routines and
there are lots of patches, so making separate 2x2 texture for each
patch would result in unreasonable amount of textures.

Second approach contradicts declarative nature of X3D, making output
difficult to edit and integrate into other models, it may also become
viewer-dependent, since different viewers make different sets of
variables available to shaders.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180125/c03a9fb3/attachment.html>


More information about the x3d-public mailing list