From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Nov 23 2016 - 01:08:01 CST

Hi,
  From your description, it appears that the Blender version you are
using doesn't properly implement per-vertex color handling
for the IndexedTriangleStripSet node type.
I would not be surprised if that Blender version had the same issue with
many of the other indexed face / triangle node types that support
per-vertex colors. In 2015 there was apparently a significant update
to the Blender X3D parser, so if you've got an older Blender, I would
begin by checking a new build of Blender.

I can say that the VMD X3D export of the NewRibbon geometry has loaded
properly in commercial X3D viewers such as BS-Contact and others when I
last did extensive testing. At that time Blender didn't yet support X3D.

Here is the text from the X3D specification describing the proper
precedence for the per-vertex color "Color" nodes used for
indexed face sets vs. the diffuse color that is specified as part
of the material node:
  http://www.web3d.org/documents/specifications/19775-1/V3.2/Part01/components/rendering.html#Color

  "Color nodes are only used to specify multiple colours for a
   single geometric shape, such as colours for the faces or vertices of an
   IndexedFaceSet. A Material node is used to specify the overall material
   parameters of lit geometry. If both a Material node and a Color node are
   specified for a geometric shape, the colours shall replace the diffuse
   component of the material."

I would think that this is something that can be tested in Blender
using a very simple X3D test scene. I don't have time to construct
such a test presently, but I would assume that there are such test cases
available online.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Wed, Nov 23, 2016 at 07:19:29AM +0100, Jean Richelle wrote:
> Hello,
>
> Whatever the "Coloring Method" used for the "NewRibbons" "Drawing Method", it is rendered in blue by "X3D (XML) full specification" (when loaded, e.g., in Blender). E.g. if I use as "Coloring Method" "ColorID 4", the ribbon is shown in hello, but the .x3d file produced by the rendering method I found :
> <!-- MoleculeID: 1 ReprID: 0 Beginning Ribbons -->
> <Shape>
> <Appearance><Material ambientIntensity='0' diffuseColor='0 0 0.65' shininess='40' specularColor='0.5 0.5 0.5' transparency='0' /></Appearance>
> If I change diffuseColor='0 0 0.65' into diffuseColor='0 0.65 0.65', the ribbon will appear in cyan in Blender, no more in blue.
>
> Regards,
>
> Jean
>
> --
> Jean Richelle <jean.richelle_at_ulb.ac.be>
> Directeur, Centre de Culture Scientifique <http://www.ulb.ac.be/ccs>
> rue de Villers 227, B-6010 Charleroi
> Tél: +32 71 600 312 / +32 2 650 3587 - Fax: +32 71 600 305 - GSM: +32 474 560 502
>
>
>

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/