diff options
author | Ton Roosendaal <ton@blender.org> | 2006-02-27 15:39:36 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-02-27 15:39:36 +0300 |
commit | f68b0ddb2a22034aab35adf4fd862a1da66938e8 (patch) | |
tree | fa23ec4e586b4918cd94cbd6a1399041b42c22b5 /source/blender/src/buttons_scene.c | |
parent | 534ee9e1907f07844417cc34b0189b5451321be5 (diff) |
Recoded Panorama rendering.
The old implementation was added quite hackish (talking about 10 yr ago).
You also had to make a small image slice, which was extended Xparts in
size. That also required to adjust the camera angle. Very clumsy.
Now; when enabling the Panorama option, it will automatically apply the
panorama effect on the vertically aligned tiles. You can just enable or
disable the "Pano" button, to get a subtle lens effect like this:
(without pano)
http://www.blender.org/bf/rt.jpg
(with pano)
http://www.blender.org/bf/rt1.jpg
For Panorama render, the minimum slice size has been hardcoded to be 8
pixels. The XParts button goes up to 512 to allow that. In practice,
rendering 64 slices will already give very good images for a wide angle
lens of 90 degrees, the curvature of straight lines then is equal to
a circle of 256 points.
Rendering a full 360 degree panorama you do by creating an extreme wide
angle camera. The theory says camera-lens 5 should do 360 degrees, but
for some reason my tests reveil it's 5.1... there's a rounding error
somewhere, maybe related to the clipping plane start? Will look at that
later. :)
Also note that for each Xpart slice, the entire database needs to be
rotated around camera to correct for panorama, on huge scenes that might
give some overhead.
Threaded render goes fine for Panorama too, but it can only render the
vertically aligned parts in parallel. For the next panorama slice it has
to wait for all threads of the current slice to be ready.
On reading old files, I convert the settings to match as closely as
possible the new situation.
Since I cannot bump up the version #, the code detects for old panorama
by checking for the image size. If image width is smaller than height, it
assumes it's an old file (only if Panoroma option was set).
Diffstat (limited to 'source/blender/src/buttons_scene.c')
-rw-r--r-- | source/blender/src/buttons_scene.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index a69e3fb32fa..7760d8390c3 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -790,7 +790,7 @@ void do_render_panels(unsigned short event) allqueue(REDRAWBUTSSCENE, 0); break; case B_PR_PANO: - G.scene->r.xsch= 36; + G.scene->r.xsch= 576; G.scene->r.ysch= 176; G.scene->r.xasp= 115; G.scene->r.yasp= 100; @@ -1290,7 +1290,7 @@ static void render_panel_render(void) uiBlockEndAlign(block); uiBlockBeginAlign(block); - uiDefButS(block, NUM,B_DIFF,"Xparts:", 369,46,95,29,&G.scene->r.xparts,2.0, 64.0, 0, 0, "Sets the number of horizontal parts to render image in (For panorama sets number of camera slices)"); + uiDefButS(block, NUM,B_DIFF,"Xparts:", 369,46,95,29,&G.scene->r.xparts,2.0, 512.0, 0, 0, "Sets the number of horizontal parts to render image in (For panorama sets number of camera slices)"); uiDefButS(block, NUM,B_DIFF,"Yparts:", 465,46,95,29,&G.scene->r.yparts,2.0, 64.0, 0, 0, "Sets the number of vertical parts to render image in"); uiBlockEndAlign(block); |