[Soc-2013-dev] Weekly report #9 Cycles nodes

Brecht Van Lommel brechtvanlommel at pandora.be
Sat Aug 17 20:03:50 CEST 2013


* We should keep the old code working for backwards compatibility, and give
the user a choice between the old and new model. The new model can be the
default.

* The previous code computed cosf(theta) and cosf(gamma) once, new code
should do that too for best performance.

* Regarding the strength, the code says this:

      The coefficients of the spectral model are now scaled so that the
output
      is given in physical units: W / (m^-2 * sr * nm). Also, the output of
the
      XYZ model is now no longer scaled to the range [0...1]. Instead, it is
      the result of a simple conversion from spectral data via the CIE 2
degree
      standard observer matching functions. Therefore, after multiplication
      with 683 lm / W, the Y channel now corresponds to luminance in lm.

We need W / m^2 for the background closure, and I think you need to
multiply by 2*pi/683 which is close to the 0.01 you mentioned. Division by
683 is to undo the multiplication with 683 lm / W, and 2*pi is for
integrating over the hemisphere to get rid of the steradian.

* I see there's code for solar radiance too, would be nice if we could use
that so the user doesn't have to manually set up the sun. But how to get
that importance sampled I'm not sure, probably the sun is too small for the
importance map to catch, and autogenerating a sun lamp from the world nodes
isn't obvious.



On Sat, Aug 17, 2013 at 6:10 PM, Thomas Dinges <blender at dingto.org> wrote:

>  Hi Brecht,
> thanks for the input, this helped me to understand the code. :)
>
> I commited a WIP now to my branch, works with SVM on CPU and GPU so far.
> See commit mail for open questions.
> http://lists.blender.org/pipermail/bf-blender-cvs/2013-August/058341.html
>
> Best regards,
> Thomas
>
> Am 17.08.2013 02:43, schrieb Brecht Van Lommel:
>
> On Sat, Aug 17, 2013 at 12:23 AM, Thomas Dinges <blender at dingto.org>wrote:
>
>> I checked on some implementations of the new model.
>> * [https://github.com/githole/Skydome/blob/master/skydome.c Simple
>> implementation] which calculates every pixel and outputs an image.
>> * Mitsuba renders the Sky to an HDR map internally and uses this.
>>
>> So basically I would appreciate some starting points on how to approach
>> this. Use the model data? Separate code into precalc and svm evaluation
>> again?
>>
>
>  Looking at the code, I would do a precomputation and then implement
> arhosek_tristim_skymodel_radiance + ArHosekSkyModel_GetRadianceInternal in
> OSL and SVM. It actually looks very similar to the code we have already.
> The precomputed data in ArHosekTristimSkyModelState is 30 floats so that's
> not very big, only a tiny amount of data is extracted from those 66kb.
>
>  For SVM you can store that in the same place I guess, 30 floats isn't
> much more than the 20 we store there now. For OSL you can also do
> precomputation, knowing the OSL internals better now I don't think that it
> would actually be capable of doing it for this code. You can pass the
> precomputed data as float array parameters to the shaders.
>
>  Brecht.
>
>
>
> _______________________________________________
> Soc-2013-dev mailing listSoc-2013-dev at blender.orghttp://lists.blender.org/mailman/listinfo/soc-2013-dev
>
>
>
> --
> Thomas Dinges
> Blender Developer, Artist and Musician
> www.dingto.org
>
>
> _______________________________________________
> Soc-2013-dev mailing list
> Soc-2013-dev at blender.org
> http://lists.blender.org/mailman/listinfo/soc-2013-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/soc-2013-dev/attachments/20130817/be43647e/attachment.htm 


More information about the Soc-2013-dev mailing list