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.<br>
<br clear="all">Thanks again,<br><br>David<br>
<br><br><div class="gmail_quote">On Mon, Jun 29, 2009 at 10:22 AM, Moreland, Kenneth <span dir="ltr"><<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;">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.<br>
<br>
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.<br>
<br>
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.<br>
<br>
-Ken<div><div></div><div class="h5"><br>
<br>
<br>
On 6/27/09 9:28 AM, "David Doria" <<a href="http://daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>> wrote:<br>
<br>
</div></div></span></font><div><div></div><div class="h5"><blockquote><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;">(Demo files are available here: <a href="http://www.rpi.edu/%7Edoriad/Cars/" target="_blank">http://www.rpi.edu/~doriad/Cars/</a> )<br>
<br>
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<br>
<br>
./CreateThumbnails.py --input=0.vtp --rep=Surface --output=python_0.png --campos=20 -20 5<br>
./CreateThumbnails.py --input=1.vtp --rep=Surface --output=python_1.png --campos=20 -20 5<br>
<br>
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<br>
<br>
./CreateThumbnails.py --input=1.vtp --rep=Surface --output=1test.png --campos=1 -1 .25<br>
<br>
(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. <br>
<br>
Any thoughts?<br>
<br>
Thanks,<br>
<br>
David<br>
<br>
</span></font></blockquote><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;"><br>
</span></font></div></div><font size="2"><font face="Consolas, Courier New, Courier"><span style="font-size: 10pt;"><br>
**** Kenneth Moreland<br>
*** Sandia National Laboratories<br>
*********** <br>
*** *** *** email: <a href="http://kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a><br>
** *** ** phone: (505) 844-8919<br>
*** web: <a href="http://www.cs.unm.edu/%7Ekmorel" target="_blank">http://www.cs.unm.edu/~kmorel</a><br>
</span></font></font><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;"><br>
</span></font>
</div>
</blockquote></div><br>