Posted: 15 Jun 2015 19:54
Tags: downloads osl
2.4.3 was supposed to be the last 2.4 minor release but, since then, I discovered they were still some weird bugs left (related to OSL shader code optimizer). Fortunately, they have been fixed in the latest OSL release. Therefore, this release is mostly an upgrade to OIIO 1.5.16 and OSL 1.6.6 with a few shader bug fixes. The code optimizer is not yet bullet proof (look at the workaround implemented in granite.osl for instance) but I can move forward.
Posted: 01 May 2015 17:09
Once again, this release is dedicated to the integration of OSL within XRT. I think (but can't really believe) that I am done with it. Not only the new OSL based shading system matches the capabilities of the previous RSL based shading system but also it surpasses them in terms of speed and image quality. See below the mandatory car picture for a proof of it.
Although I have been mostly fixing bugs for this release, I have also implemented something missing from the stock OSL: shader layers can connect to and from individual array members or vector components.
There is also a new kind of camera: the "equiangular" camera. It computes a 360°x180° view of a scene (capturing the whole surrounding sphere) and maps it to a rectangle, hence the name "equiangular": each pixel represents the same solid angle. The resulting picture (also called a lat/long texture because it mimics a Mercator projection) can be used as an environment map. Here is a lat/long example rendered with XRT:
You will find this simple scene within the updated examples archive.
Posted: 19 Feb 2015 17:05
This release improves again OSL integration within XRT (although a fair share of bugs have been fixed). The new available features are:
- primitive variables are fully functional for all kinds of primitives (except vertex interpolation type for subdivision surfaces)
- shaders accept unsized arrays as parameters. The actual size is determined at run-time when shaders are instantiated.
- message passing between different shader groups (and not only within the layer) is supported. For instance, a surface shader can retreive a value computed by a displacement group or can ask a light whether it supports specular or diffuse emission.
- any bump-mapped surface seen through a refractive material will have its shading normal properly oriented
- differential quantities are properly propagated through reflection, refraction or shadowing.
This last feature matters a lot to me because it was one of the major compelling reasons to switch to OSL. Let's have an example.
Pretty lame compared to my previous post, isn't it ? Worse, I am so proud of it that it is part of XRT examples (in the differentials folder). Let's pretend it's for educational purposes only.
Both spheres have nearly the same shader, a metallic surface onto which a screen pattern is applied. The left sphere shader (screen.osl) computes sharp transitions between metal and void while the right sphere shader (screen_aa.osl) smooths them using differential quantities. Because the picture is computed with only one sample per pixel (to make it even uglier), the left sphere aliases badly while the right sphere is smoother. Its shadow is also smoother, like its reflection and its shadow in the mirror. The depth in the ray tree increases but that does not prevent the screen_aa shader to perform antialiasing correctly.
If you're still here, there is a more interesting "lantern" effect in the differentials examples waiting for you to try out.