2012-05-07 10:53:09 +00:00
|
|
|
/*
|
|
|
|
* Parts adapted from Open Shading Language with this license:
|
|
|
|
*
|
|
|
|
* Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al.
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Modifications Copyright 2011, Blender Foundation.
|
2018-07-06 10:17:58 +02:00
|
|
|
*
|
2012-05-07 10:53:09 +00:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions are
|
|
|
|
* met:
|
|
|
|
* * Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* * Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* * Neither the name of Sony Pictures Imageworks nor the names of its
|
|
|
|
* contributors may be used to endorse or promote products derived from
|
|
|
|
* this software without specific prior written permission.
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2012-06-09 17:22:52 +00:00
|
|
|
*/
|
2012-05-07 10:53:09 +00:00
|
|
|
|
Cycles: merge of cycles-x branch, a major update to the renderer
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20 17:59:20 +02:00
|
|
|
#pragma once
|
2012-05-07 10:53:09 +00:00
|
|
|
|
|
|
|
CCL_NAMESPACE_BEGIN
|
|
|
|
|
2021-06-24 15:56:58 +10:00
|
|
|
/* Spherical coordinates <-> Cartesian direction. */
|
2012-05-07 10:53:09 +00:00
|
|
|
|
2013-11-16 00:17:10 +01:00
|
|
|
ccl_device float2 direction_to_spherical(float3 dir)
|
2012-05-07 10:53:09 +00:00
|
|
|
{
|
2014-04-17 14:49:57 +02:00
|
|
|
float theta = safe_acosf(dir.z);
|
2012-05-07 10:53:09 +00:00
|
|
|
float phi = atan2f(dir.x, dir.y);
|
|
|
|
|
|
|
|
return make_float2(theta, phi);
|
|
|
|
}
|
|
|
|
|
2013-11-16 00:17:10 +01:00
|
|
|
ccl_device float3 spherical_to_direction(float theta, float phi)
|
2012-05-07 10:53:09 +00:00
|
|
|
{
|
2016-03-24 15:00:09 +01:00
|
|
|
float sin_theta = sinf(theta);
|
|
|
|
return make_float3(sin_theta * cosf(phi), sin_theta * sinf(phi), cosf(theta));
|
2012-05-07 10:53:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Equirectangular coordinates <-> Cartesian direction */
|
|
|
|
|
2015-01-14 23:14:45 +05:00
|
|
|
ccl_device float2 direction_to_equirectangular_range(float3 dir, float4 range)
|
2012-05-07 10:53:09 +00:00
|
|
|
{
|
2017-05-07 14:40:58 +02:00
|
|
|
if (is_zero(dir))
|
2021-02-17 01:47:18 +01:00
|
|
|
return zero_float2();
|
2017-05-07 14:40:58 +02:00
|
|
|
|
2015-01-14 23:14:45 +05:00
|
|
|
float u = (atan2f(dir.y, dir.x) - range.y) / range.x;
|
|
|
|
float v = (acosf(dir.z / len(dir)) - range.w) / range.z;
|
2012-05-07 10:53:09 +00:00
|
|
|
|
|
|
|
return make_float2(u, v);
|
|
|
|
}
|
|
|
|
|
2015-01-14 23:14:45 +05:00
|
|
|
ccl_device float3 equirectangular_range_to_direction(float u, float v, float4 range)
|
2012-05-07 10:53:09 +00:00
|
|
|
{
|
2015-01-14 23:14:45 +05:00
|
|
|
float phi = range.x * u + range.y;
|
|
|
|
float theta = range.z * v + range.w;
|
2016-03-24 15:00:09 +01:00
|
|
|
float sin_theta = sinf(theta);
|
|
|
|
return make_float3(sin_theta * cosf(phi), sin_theta * sinf(phi), cosf(theta));
|
2012-05-07 10:53:09 +00:00
|
|
|
}
|
|
|
|
|
2015-01-14 23:14:45 +05:00
|
|
|
ccl_device float2 direction_to_equirectangular(float3 dir)
|
|
|
|
{
|
2015-01-15 21:21:07 +05:00
|
|
|
return direction_to_equirectangular_range(dir, make_float4(-M_2PI_F, M_PI_F, -M_PI_F, M_PI_F));
|
2015-01-14 23:14:45 +05:00
|
|
|
}
|
|
|
|
|
|
|
|
ccl_device float3 equirectangular_to_direction(float u, float v)
|
|
|
|
{
|
2015-01-15 21:21:07 +05:00
|
|
|
return equirectangular_range_to_direction(u, v, make_float4(-M_2PI_F, M_PI_F, -M_PI_F, M_PI_F));
|
2015-01-14 23:14:45 +05:00
|
|
|
}
|
|
|
|
|
2012-05-07 16:51:55 +00:00
|
|
|
/* Fisheye <-> Cartesian direction */
|
2012-05-07 10:53:09 +00:00
|
|
|
|
2013-11-16 00:17:10 +01:00
|
|
|
ccl_device float2 direction_to_fisheye(float3 dir, float fov)
|
2012-05-07 10:53:09 +00:00
|
|
|
{
|
2012-05-28 19:21:13 +00:00
|
|
|
float r = atan2f(sqrtf(dir.y * dir.y + dir.z * dir.z), dir.x) / fov;
|
|
|
|
float phi = atan2f(dir.z, dir.y);
|
2012-05-07 10:53:09 +00:00
|
|
|
|
2012-05-28 19:21:13 +00:00
|
|
|
float u = r * cosf(phi) + 0.5f;
|
|
|
|
float v = r * sinf(phi) + 0.5f;
|
2012-05-07 10:53:09 +00:00
|
|
|
|
|
|
|
return make_float2(u, v);
|
|
|
|
}
|
|
|
|
|
2013-11-16 00:17:10 +01:00
|
|
|
ccl_device float3 fisheye_to_direction(float u, float v, float fov)
|
2012-05-07 10:53:09 +00:00
|
|
|
{
|
|
|
|
u = (u - 0.5f) * 2.0f;
|
|
|
|
v = (v - 0.5f) * 2.0f;
|
|
|
|
|
2012-05-28 19:21:13 +00:00
|
|
|
float r = sqrtf(u * u + v * v);
|
2012-05-07 10:53:09 +00:00
|
|
|
|
|
|
|
if (r > 1.0f)
|
2021-02-17 01:47:18 +01:00
|
|
|
return zero_float3();
|
2012-05-07 10:53:09 +00:00
|
|
|
|
2014-04-17 14:49:57 +02:00
|
|
|
float phi = safe_acosf((r != 0.0f) ? u / r : 0.0f);
|
2012-11-09 09:11:24 +00:00
|
|
|
float theta = r * fov * 0.5f;
|
2012-05-07 10:53:09 +00:00
|
|
|
|
|
|
|
if (v < 0.0f)
|
|
|
|
phi = -phi;
|
|
|
|
|
|
|
|
return make_float3(cosf(theta), -cosf(phi) * sinf(theta), sinf(phi) * sinf(theta));
|
|
|
|
}
|
|
|
|
|
2013-11-16 00:17:10 +01:00
|
|
|
ccl_device float2 direction_to_fisheye_equisolid(float3 dir, float lens, float width, float height)
|
2012-05-07 10:53:09 +00:00
|
|
|
{
|
2014-04-17 14:49:57 +02:00
|
|
|
float theta = safe_acosf(dir.x);
|
2012-05-07 17:22:13 +00:00
|
|
|
float r = 2.0f * lens * sinf(theta * 0.5f);
|
2012-05-07 16:51:55 +00:00
|
|
|
float phi = atan2f(dir.z, dir.y);
|
|
|
|
|
|
|
|
float u = r * cosf(phi) / width + 0.5f;
|
|
|
|
float v = r * sinf(phi) / height + 0.5f;
|
2012-05-07 10:53:09 +00:00
|
|
|
|
|
|
|
return make_float2(u, v);
|
|
|
|
}
|
|
|
|
|
2016-08-01 15:40:46 +02:00
|
|
|
ccl_device_inline float3
|
|
|
|
fisheye_equisolid_to_direction(float u, float v, float lens, float fov, float width, float height)
|
2012-05-07 10:53:09 +00:00
|
|
|
{
|
|
|
|
u = (u - 0.5f) * width;
|
|
|
|
v = (v - 0.5f) * height;
|
|
|
|
|
|
|
|
float rmax = 2.0f * lens * sinf(fov * 0.25f);
|
2012-05-28 19:21:13 +00:00
|
|
|
float r = sqrtf(u * u + v * v);
|
2012-05-07 10:53:09 +00:00
|
|
|
|
|
|
|
if (r > rmax)
|
2021-02-17 01:47:18 +01:00
|
|
|
return zero_float3();
|
2012-05-07 10:53:09 +00:00
|
|
|
|
2014-04-17 14:49:57 +02:00
|
|
|
float phi = safe_acosf((r != 0.0f) ? u / r : 0.0f);
|
2012-05-07 10:53:09 +00:00
|
|
|
float theta = 2.0f * asinf(r / (2.0f * lens));
|
|
|
|
|
|
|
|
if (v < 0.0f)
|
|
|
|
phi = -phi;
|
|
|
|
|
|
|
|
return make_float3(cosf(theta), -cosf(phi) * sinf(theta), sinf(phi) * sinf(theta));
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Mirror Ball <-> Cartesion direction */
|
|
|
|
|
2013-11-16 00:17:10 +01:00
|
|
|
ccl_device float3 mirrorball_to_direction(float u, float v)
|
2012-05-07 10:53:09 +00:00
|
|
|
{
|
|
|
|
/* point on sphere */
|
|
|
|
float3 dir;
|
|
|
|
|
|
|
|
dir.x = 2.0f * u - 1.0f;
|
|
|
|
dir.z = 2.0f * v - 1.0f;
|
2015-04-25 23:49:17 +02:00
|
|
|
|
|
|
|
if (dir.x * dir.x + dir.z * dir.z > 1.0f)
|
2021-02-17 01:47:18 +01:00
|
|
|
return zero_float3();
|
2015-04-25 23:49:17 +02:00
|
|
|
|
2012-05-28 19:21:13 +00:00
|
|
|
dir.y = -sqrtf(max(1.0f - dir.x * dir.x - dir.z * dir.z, 0.0f));
|
2012-05-07 10:53:09 +00:00
|
|
|
|
|
|
|
/* reflection */
|
|
|
|
float3 I = make_float3(0.0f, -1.0f, 0.0f);
|
|
|
|
|
|
|
|
return 2.0f * dot(dir, I) * dir - I;
|
|
|
|
}
|
|
|
|
|
2013-11-16 00:17:10 +01:00
|
|
|
ccl_device float2 direction_to_mirrorball(float3 dir)
|
2012-05-07 10:53:09 +00:00
|
|
|
{
|
|
|
|
/* inverse of mirrorball_to_direction */
|
|
|
|
dir.y -= 1.0f;
|
|
|
|
|
2012-05-28 19:21:13 +00:00
|
|
|
float div = 2.0f * sqrtf(max(-0.5f * dir.y, 0.0f));
|
2012-05-07 10:53:09 +00:00
|
|
|
if (div > 0.0f)
|
|
|
|
dir /= div;
|
|
|
|
|
|
|
|
float u = 0.5f * (dir.x + 1.0f);
|
|
|
|
float v = 0.5f * (dir.z + 1.0f);
|
|
|
|
|
|
|
|
return make_float2(u, v);
|
|
|
|
}
|
|
|
|
|
2018-01-12 02:14:27 +01:00
|
|
|
ccl_device_inline float3 panorama_to_direction(ccl_constant KernelCamera *cam, float u, float v)
|
2012-05-07 10:53:09 +00:00
|
|
|
{
|
2018-01-12 02:14:27 +01:00
|
|
|
switch (cam->panorama_type) {
|
2012-05-07 10:53:09 +00:00
|
|
|
case PANORAMA_EQUIRECTANGULAR:
|
2018-01-12 02:14:27 +01:00
|
|
|
return equirectangular_range_to_direction(u, v, cam->equirectangular_range);
|
2015-04-25 23:49:17 +02:00
|
|
|
case PANORAMA_MIRRORBALL:
|
|
|
|
return mirrorball_to_direction(u, v);
|
2012-05-07 10:53:09 +00:00
|
|
|
case PANORAMA_FISHEYE_EQUIDISTANT:
|
2018-01-12 02:14:27 +01:00
|
|
|
return fisheye_to_direction(u, v, cam->fisheye_fov);
|
2012-05-07 10:53:09 +00:00
|
|
|
case PANORAMA_FISHEYE_EQUISOLID:
|
|
|
|
default:
|
2018-01-12 02:14:27 +01:00
|
|
|
return fisheye_equisolid_to_direction(
|
|
|
|
u, v, cam->fisheye_lens, cam->fisheye_fov, cam->sensorwidth, cam->sensorheight);
|
2012-05-07 10:53:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-12 02:14:27 +01:00
|
|
|
ccl_device_inline float2 direction_to_panorama(ccl_constant KernelCamera *cam, float3 dir)
|
2012-05-07 10:53:09 +00:00
|
|
|
{
|
2018-01-12 02:14:27 +01:00
|
|
|
switch (cam->panorama_type) {
|
2012-05-07 10:53:09 +00:00
|
|
|
case PANORAMA_EQUIRECTANGULAR:
|
2018-01-12 02:14:27 +01:00
|
|
|
return direction_to_equirectangular_range(dir, cam->equirectangular_range);
|
2015-04-25 23:49:17 +02:00
|
|
|
case PANORAMA_MIRRORBALL:
|
|
|
|
return direction_to_mirrorball(dir);
|
2012-05-07 10:53:09 +00:00
|
|
|
case PANORAMA_FISHEYE_EQUIDISTANT:
|
2018-01-12 02:14:27 +01:00
|
|
|
return direction_to_fisheye(dir, cam->fisheye_fov);
|
2012-05-07 10:53:09 +00:00
|
|
|
case PANORAMA_FISHEYE_EQUISOLID:
|
|
|
|
default:
|
2018-01-12 02:14:27 +01:00
|
|
|
return direction_to_fisheye_equisolid(
|
|
|
|
dir, cam->fisheye_lens, cam->sensorwidth, cam->sensorheight);
|
2012-05-07 10:53:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-12 02:14:27 +01:00
|
|
|
ccl_device_inline void spherical_stereo_transform(ccl_constant KernelCamera *cam,
|
Cycles: Kernel address space changes for MSL
This is the first of a sequence of changes to support compiling Cycles kernels as MSL (Metal Shading Language) in preparation for a Metal GPU device implementation.
MSL requires that all pointer types be declared with explicit address space attributes (device, thread, etc...). There is already precedent for this with Cycles' address space macros (ccl_global, ccl_private, etc...), therefore the first step of MSL-enablement is to apply these consistently. Line-for-line this represents the largest change required to enable MSL. Applying this change first will simplify future patches as well as offering the emergent benefit of enhanced descriptiveness.
The vast majority of deltas in this patch fall into one of two cases:
- Ensuring ccl_private is specified for thread-local pointer types
- Ensuring ccl_global is specified for device-wide pointer types
Additionally, the ccl_addr_space qualifier can be removed. Prior to Cycles X, ccl_addr_space was used as a context-dependent address space qualifier, but now it is either redundant (e.g. in struct typedefs), or can be replaced by ccl_global in the case of pointer types. Associated function variants (e.g. lcg_step_float_addrspace) are also redundant.
In cases where address space qualifiers are chained with "const", this patch places the address space qualifier first. The rationale for this is that the choice of address space is likely to have the greater impact on runtime performance and overall architecture.
The final part of this patch is the addition of a metal/compat.h header. This is partially complete and will be extended in future patches, paving the way for the full Metal implementation.
Ref T92212
Reviewed By: brecht
Maniphest Tasks: T92212
Differential Revision: https://developer.blender.org/D12864
2021-10-14 13:53:40 +01:00
|
|
|
ccl_private float3 *P,
|
|
|
|
ccl_private float3 *D)
|
Multi-View: Cycles - Spherical Stereo support (VR Panoramas)
This is a new option for panorama cameras to render
stereo that can be used in virtual reality devices
The option is available under the camera panel when Multi-View is enabled (Views option in the Render Layers panel)
Known limitations:
------------------
* Parallel convergence is not supported (you need to set a convergence distance really high to simulate this effect).
* Pivot was not supposed to affect the render but it does, this has to be looked at, but for now set it to CENTER
* Derivatives in perspective camera need to be pre-computed or we shuld get rid of kcam->dx/dy (Sergey words, I don't fully grasp the implication shere)
* This works in perspective mode and in panorama mode. However, for fully benefit from this effect in perspective mode you need to render a cube map. (there is an addon for this, developed separately, perhaps we could include it in master).
* We have no support for "neck distance" at the moment. This is supposed to help with objects at short distances.
* We have no support to rotate the "Up Axis" of the stereo plane. Meaning, we hardcode 0,0,1 as UP, and create the stereo pair related to that. (although we could take the camera local UP when rendering panoramas, this wouldn't work for perspective cameras.
* We have no support for interocular distance attenuation based on the proximity of the poles (which helps to reduce the pole rotation effect/artifact).
THIS NEEDS DOCS - both in 2.78 release log and the Blender manual.
Meanwhile you can read about it here: http://code.blender.org/2015/03/1451
This patch specifically dates from March 2015, as you can see in the code.blender.org post. Many thanks to all the reviewers, testers and minor sponsors who helped me maintain spherical-stereo for 1 year.
All that said, have fun with this. This feature was what got me started with Multi-View development (at the time what I was looking for was Fulldome stereo support, but the implementation is the same). In order to make this into Blender I had to make it aiming at a less-specic user-case Thus Multi-View started. (this was December 2012, during Siggraph Asia and a chat I had with Paul Bourke during the conference). I don't have the original patch anymore, but you can find a re-based version of it from March 2013, right before I start with the Multi-View project https://developer.blender.org/P332
Reviewers: sergey, dingto
Subscribers: #cycles
Differential Revision: https://developer.blender.org/D1223
2016-03-10 09:28:29 -03:00
|
|
|
{
|
2018-01-12 02:14:27 +01:00
|
|
|
float interocular_offset = cam->interocular_offset;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2016-03-10 22:03:03 +05:00
|
|
|
/* Interocular offset of zero means either non stereo, or stereo without
|
2016-10-22 15:59:23 +02:00
|
|
|
* spherical stereo. */
|
|
|
|
kernel_assert(interocular_offset != 0.0f);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-01-12 02:14:27 +01:00
|
|
|
if (cam->pole_merge_angle_to > 0.0f) {
|
|
|
|
const float pole_merge_angle_from = cam->pole_merge_angle_from,
|
|
|
|
pole_merge_angle_to = cam->pole_merge_angle_to;
|
2016-10-29 20:06:52 +02:00
|
|
|
float altitude = fabsf(safe_asinf((*D).z));
|
2016-05-17 14:12:29 +02:00
|
|
|
if (altitude > pole_merge_angle_to) {
|
|
|
|
interocular_offset = 0.0f;
|
|
|
|
}
|
|
|
|
else if (altitude > pole_merge_angle_from) {
|
|
|
|
float fac = (altitude - pole_merge_angle_from) /
|
|
|
|
(pole_merge_angle_to - pole_merge_angle_from);
|
|
|
|
float fade = cosf(fac * M_PI_2_F);
|
|
|
|
interocular_offset *= fade;
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
}
|
|
|
|
|
2016-03-10 22:03:03 +05:00
|
|
|
float3 up = make_float3(0.0f, 0.0f, 1.0f);
|
2016-10-22 15:59:23 +02:00
|
|
|
float3 side = normalize(cross(*D, up));
|
|
|
|
float3 stereo_offset = side * interocular_offset;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2016-10-22 15:59:23 +02:00
|
|
|
*P += stereo_offset;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2016-10-22 15:59:23 +02:00
|
|
|
/* Convergence distance is FLT_MAX in the case of parallel convergence mode,
|
|
|
|
* no need to modify direction in this case either. */
|
2018-01-12 02:14:27 +01:00
|
|
|
const float convergence_distance = cam->convergence_distance;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2016-10-22 15:59:23 +02:00
|
|
|
if (convergence_distance != FLT_MAX) {
|
|
|
|
float3 screen_offset = convergence_distance * (*D);
|
|
|
|
*D = normalize(screen_offset - stereo_offset);
|
2016-03-10 22:03:03 +05:00
|
|
|
}
|
Multi-View: Cycles - Spherical Stereo support (VR Panoramas)
This is a new option for panorama cameras to render
stereo that can be used in virtual reality devices
The option is available under the camera panel when Multi-View is enabled (Views option in the Render Layers panel)
Known limitations:
------------------
* Parallel convergence is not supported (you need to set a convergence distance really high to simulate this effect).
* Pivot was not supposed to affect the render but it does, this has to be looked at, but for now set it to CENTER
* Derivatives in perspective camera need to be pre-computed or we shuld get rid of kcam->dx/dy (Sergey words, I don't fully grasp the implication shere)
* This works in perspective mode and in panorama mode. However, for fully benefit from this effect in perspective mode you need to render a cube map. (there is an addon for this, developed separately, perhaps we could include it in master).
* We have no support for "neck distance" at the moment. This is supposed to help with objects at short distances.
* We have no support to rotate the "Up Axis" of the stereo plane. Meaning, we hardcode 0,0,1 as UP, and create the stereo pair related to that. (although we could take the camera local UP when rendering panoramas, this wouldn't work for perspective cameras.
* We have no support for interocular distance attenuation based on the proximity of the poles (which helps to reduce the pole rotation effect/artifact).
THIS NEEDS DOCS - both in 2.78 release log and the Blender manual.
Meanwhile you can read about it here: http://code.blender.org/2015/03/1451
This patch specifically dates from March 2015, as you can see in the code.blender.org post. Many thanks to all the reviewers, testers and minor sponsors who helped me maintain spherical-stereo for 1 year.
All that said, have fun with this. This feature was what got me started with Multi-View development (at the time what I was looking for was Fulldome stereo support, but the implementation is the same). In order to make this into Blender I had to make it aiming at a less-specic user-case Thus Multi-View started. (this was December 2012, during Siggraph Asia and a chat I had with Paul Bourke during the conference). I don't have the original patch anymore, but you can find a re-based version of it from March 2013, right before I start with the Multi-View project https://developer.blender.org/P332
Reviewers: sergey, dingto
Subscribers: #cycles
Differential Revision: https://developer.blender.org/D1223
2016-03-10 09:28:29 -03:00
|
|
|
}
|
|
|
|
|
2012-05-07 10:53:09 +00:00
|
|
|
CCL_NAMESPACE_END
|