You're blocking ads, which pay for BlenderNation. Read about other ways to support us.

The VSF Database, a collection of OSL shaders

0

hjhornbeck writes:

Howdy, everyone! It's been a while since I've contributed anything to the Blender scene, so I'm happy to return with something like this.

Blender was an early adopter of Open Shading Language, and they've kept up their support of it over the years; IIRC, Blender 2.8 bumped the OSL version from 1.7 to 1.9, for instance. Any of these shaders can be plugged directly into Blender and used immediately.

Blender's OSL support is CPU-only, alas, but with some work you could convert any of these to shaders to nodes. All of the rendered images on that page, in fact, were made with Blender 2.79 using that very technique. I'm working on some custom code for Blender which offers even more realism, but that's months away at best. For now, I figure all the artists in the Blender community would like a few extra brushes to help paint their scenes.

Surface scattering has seen significant advances over the last few decades. We've gone from Cook-Torrence to multiscatter GGX and Disney's Principled shader. Volume scattering has not seen the same progress; it's telling that the primary scattering function we use, the Henyey-Greenstein, is over 60 years old. One possible reason for this is the MERL database, a collection of measured surface reflectances from a wide variety of materials. Easy access to that kind of data helped fuel the study of some of the above bidirectional scattering distribution functions (BSDFs).

Volume scattering could use a similar database. So as a supplement to our paper, we've gathered as many volume scattering function (VSF) samples as we can find in one place, in the hope that it triggers the same spark of innovation.

By itself, that's not terribly useful. Each of those scattering functions has been translated into multiple Open Shading Language shaders, however. These are built up from a number of more primitive scattering functions, and vary in their level of realism and performance cost. Some of these are "chromatic," in that they vary the colour associated with each component function to try and approximate colour-based scattering effects. These look and behave quite differently from what you normally see in volume scattering, as the attached image shows.

There's also a wealth of programming code in the database. We have a program to generate your own volume scattering functions, and programs to convert those scattering functions into OSL shaders. We even have the benchmarking code from our paper sitting in the database. All of it is under an open-source license, of course.

Currently the database is dominated by cloud and fog scattering functions, but we're hoping to expand it. I've started looking into biological scattering functions, for instance. If you'd like to help, you can clone the repository and create a merge request or get in touch with the email address listed in the database.

Leave A Reply

To add a profile picture to your message, register your email address with Gravatar.com. To protect your email address, create an account on BlenderNation and log in when posting a message.