Volume Shaders


Daniel <night-...@...>
 

Guys,

I just started looking into OSL. It certainly looks very interesting!
Did I miss something or is it true that volume shaders are currently
neither implemented, nor truly specified?
I see that you filed issue #3 about this. Can you already comment on
your plans for volume shaders? I'm curious... Which part of the
illumination will the shaders actually compute?

Regards,
Daniel


Larry Gritz <l...@...>
 

We're tackling the volume shaders fairly soon. The spec isn't very clear about them, but that will be beefed up as we implement it. Basically the idea is that it will be very analogous to surface shaders -- returning a closure that describes in a view-independent way what the scattering of the volume is at a particular point. A "volume integrator" in the renderer is responsible for doing the actual ray marching, evaluating the closure for specific light directions, and accumulating the contributions along the viewing ray.

This will all get fleshed out over the next few weeks, there's a pretty strong near-term deadline on our own shows to get this working.

-- lg


On Jan 20, 2010, at 12:29 AM, Daniel wrote:

Guys,

I just started looking into OSL. It certainly looks very interesting!
Did I miss something or is it true that volume shaders are currently
neither implemented, nor truly specified?
I see that you filed issue #3 about this. Can you already comment on
your plans for volume shaders? I'm curious... Which part of the
illumination will the shaders actually compute?

Regards,
Daniel
<ATT00001..txt>
--
Larry Gritz
l...@...


Daniel <night-...@...>
 

On 21 Jan., 08:33, Larry Gritz <l...@...> wrote:
A "volume integrator" in the renderer is responsible for doing the actual ray marching, evaluating the closure for specific light directions, and accumulating the contributions along the viewing ray.
OK, that is how I interpreted the spec.
The volume integrator will, presumably, need some information about
the density of the volume, right? Do you already have ideas for
specifying that in OSL? Or will volume density information simply be
part of the scene description so integrators can choose to do this in
a way that fits their scene format?

Regards,
Daniel


Daniel <night-...@...>
 

On 21 Jan., 10:12, Daniel <night...@...> wrote:
Or will volume density information simply be part of the scene description so integrators can choose to do this in a way that fits their scene format?
Meh, I just realized my ambiguous use of "integrator". In this case I
meant "party integrating OSL into their system"...

Regards,
Daniel


Larry Gritz <l...@...>
 

Er, I'm not sure. I think this is exactly the kind of thing we will be working out over the next few weeks. When we actually implemented surface integrators, we discovered all sorts of issues we hadn't realized when we spec'ed it. The gist is what we imagined, but the little details are different, I expect the same will happen with volumes.

The "density" is already part of the volume's closure, in much the same way that opacity is already part of a surface closure (by virtue of its weighting of closure elements that know they are "transparency-like"). It's possible that we'll want the shader to also return some kind of hint about the frequency that it needs to be sampled (as part of, or in addition to, the closure). Or maybe that's strictly the job of the integrator. The integrator can itself have parameters set by the renderer, and there can be multiple integrators for very different volume situations that need different sampling strategies. Also, it should be obvious that when we add volumes, we will also add several volume scattering closures, as the set of surface closures will not be adequate.

Stay tuned, this will all be done very soon, and probably discussed in detail here as it's happening.

-- lg


On Jan 21, 2010, at 1:12 AM, Daniel wrote:

On 21 Jan., 08:33, Larry Gritz <l...@...> wrote:
OK, that is how I interpreted the spec.
The volume integrator will, presumably, need some information about
the density of the volume, right? Do you already have ideas for
specifying that in OSL? Or will volume density information simply be
part of the scene description so integrators can choose to do this in
a way that fits their scene format?

Regards,
Daniel
<ATT00001..txt>
--
Larry Gritz
l...@...


Daniel <night-...@...>
 

On 21 Jan., 16:13, Larry Gritz <l...@...> wrote:
Stay tuned, this will all be done very soon, and probably discussed in detail here as it's happening.
Thanks so far for the answers, I'm looking forward to seeing OSL
progress. Good stuff!

Regards,
Daniel