[Paraview] Discrepancy between paraview display and python rendering

David Doria daviddoria at gmail.com
Mon Jun 29 10:33:23 EDT 2009


Ah, I see - thanks Ken. I'm not sure what I thought ResetCamera was doing? I
guess it was just lingering from some example script that I had worked from.
As you suspected, the images of the cars are now the correct size in the
python renderings and they also match the Paraview renderings.

Thanks again,

David


On Mon, Jun 29, 2009 at 10:22 AM, Moreland, Kenneth <kmorel at sandia.gov>wrote:

>  From your description, I was expecting to see something dramatic, but
> this is pretty subtle.  Loading both geometries in ParaView, it looks like
> car 0 is slightly longer than car 1.  When you set the camera in ParaView
> directly, you see this.
>
> I think the problem with your script is that you are calling
> view.ResetCamera() after setting up the camera.  ResetCamera will dolly the
> camera to “fit” the geometry in the view.  So for the smaller car the camera
> will zoom in a bit to make its bounds fill roughly the same space as the
> larger car.  Consequently, the python-generated image of car 1 makes it look
> bigger.
>
> For the python-generated images, the cars are actually about the same size
> in the image.  I measured them both to be about 18 pixels from the left of
> the images and 31 pixels from the right.  Car 1 might look a bit bigger
> because its boxier shape fills its bounds more.
>
> -Ken
>
>
>
> On 6/27/09 9:28 AM, "David Doria" <daviddoria at gmail.com> wrote:
>
> (Demo files are available here: http://www.rpi.edu/~doriad/Cars/<http://www.rpi.edu/%7Edoriad/Cars/>)
>
> If I load 0.vtp and 1.vtp in paraview, set the camera focal point to
> (0,0,0), the camera position to (20, -20, 5), and the viewing angle to 45,
> the car in 0.vtp looks "bigger" than the car in 1.vtp. However, if I run the
> script CreateThumbnails.py (in the above link) with these commands
>
> ./CreateThumbnails.py --input=0.vtp --rep=Surface --output=python_0.png
> --campos=20 -20 5
> ./CreateThumbnails.py --input=1.vtp --rep=Surface --output=python_1.png
> --campos=20 -20 5
>
> in the resulting images car 1 looks bigger than car 0!! Is this some
> perspective projection illusion? Or am I missing a camera parameter in the
> script that is making it look different? I feel like I may be doing
> something wrong in the script because if I run this command
>
> ./CreateThumbnails.py --input=1.vtp --rep=Surface --output=1test.png
> --campos=1 -1 .25
>
> (the difference is that campos is scaled), the exact same image is produced
> (as python_1.png).  It seems like this one should be a zoomed in version as
> the camera should be very close to the car.
>
> Any thoughts?
>
> Thanks,
>
> David
>
>
>
>    ****      Kenneth Moreland
>     ***      Sandia National Laboratories
> ***********
> *** *** ***  email: kmorel at sandia.gov
> **  ***  **  phone: (505) 844-8919
>     ***      web:   http://www.cs.unm.edu/~kmorel<http://www.cs.unm.edu/%7Ekmorel>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090629/9c9bc813/attachment.htm>


More information about the ParaView mailing list