[Paraview] one 3d model transparent color + one 3d model normal color for vrml

Sebastien Jourdain sebastien.jourdain at kitware.com
Tue Jun 12 16:37:53 EDT 2012


Which viewer did you used ?

On Tue, Jun 12, 2012 at 4:35 PM, Chris <chris.schweighofer at gmx.net> wrote:
> Okay I tried it and it does not work. :-( I tried it with transparency 0.1, 0.5 and 0.9.
> Maybe I also have to change another parameter?
>
> Thx,
> Chris
>
>> vi, vim, emacs, textedit, wordpad...
>>
>> On Tue, Jun 12, 2012 at 4:14 PM, Chris <chris.schweighofer at gmx.net> wrote:
>>> Yeah thanks that makes sense. :) Just one more question. Which program can I use to open the VRML script?
>>>
>>>
>>>
>>>> If you open the VRML file that you generated you will see inside
>>>> something like that:
>>>>
>>>> material Material {
>>>>   ambientIntensity 0
>>>>   diffuseColor 1 1 1
>>>>   specularColor 0 0 0
>>>>   shininess 0.0078125
>>>>   transparency 0
>>>> }
>>>>
>>>> just replace "transparency 0" by "transparency 0.5"
>>>>
>>>> Does that make sense to you now ?
>>>>
>>>> Seb
>>>>
>>>> On Tue, Jun 12, 2012 at 3:50 PM, Chris <chris.schweighofer at gmx.net> wrote:
>>>>> Hello Sebastien,
>>>>>
>>>>> what do you mean with edit a text file? Can you give an example?
>>>>>
>>>>> Thx,
>>>>> Chris
>>>>>
>>>>>> Can't you just edit a text file ? (meaning replacing the opacity
>>>>>> inside the VRML file itself by something else ?)
>>>>>>
>>>>>> Otherwise, you will have to edit the vtkVRMLExporter.cxx file... And
>>>>>> find why the opacity is not written properly...
>>>>>>
>>>>>> Seb
>>>>>>
>>>>>> On Tue, Jun 12, 2012 at 3:11 PM, Chris <chris.schweighofer at gmx.net> wrote:
>>>>>>> At the moment I installed it new and tried it on windows and mac. It´s not working. I also think there is a bug. VTK only saved the data by using a appended dataset. Anyway do you have probably an idea, how I can remove the bug?
>>>>>>>
>>>>>>> Thx,
>>>>>>> Chris
>>>>>>>
>>>>>>>> VTK format is not storing rendering information, but only data. In
>>>>>>>> VRML it is different. I believe it's a bug of the VRML exporter of VTK
>>>>>>>> (or it was not a feature of that exporter).
>>>>>>>>
>>>>>>>> Therefore, the only solution that I see is to either fix the bug or
>>>>>>>> change the opacity attribute in the VRML file manually.
>>>>>>>>
>>>>>>>> Seb
>>>>>>>>
>>>>>>>> On Tue, Jun 12, 2012 at 1:33 PM, Chris <chris.schweighofer at gmx.net> wrote:
>>>>>>>>> Hello Sebastien,
>>>>>>>>>
>>>>>>>>> thank you very much, I just realized that I can change the color if I click on the solid button.  For the style options like opacity I tried it to but it does not work to save these parameters neither with vtk nor with vrml files.
>>>>>>>>> Is there a trick how I can save them?
>>>>>>>>> What further possibility exists to modify simple the vrml file for opacity?
>>>>>>>>>
>>>>>>>>> Thx,
>>>>>>>>> Chris
>>>>>>>>>> Hello Chris,
>>>>>>>>>>
>>>>>>>>>> I don't understand how you can't choose any color that you want.
>>>>>>>>>> Basically on my Mac, I have access to the 16 Billions choices... Do
>>>>>>>>>> you need more ?
>>>>>>>>>> For the opacity, scroll down in the display tab and change the opacity slider.
>>>>>>>>>>
>>>>>>>>>> For the opacity in VRML, I don't know, but I think that should be the
>>>>>>>>>> case ? If not, you can simply fix the generated VRML.
>>>>>>>>>>
>>>>>>>>>> Seb
>>>>>>>>>>
>>>>>>>>>> On Tue, Jun 12, 2012 at 11:38 AM, Chris <chris.schweighofer at gmx.net> wrote:
>>>>>>>>>>> Hello Sebastien,
>>>>>>>>>>>
>>>>>>>>>>> thx for your help. You are right it works great with a solid color. I only would like to have a bigger selection for them. Cann´t I take a color table? Or can I import colors?
>>>>>>>>>>> I tried to add a scalar but the scalar disappears  after the export.
>>>>>>>>>>> Is there a opportunity to save the opacity as well in the vrml file?
>>>>>>>>>>>
>>>>>>>>>>> Have a good day,
>>>>>>>>>>> Chris
>>>>>>>>>>>
>>>>>>>>>>>> What you try to do is the most complex solution, in the case you
>>>>>>>>>>>> really need a single mesh node inside your VRML file.
>>>>>>>>>>>> If you don't need that, then the actions are load the files, set
>>>>>>>>>>>> colors, export and done.
>>>>>>>>>>>>
>>>>>>>>>>>> Seb
>>>>>>>>>>>>
>>>>>>>>>>>> Action 1: In the menu: File > Open + In the "Properties" tab click on "Apply
>>>>>>>>>>>> Action 2: To change the color, go in the "Display" tab and click on
>>>>>>>>>>>> "Color by" = "Solid Color", the "Set Solid Color..." => The color
>>>>>>>>>>>> apply to the object that is selected in the pipeline browser.
>>>>>>>>>>>> Action 3: In the menu: File > Export + choose the VRML format and you
>>>>>>>>>>>> should be done...
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Jun 11, 2012 at 6:31 PM, Chris <chris.schweighofer at gmx.net> wrote:
>>>>>>>>>>>>> Thx, I think it would be great in the way you described it. But I am still a
>>>>>>>>>>>>> beginner in Paraview and therefore it sounds a bit complicated for me.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I added the color filter, selected color by scalars and pressed the button
>>>>>>>>>>>>> edit color map. There I tried to adjust range, scalars, lookup tables (color
>>>>>>>>>>>>> space) and the opacity.
>>>>>>>>>>>>> Anyway the scalar does not change and still stays the same. I tried it now
>>>>>>>>>>>>> 50 times.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I would be really happy, if you could tell me what I did wrong?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Chris
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> What I try to say, is if you load all the files in ParaView and export
>>>>>>>>>>>>> the scene as VRML you will have a single VRML file the way you want.
>>>>>>>>>>>>> So I'm not sure why this solution doesn't fit your needs.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Seb
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Jun 11, 2012 at 1:51 PM, Christoph Schweigi
>>>>>>>>>>>>> <chris.schweighofer at gmx.net> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thx, I want to fuse two structures of radiologic datasets. Both are from
>>>>>>>>>>>>> brain vessels. The embeded model is the fluidic pattern (solid color) and
>>>>>>>>>>>>> the other outer model is the morphology (transparent with less opacity) one.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thx,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Chris
>>>>>>>>>>>>>
>>>>>>>>>>>>> Ps: I am currently texting from my phone but if u want I can give u
>>>>>>>>>>>>> afterwards a link with the datasets?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Am 11.06.2012 um 19:37 schrieb Sebastien Jourdain
>>>>>>>>>>>>> <sebastien.jourdain at kitware.com>:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> That's the tricker part, because your scalar + the lookup table will
>>>>>>>>>>>>>
>>>>>>>>>>>>> determine the color.
>>>>>>>>>>>>>
>>>>>>>>>>>>> That's also the reason why I asked you why you just export your scene
>>>>>>>>>>>>>
>>>>>>>>>>>>> in VRML with the correct settings color+opacity of all you objects ?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Do you need them to be defined as a single mesh inside the VRML ?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Seb
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Jun 11, 2012 at 1:29 PM, Christoph Schweigi
>>>>>>>>>>>>>
>>>>>>>>>>>>> <chris.schweighofer at gmx.net> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hello Sebastien,
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thx for the answer, but how could I add a color to each model if I merge it?
>>>>>>>>>>>>> Furthermore how could I make one model transparent and one a solid color?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thx, Chris
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Von meinem iPhone gesendet
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Am 11.06.2012 um 19:21 schrieb Sebastien Jourdain
>>>>>>>>>>>>> <sebastien.jourdain at kitware.com>:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> It seems that on of your dataset is a multi block. So before appending
>>>>>>>>>>>>>
>>>>>>>>>>>>> it you should merge those block in order to make a single dataset.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Then you should be able to append it.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Jun 11, 2012 at 10:50 AM, Chris <chris.schweighofer at gmx.net> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hello Sebastien,
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> thx for your answer. I tried to do so and tried to save it in a vrml.
>>>>>>>>>>>>>
>>>>>>>>>>>>> However I have troubles if I import the geometric structure from vtk with
>>>>>>>>>>>>>
>>>>>>>>>>>>> two colors or if I want to create a geometric structure with two colors.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> The colors stay always the same and if I want to do a appended geometry I
>>>>>>>>>>>>>
>>>>>>>>>>>>> only get an error message:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> ERROR: In
>>>>>>>>>>>>>
>>>>>>>>>>>>> /Users/partyd/Kitware/ParaView-3.8/src/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
>>>>>>>>>>>>>
>>>>>>>>>>>>> line 827
>>>>>>>>>>>>>
>>>>>>>>>>>>> vtkCompositeDataPipeline (0x30cacf10): Input for connection index 1 on input
>>>>>>>>>>>>>
>>>>>>>>>>>>> port index 0 for algorithm vtkAppendPolyData(0x3022e260) is of type
>>>>>>>>>>>>>
>>>>>>>>>>>>> vtkMultiBlockDataSet, but a vtkPolyData is required.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Please can you explain me why that happens?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thx,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Chris
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Am 11.06.2012 um 05:42 schrieb Sebastien Jourdain:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Chris,
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> If the point is to have the VRML to contains both, by loading the 2
>>>>>>>>>>>>>
>>>>>>>>>>>>> objects in the scene, exporting the scene will do the trick.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> If not that will be trickier but still doable. You will need to
>>>>>>>>>>>>>
>>>>>>>>>>>>> generate a given scalar across the 2 datasets and merge the geometry.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Then use your custom scalar to apply the right color and opacity
>>>>>>>>>>>>>
>>>>>>>>>>>>> across the whole geometry.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Seb
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Sun, Jun 10, 2012 at 1:17 PM, Chris <chris.schweighofer at gmx.net> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hello people,
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> I would like to know if it is possible to fuse two 3d models, one with a
>>>>>>>>>>>>>
>>>>>>>>>>>>> solid and one with a transparent color. This dataset should be afterwards
>>>>>>>>>>>>>
>>>>>>>>>>>>> saved within a vrml file for a rapid prototype printer.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Is this possible?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> How?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thx,
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Chris
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> 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://www.paraview.org/mailman/listinfo/paraview
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>
>>>>>>>>>>>>> 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://www.paraview.org/mailman/listinfo/paraview
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>
>>>>>>>>>>>>> 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://www.paraview.org/mailman/listinfo/paraview
>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>
>>>>>>>>>>>>> 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://www.paraview.org/mailman/listinfo/paraview
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> 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://www.paraview.org/mailman/listinfo/paraview
>>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> 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://www.paraview.org/mailman/listinfo/paraview
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> 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://www.paraview.org/mailman/listinfo/paraview
>>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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://www.paraview.org/mailman/listinfo/paraview
>>>
>
> _______________________________________________
> 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://www.paraview.org/mailman/listinfo/paraview


More information about the ParaView mailing list