[Paraview] X3DExporter false mesh colouring?

Grothausmann, Roman Dr. grothausmann.roman at mh-hannover.de
Tue May 24 08:52:27 EDT 2016


Many, many thanks Utkarsh for that quick fix!
Yes, You are right, my VTK test was using point data, so the problem didn't appear.
Thanks again for the great support.

On 23/05/16 19:08, Utkarsh Ayachit wrote:
> Here's a fix for the same:
>
> https://gitlab.kitware.com/vtk/vtk/merge_requests/1517
>
> Utkarsh
>
> On Mon, May 23, 2016 at 11:42 AM, Utkarsh Ayachit
> <utkarsh.ayachit at kitware.com> wrote:
>> Ah okay. Looks like there's another bug with cell-data coloring and
>> x3d. I've spotted the bug (I think) and am working on a fix. Not sure
>> how this could have worked in VTK example, however. I'll send you a
>> patch shortly.
>>
>> On Mon, May 23, 2016 at 11:15 AM, Grothausmann, Roman Dr.
>> <grothausmann.roman at mh-hannover.de> wrote:
>>> Many thanks Utkarsh for Your quick reply.
>>> Attached is an example VTP (generated by
>>> https://github.com/romangrothausmann/FacetAnalyser/blob/master/demos/8faced-rhombic-dodecahedron_twinned_simp%2Bdef.pvsm)
>>> coloured with KAAMS cat. on FacetIds (cell data) and then exported as X3D
>>> from PV5. The PNG is a comparison view of PV and view3dscene.
>>> The WebGL output (from make test) is great:
>>> http://htmlpreview.github.io/?https://github.com/romangrothausmann/FacetAnalyser/blob/master/demos/8faced-rhombic-dodecahedron_twinned_simp%2Bdef.html
>>>
>>>
>>> On 23/05/16 16:10, Utkarsh Ayachit wrote:
>>>>
>>>> And same with categorical colors. I did notice, however, it fails when
>>>> coloring with "Field Data" arrays. Is that what you're seeing? That
>>>> I'd expected would fail in VTK too. That's indeed a missing feature in
>>>> the exporter.
>>>>
>>>> On Mon, May 23, 2016 at 10:06 AM, Utkarsh Ayachit
>>>> <utkarsh.ayachit at kitware.com> wrote:
>>>>>
>>>>> Roman,
>>>>>
>>>>> Can you post an example? When I tried the same with a simple sphere
>>>>> color by "Normals X", it seems to work as expected. I used
>>>>> "view3dscene" to view the X3d file.
>>>>>
>>>>> On Mon, May 23, 2016 at 7:26 AM, Grothausmann, Roman Dr.
>>>>> <grothausmann.roman at mh-hannover.de> wrote:
>>>>>>
>>>>>> Dear mailing list members,
>>>>>>
>>>>>>
>>>>>> When I export scenes to X3D then load the mesh into blender or a browser
>>>>>> the
>>>>>> mesh is colour wrong. The colours are there but apparently assigned to
>>>>>> random cells/vertices. This happens with either PV5 or PV4, especially
>>>>>> for
>>>>>> category colouring. When using e.g. WebGL exporter all is fine.
>>>>>> Is there anything to do special for exporting to X3D? When I use plain
>>>>>> VTK,
>>>>>> the exported colours seemed OK so far.
>>>>>>
>>>>>> Any help or hints are very much appreciated
>>>>>> Roman
>>>>>>
>>>>>>
>>>>>> On 04/12/14 15:34, Michael Nolde wrote:
>>>>>>>
>>>>>>>
>>>>>>> works perfectly, thank you!
>>>>>>>
>>>>>>> On 03.12.2014 19:49, Sebastien Jourdain wrote:
>>>>>>> View is not valid at the point you get it.
>>>>>>>
>>>>>>> from paraview.simple import *
>>>>>>> exporters=servermanager.createModule("exporters")
>>>>>>> source=Cone()
>>>>>>> Show()
>>>>>>> render=Render()
>>>>>>> x3dExporter=exporters.X3DExporter(FileName="foo.x3d")
>>>>>>> x3dExporter.SetView(render)
>>>>>>> x3dExporter.Write()
>>>>>>>
>>>>>>> On Wed, Dec 3, 2014 at 10:01 AM, Michael Nolde <__mnolde at gmx.net__>
>>>>>>> wrote:
>>>>>>> Dear mailing list members,
>>>>>>>
>>>>>>> I have some trouble exporting a scene to a X3D file via pvpython.
>>>>>>> I tried to execute to code found in
>>>>>>> __http://public.kitware.com/pipermail/paraview/2012-May/024924.html__
>>>>>>> (see below). It is executed without any errors, but no output file is
>>>>>>> created.
>>>>>>> My Paraview version is 4.0.1 64-bit (on a Ubuntu 14.04 machine).
>>>>>>> What I want to achieve is to convert .ply files to .x3d via pvpython.
>>>>>>> Could someone give me a hint?
>>>>>>>
>>>>>>> Thanks in advance,
>>>>>>> Michael
>>>>>>>
>>>>>>> from paraview.simple import *
>>>>>>> exporters=servermanager.createModule("exporters")
>>>>>>> source=Cone()
>>>>>>> view = GetActiveView()
>>>>>>> Show(view)
>>>>>>> render=Render()
>>>>>>> x3dExporter=exporters.X3DExporter(FileName="foo.x3d")
>>>>>>> x3dExporter.SetView(view)
>>>>>>> x3dExporter.Write()
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Powered by __www.kitware.com__
>>>>>>>
>>>>>>> Visit other Kitware open-source projects at
>>>>>>> __http://www.kitware.com/opensource/opensource.html__
>>>>>>>
>>>>>>> Please keep messages on-topic and check the ParaView Wiki at:
>>>>>>> __http://paraview.org/Wiki/ParaView__
>>>>>>>
>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>> __http://public.kitware.com/mailman/listinfo/paraview__
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Dr. Roman Grothausmann
>>>>>>
>>>>>> Tomographie und Digitale Bildverarbeitung
>>>>>> Tomography and Digital Image Analysis
>>>>>>
>>>>>> Institut für Funktionelle und Angewandte Anatomie, OE 4120
>>>>>> Medizinische Hochschule Hannover
>>>>>> Carl-Neuberg-Str. 1
>>>>>> D-30625 Hannover
>>>>>>
>>>>>> Tel. +49 511 532-2900
>>>>>> _______________________________________________
>>>>>> Powered by www.kitware.com
>>>>>>
>>>>>> Visit other Kitware open-source projects at
>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>
>>>>>> Please keep messages on-topic and check the ParaView Wiki at:
>>>>>> http://paraview.org/Wiki/ParaView
>>>>>>
>>>>>> Search the list archives at: http://markmail.org/search/?q=ParaView
>>>>>>
>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>> http://public.kitware.com/mailman/listinfo/paraview
>>>
>>>
>>> --
>>> Dr. Roman Grothausmann
>>>
>>> Tomographie und Digitale Bildverarbeitung
>>> Tomography and Digital Image Analysis
>>>
>>> Institut für Funktionelle und Angewandte Anatomie, OE 4120
>>> Medizinische Hochschule Hannover
>>> Carl-Neuberg-Str. 1
>>> D-30625 Hannover
>>>
>>> Tel. +49 511 532-2900

-- 
Dr. Roman Grothausmann

Tomographie und Digitale Bildverarbeitung
Tomography and Digital Image Analysis

Institut für Funktionelle und Angewandte Anatomie, OE 4120
Medizinische Hochschule Hannover
Carl-Neuberg-Str. 1
D-30625 Hannover

Tel. +49 511 532-2900


More information about the ParaView mailing list