From: Jean Richelle (jean.richelle_at_ulb.ac.be)
Date: Fri Nov 25 2016 - 08:59:19 CST

Hi John,

Thank you very much for further testing the capacity of Blender.

I'll use Wavefront OBJ as exchange format from VMD to Blender.

Best regards,

Jean

> Le 25 nov. 2016 08:02, John Stone <johns_at_ks.uiuc.edu> a crit :
>
> Hi Jean,
> I have just downloaded and tested Blender 2.78a, and it definitely
> still has some problems with its X3D import. I would suggest that instead
> of using X3D, try exporting your VMD scene as a Wavefront OBJ file, and
> then import that into Blender. In my testing, Blender didn't properly load
> indexed face sets or triangle strips from the X3D scene, it displayed them
> with both incorrect color, and also without per-vertex surface normals.
> By comparison, I exported the same VMD scene as a Wavefront OBJ file and
> the surface normals and colors were correctly handled by Blender, so until
> Blender makes progress improving their X3D import, I would use Wavefront OBJ
> format instead.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Thu, Nov 24, 2016 at 05:04:44PM +0100, Jean Richelle wrote:
>> Hi,
>>
>> Thank you for your answer.
>>
>> I have one of the latest versions of Blender (2.77 - March 2016 ; the last one is 2.78a). I'm working on a MacBook Pro under 10.11.6
>>
>> I prepared X3D files of the same piece of protein with VMD (1.9.2) with Trace, Tube, Ribbons and NewRibbons as "Drawing Method" and "ColorID Method 7". After importing the .x3d files in Blender, the model for Trace, Tube and Ribbons appear colored in green, while the one with NewRibbons appears in blue.
>>
>> If you think that the test you are proposing is still necessary, I'll try to see if I can do it.
>>
>> Best regards,
>>
>> Jean
>>
>>> Le 23 nov. 2016 08:08, John Stone <johns_at_ks.uiuc.edu> a crit :
>>>
>>> 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
>>>> Tl: +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/
>>>
>>
>>
>> --
>> 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
>> Tl: +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/
>

--
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
Tl: +32 71 600 312 / +32 2 650 3587 - Fax: +32 71 600 305 - GSM: +32 474 560 502