<div dir="auto"><div>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.</div><div dir="auto"><div dir="auto"><br></div><div dir="auto">Andreas</div><div class="gmail_extra" dir="auto"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Message: 2<br>
Date: Thu, 25 Jan 2018 14:32:52 +0300<br>
From: Michail Vidiassov <<a href="mailto:master@iaas.msu.ru">master@iaas.msu.ru</a>><br>
To: Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com">michalis.kambi@gmail.com</a>><br>
Cc: X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>><br>
Subject: Re: [x3d-public] (no subject)<br>
Message-ID:<br>
        <CALDha9N5xjS50GFSh=<wbr>LmqkK6jkZVf12Osy2rwpN5mYDaW=<a href="mailto:56-w@mail.gmail.com">56<wbr>-w@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
Dear Michalis,<br>
<br>
On Thu, Jan 25, 2018 at 10:50 AM, Michalis Kamburelis<br>
<<a href="mailto:michalis.kambi@gmail.com">michalis.kambi@gmail.com</a>> wrote:<br>
> 2018-01-24 13:25 GMT+01:00 Michail Vidiassov <<a href="mailto:master@iaas.msu.ru">master@iaas.msu.ru</a>>:<br>
>><br>
>> is it possible in X3D to store NURBS patches with vertex colours?<br>
<br>
> In short: It is not possible, i.e. there's no field in the X3D<br>
> specification to pass something like "color per control point" (like a<br>
> Color or ColorRGBA node) to a NURBS surface, as far as I see.<br>
><br>
> However, there are some solutions that you can use to "colorize" the<br>
> NurbsPatchSurface:<br>
><br>
> 1. You can apply a texture to NurbsPatchSurface. So you can draw your<br>
> colors to an image, and apply them this way. NurbsPatchSurface<br>
> automatically calculates sensible texture coordinates (or you can pass<br>
> explicit "texCoord" field).<br>
><br>
> 2. You can use shaders, like ComposedShader, to colorize your<br>
> NurbsPatchSurface.<br>
<br>
Thank you for the definitive answer.<br>
<br>
In may case, first approach is not an option, since in case of<br>
Asymptote coloured Bezier patches are output primitives, the<br>
information on the colour palette used to assign colours to vertices<br>
(if there was any) is long lost when data comes to output routines and<br>
there are lots of patches, so making separate 2x2 texture for each<br>
patch would result in unreasonable amount of textures.<br>
<br>
Second approach contradicts declarative nature of X3D, making output<br>
difficult to edit and integrate into other models, it may also become<br>
viewer-dependent, since different viewers make different sets of<br>
variables available to shaders.<br><br></blockquote></div></div></div></div>