[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52032] trunk/blender/intern/cycles: Fisheye Equidistant Lens algorith bugfix

Dalai Felinto dfelinto at gmail.com
Fri Nov 9 10:11:33 CET 2012


Revision: 52032
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52032
Author:   dfelinto
Date:     2012-11-09 09:11:24 +0000 (Fri, 09 Nov 2012)
Log Message:
-----------
Fisheye Equidistant Lens algorith bugfix
r = lens * theta

Thanks for Adriano Oliveira for reporting this and chasing down the right formula.
Now fulldome works no longer need to use equisolid + a specific lens+sensor size.

And happy birthday to me. And yes, that's how I celebrate it ;)

Modified Paths:
--------------
    trunk/blender/intern/cycles/blender/addon/enums.py
    trunk/blender/intern/cycles/kernel/kernel_projection.h

Modified: trunk/blender/intern/cycles/blender/addon/enums.py
===================================================================
--- trunk/blender/intern/cycles/blender/addon/enums.py	2012-11-09 08:47:08 UTC (rev 52031)
+++ trunk/blender/intern/cycles/blender/addon/enums.py	2012-11-09 09:11:24 UTC (rev 52032)
@@ -57,8 +57,7 @@
 
 panorama_types = (
     ('EQUIRECTANGULAR', "Equirectangular", "Render the scene with a spherical camera, also known as Lat Long panorama"),
-    ('FISHEYE_EQUIDISTANT', "Fisheye Equidistant", "Ignore the sensor dimensions"),
+    ('FISHEYE_EQUIDISTANT', "Fisheye Equidistant", "Ideal for fulldomes, ignore the sensor dimensions"),
     ('FISHEYE_EQUISOLID', "Fisheye Equisolid",
-                          "Similar to most fisheye modern lens, takes sensor dimensions into consideration "
-                          "(for fulldomes use it with a square sensor ratio)"),
+                          "Similar to most fisheye modern lens, takes sensor dimensions into consideration"),
     )

Modified: trunk/blender/intern/cycles/kernel/kernel_projection.h
===================================================================
--- trunk/blender/intern/cycles/kernel/kernel_projection.h	2012-11-09 08:47:08 UTC (rev 52031)
+++ trunk/blender/intern/cycles/kernel/kernel_projection.h	2012-11-09 09:11:24 UTC (rev 52032)
@@ -98,7 +98,7 @@
 		return make_float3(0.0f, 0.0f, 0.0f);
 
 	float phi = acosf((r != 0.0f)? u/r: 0.0f);
-	float theta = asinf(r) * (fov / M_PI_F);
+	float theta = r * fov * 0.5f;
 
 	if(v < 0.0f) phi = -phi;
 




More information about the Bf-blender-cvs mailing list