CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] Paraview nice animation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 28, 2010, 14:25
Default Paraview nice animation
  #1
New Member
 
Join Date: Aug 2010
Posts: 3
Rep Power: 16
PyGloo is on a distinguished road
Hi all!

I'm not sure this is the good section to post in but the nearest from paraview was the paraFOAM section... or this one.


Background
I'm currently working on some kind of fluid motion problem. The whole preprocessing and solving parts went very well. And now it's time for postprocessing: the results are just great. Paraview calculated everything I needed and the pictures are nice to share with other people working on computer simulation.

But, soon I've got a meeting with my management team and sometime, a good picture is worth a thousand word. And a good animation is also worth a thousand picture (and even more if I want something smooth ). The thing is I don't find paraview's animation very appealing and I wanted to enhance a bit the quality. This is not something I need but that might be a real plus as a conclusion of the study to show very nice pictures.

Idea
The first idea was to generate .pov files for each of my timestep (I work in transient). Of course, I wouldn't do it manually so I wrote a very simple script: open the case, extract interesting parts and export as .pov.
Code:
#!/bin/bash
from paraview.simple import *
Solver_trace_case = EnSightReader( CaseFileName='somewhere' )

RenderView = GetRenderView()

RenderView.CameraPosition = [0.045000001788139343, 0.0, 0.30116827205415048]
RenderView.CameraClippingRange = [0.26830266634811484, 0.34327460236181229]
RenderView.CameraFocalPoint = [0.045000001788139343, 0.0, -3.92179936170578e-06]
RenderView.CenterOfRotation = [0.045000001788139343, 0.0, -3.92179936170578e-06]

ExtractBlock = ExtractBlock()

ExtractBlock.BlockIndices = [3, 6]

DataRepresentation = GetDisplayProperties(ExtractBlock)
DataRepresentation.Representation = 'Surface'
DataRepresentation.DiffuseColor = [0.51372549019607838, 0.51372549019607838, 0.51372549019607838]

RenderView.CameraParallelScale = 0.036363830255578364
RenderView.Background = [0.33333333333333331, 0.66666666666666663, 1.0]
RenderView.Background2 = [0.0, 0.0, 0.17254901960784313]
DataRepresentation.Representation = 'Surface'
DataRepresentation.EdgeColor = [0.0, 0.0, 0.50000762951094835]
RenderView.CameraParallelScale = 0.036363830255578364
exporters = servermanager.createModule("exporters")

for n in range(0,30):
    n=float(n)/2
    RenderView.ViewTime = n
    view=Render()
    exporters.VRMLExporter(View=view, FileName="somewhereelse/foo-%s.vrml" % str(int(n*10))).Write()
    exporters.POVExporter(View=view, FileName="somewhereelse/foo-%s.pov" % str(int(n*10))).Write()
I'm not an expert at all with paraview python API. (Please no comment on the evil ugly trick to set non integer view times , this was just to build a quick thing without losing time searching the doc for it).


The problem is that the exported file is not nice at all (when generated using povray foo0.pov +Q3 +A0.01 +AM2 +FN16 +H802 +W1053, which should be very nice). And if I try to generate the .pov file directly in paraview, I got something much nicer.

Just to explain a bit more what I mean for the .pov's files generated by the script: straight lines are not necessary straight anymore once generated. The geometry is completely broken. As for the pov's files generated in pv GUI, everything is OK (except that I won't open each single file manually to export them).

As you can see in the script, I also tried to export as vrml to be used in blender. The output is also really nice, but I don't know a single thing about blender scripting: once again, I won't process each file manually.

My last idea is to use animation capabilities of paraview but with manta renderer. But it's still compiling, so I won't have results very soon.

Questions
Did one of you already tried to get nicer pictures/animations from paraview?
Does anyone know why the povray exporter is apparently not working as it should?
Did someone already tried paraview with manta ?

Many thanks in advance for you answer!
PyGloo is offline   Reply With Quote

Old   November 4, 2010, 11:31
Default
  #2
New Member
 
Join Date: Aug 2010
Posts: 3
Rep Power: 16
PyGloo is on a distinguished road
Hi,
Just a little bump after some months. The issue is still not solved and your opinion about it might be really helpful.


And I have also another question: the povray exporter from vtk does not support the export of colors interpolated in paraview. I think I understood why, but do you know if there is a way to ask for such an interpolation with povray except by rewriting the file properly?

Thanks in advance.

Regards,
PyGloo
PyGloo is offline   Reply With Quote

Old   November 5, 2010, 00:47
Default
  #3
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 343
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
Are you using the paraview binaries from paraview.org ? If yes then try to compile it yourself. For example, I find that pdf files created with paraview from paraview.org are of poor quality. Mayavi does a much better job. You can also try mayavi for your animations as it also supports vtk files. Another option is Visit. Both of these are free softwares and support vtk. Please write here about your success so we can also learn from that.
praveen is offline   Reply With Quote

Old   November 5, 2010, 11:27
Default
  #4
New Member
 
Join Date: Aug 2010
Posts: 3
Rep Power: 16
PyGloo is on a distinguished road
Thanks for your answer.

I tried Debian binary from its repositories, openfoam's modified paraview and I also tried to compile it myself.

I tried my little script with all of them and the result is still poor.


As for mayavi and Visit, I will give them a try and tell you.
PyGloo is offline   Reply With Quote

Old   June 7, 2012, 13:34
Default
  #5
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
Quote:
Originally Posted by PyGloo View Post
Hi all!


Did one of you already tried to get nicer pictures/animations from paraview?
Don't know if this thread is still active or not, but why not try blender instead of povray? export as x3d, and then render it in blender. Gives very nice results!
cfdnewbie is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
specific animation with Paraview vitorspadetoventurin OpenFOAM Post-Processing 1 December 12, 2014 20:13
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 04:23
[OpenFOAM] Paraview 3.12 memory allocation problem while saving animation jgomez ParaView 17 September 14, 2013 18:03
Paraview Animation jignesh_thaker2007 OpenFOAM 3 February 18, 2012 07:36
Paraview 3.12 - How to compile with ffmpeg for animation tunkers OpenFOAM Installation 6 January 21, 2012 22:08


All times are GMT -4. The time now is 15:57.