Eh deriving shi->view from shi->co. . .well the render scene's pre-rotated, so I imagine it's pretty easy, just look up the function that calculates shi->view in the first place.<br><br><div class="gmail_quote">
On Thu, Nov 13, 2008 at 11:01 PM, Matt Ebb <span dir="ltr"><<a href="mailto:matt@mke3.net">matt@mke3.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Revision: 17454<br>
<a href="http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17454" target="_blank">http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17454</a><br>
Author: broken<br>
Date: 2008-11-14 07:01:06 +0100 (Fri, 14 Nov 2008)<br>
<br>
Log Message:<br>
-----------<br>
Volume rendering:<br>
<br>
* Use a slightly better (but still not exact) approximation for the view<br>
vector when pre-shading the light cache. This still doesn't give exactly the<br>
same results as non-light-cache shading, but it's better. Will investigate<br>
getting a better view vector when there's more time - or if anyone has a<br>
simple formula to derive shi->view from shi->co that would be great to<br>
hear about too :)<br>
<br>
Modified Paths:<br>
--------------<br>
branches/sim_physics/source/blender/render/intern/source/volumetric.c<br>
<br>
Modified: branches/sim_physics/source/blender/render/intern/source/volumetric.c<br>
===================================================================<br>
--- branches/sim_physics/source/blender/render/intern/source/volumetric.c 2008-11-14 04:07:47 UTC (rev 17453)<br>
+++ branches/sim_physics/source/blender/render/intern/source/volumetric.c 2008-11-14 06:01:06 UTC (rev 17454)<br>
@@ -984,7 +984,7 @@<br>
<br>
for (z=0; z < res; z++) {<br>
co[2] = bbmin[2] + (voxel[2] * z);<br>
-<br>
+<br>
time= PIL_check_seconds_timer();<br>
i++;<br>
<br>
@@ -1012,6 +1012,9 @@<br>
obi->volume_precache[2*res_3 + x*res_2 + y*res + z] = -1.0f;<br>
continue;<br>
}<br>
+<br>
+ VECCOPY(shi.view, co);<br>
+ Normalize(shi.view);<br>
density = vol_get_density(&shi, co);<br>
vol_get_scattering(&shi, scatter_col, co, stepsize, density);<br>
<br>
<br>
<br>
_______________________________________________<br>
Bf-blender-cvs mailing list<br>
<a href="mailto:Bf-blender-cvs@blender.org">Bf-blender-cvs@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-blender-cvs" target="_blank">http://lists.blender.org/mailman/listinfo/bf-blender-cvs</a><br>
</blockquote></div><br>