[EMAIL PROTECTED] wrote: > Hi there! > I was trying to port the HiResScreenShot to FBOs.. it works nicely until I > try to get a screenshot with an aspect ratio that is different from the FBO > dimensions. In that case, what I'm getting is a "stretched" image, as > TileCameraDecorator simply splits the original FBO camera in tiles without > touching anything else. > What I'm asking you is how can I achieve the right behaviour, so that if I > have > a 200x200 FBOViewport and I want a screenshot of 1024x200, the result is an > enlarged horizontal view and not a stretched 200x200 image :)
This is by design. Try rendering 1024x200 without FBO and aspect 1:1. Doing that, you should see the same effect, so there's no magic in the HiresScreenShot Code. It should be this way. If you want a enlarged horizontal view, i.e. one that has a different field-of-view horizontal/vertical, you have to set the aspect of the original PerspectiveCamera (or whatever) to give you that first. So, rendering a 5:1 aspect on a 200x200 gives you a very horisontally compressed image. (Unless you're showing it on a 200x200 screen that is 5 units wide and one unit high). Applying that to a 1200x200 viewport (with square pixels) ought to give you what you want. Can you test this without FBO? Note, I never tested the HRSS-code with non-uniform aspects when I wrote it, but if it does stretch the image as you say, then all is well and good. Simply adjust the aspect on the camera to adapt it to the stretched aspect of your image. Cheers, /Marcus ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
