[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52930] trunk/blender/source/blender/ render/intern/source/convertblender.c: Fix related to #33480: for blender internal volume rendering, the camera inside
Brecht Van Lommel
brechtvanlommel at pandora.be
Wed Dec 12 15:43:11 CET 2012
Revision: 52930
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52930
Author: blendix
Date: 2012-12-12 14:43:11 +0000 (Wed, 12 Dec 2012)
Log Message:
-----------
Fix related to #33480: for blender internal volume rendering, the camera inside
volume wasn't accurate, it still isn't quite but hopefully a bit better by
taking clip start into account.
With clip start it's actually impossible to do a single 'inside' test, since
there will not be a single point where all camera rays start from, though for
small clip start they will be close together.
Modified Paths:
--------------
trunk/blender/source/blender/render/intern/source/convertblender.c
Modified: trunk/blender/source/blender/render/intern/source/convertblender.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/convertblender.c 2012-12-12 14:43:07 UTC (rev 52929)
+++ trunk/blender/source/blender/render/intern/source/convertblender.c 2012-12-12 14:43:11 UTC (rev 52930)
@@ -3158,7 +3158,12 @@
{
ObjectInstanceRen *obi;
VolumeOb *vo;
- float co[3] = {0.f, 0.f, 0.f};
+ /* coordinates are all in camera space, so camera coordinate is zero. we also
+ * add an offset for the clip start, however note that with clip start it's
+ * actually impossible to do a single 'inside' test, since there will not be
+ * a single point where all camera rays start from, though for small clip start
+ * they will be close together. */
+ float co[3] = {0.f, 0.f, -re->clipsta};
for (vo= re->volumes.first; vo; vo= vo->next) {
for (obi= re->instancetable.first; obi; obi= obi->next) {
More information about the Bf-blender-cvs
mailing list