DSM Update

May 28, 2009 at 8:22 pm (Uncategorized)

I thought I’d just give a short DSM update.  Basically, it’s “awaiting review,” which I estimate will happen sometime after August (not really sure, 2.5 is currently the development priority for the devs who have to review it).  But it’s not abandoned, and being on hold this way gives me lots of time to work on bmesh. :)

Permalink Leave a Comment

DSM Cloud Shadows

August 16, 2008 at 10:42 am (Uncategorized)

I thought I’d try using DSM on a simple cloud volumetric model build from lots and lots of layered planes and this is the result (note the next image is without DSM for comparison).

This actually worked fairly well, I think, though I wasn’t (yet) able to figure out how to actually make this technique work with particles (for e.g. nicer smoke).  One thing I’d like to do is implement one of the faked DSM self-shadow techniques for sprites (aka haloes); however, this would be a lot of work when I still have to figure out how to properly integrate with the real volumetric code being developed by farsthary.

Hopefully this example helps illustrate the usefullnes of DSM; later on I’ll post the renders I did while demoing at SIGGRAPH.

Permalink 2 Comments

DSM Update

July 28, 2008 at 5:25 am (Uncategorized)

DSM is now in a much more usable state then it was.  I’ve redone the strand integration, which now works almost correctly (and respects materials) except for some odd artifacts that occasionally show up.  Even so, I think DSM is ready for trunk now, pending review from the other developers.  I’ve done a lot of bug fixing, and a lot of things are working properly now.  Getting materials to work right earned me months of frustration, but now that’s done with it’s smooth sailing from here on out (at least until I commit to trunk, then I start playing with the volumetrics stuff :) ).

Permalink Leave a Comment

Uses of DSM

July 26, 2008 at 5:47 pm (Uncategorized)

Many people often ask me what DSM is for.  They especially want to know how it’s better then normal shadow buffers.

Well, the answer is that DSM isn’t always better.  DSM is a volumetric structure, and is meant to make high-quality shadows for things that have volume or are transparent (e.g. hair, clouds, glass).  But it is significantly slower to create the DSM maps, one reason why in most packages you can render the shadow map once and reuse it (something I still need to implement).

The other big advantage of DSM is the soft shadow algorithm you can implement for it.  This is actually pretty cool, and is certainly a lot faster then ray tracing.  It just doesn’t work yet in my particular implementation. :)

So if you’re wondering what to use DSM on, I’d suggest transparent objects, and also strands, if you have a fast system and don’t mind the wait.

Permalink Leave a Comment

Gallery Added

July 26, 2008 at 2:44 am (Uncategorized)

I’ve added a gallery to showcase DSM; you can get to it by clicking on the image to the right.

If you have any dsm-related images for the gallery, just leave a link and your name (preferably your real name) in a comment here and I’ll post it up.

Permalink Leave a Comment

DSM Update – Testers & Builders Wanted!

July 23, 2008 at 10:30 am (Uncategorized)

(Note: Windows build updated on July 24th)

(New: Linux autobuild added)

(New: Linux 64-bit build added)

Introduction

Deep shadow mapping is a volumetric shadow method, supporting things like transparency and anti-aliasing.  DSM tends to produce higher-quality shadows then classical shadow buffers, but are also significantly slower.  They do however support transparent shadows, and are faster then ray shadows for this purpose.  They are great for hair and fur rendering, but are also somewhat slow for this purpose.

DSM’s are especially useful for volumetrics, as they easily allow volumetric self-shadowing and shading effects (though the volumetric project is so new that I’ve yet to interface my DSM implementation with it).  They can also be used for a physically-correct, soft shadow algorithm (based on area lights), though the code for this in my implementation does not work as yet.

Here’s a pretty picture:

Note that the glass plane is rendered using the filtered transparency feature (the “Filter” option in the ray panel) which works with DSM (but not ztransp, so I had to render the glass with ray transparency).

Builds

You can find builds of DSM here (I’ll try to add more links to more platforms as people build on them):

Windows 32 bit : here

OSX 10.5 Intel: here

Linux 32 bit autobuild (courtesy of Panzer): here

Linux 64 bit (courtesy of hessiess): here

These builds are hosted on graphicall.org.

How to Use It

To use DSM, you set up a lamp as if you were using a normal shadow buffered lamp, with a few differences:

  1. You can’t use soft shadows.
  2. The ‘soft’ button turns into the ‘filter’ button and represents the anti-aliasing filter width.
  3. The samples button controls the oversampling of the map, not the soft sampling (as in classical maps).
  4. You can’t increase the samples button past 5, which makes sense as this allows for a maximum of 25 oversamples.
  5. You may have to lower the bias from the default to get a good result.
  6. Don’t use auto-clip-start or auto-clip-end, these tend to mess stuff up for some reason.

Version Info

After a year of frustration, DSM is nearly a usable state.  Material evaluation (e.g. textures in shadows) works, which was no small feat to pull off.  Additionally, many bugfixes and issues have been worked out.

Unfortunately, soft shadows do not work yet (in fact, in the UI the “soft” parameter is renamed to “filter” and limited to 3.0).  DSM’s (unworking) soft shadow code actually use the ray soft shadow parameters; as such, the “samples” and “filter” (formerly soft) parameters in the shadow buffer panel are used to control anti-aliasing settings, not soft shadow effects.

By their nature, DSM maps are always anti-aliased (unlike classical shadow buffers in blender). The amount of oversampling is based one the samples parameter squared (and not the oversampling buttons used for classical shadow maps).  The filter parameter in the panel is used to set the anti-aliasing filter width, with a max value of 3.0.

Known Issues

  • Only bilinear interpolation is used, which isn’t the best.
  • DSM’s speed advantage over ray tracing is most apparent in somewhat complex scenes.  Very simple scenes will not be faster.
  • The soft shadow code doesn’t work yet, and is currently disabled.
  • As in many shadow mapping algorithms, bias is annoying.  The only way to fix this would be to adapt the half-way (midpoint) algorithm to DSM, which would involved “squashing” objects within the map along the view vector (which would mean first identifying which samples *are* the objects, or perhaps squashing the objects before rendering the map).  Unfortunately, this would only work for solid objects, and would probably give totally incorrect results for the soft shadow algorithm.
  • It’s slower than classical shadow maps, which is perfectly normal (as it has a lot more to *do* than classical shadow maps).  Most of the extra time is in creating the map in the first place.
  • There’s some parts of the code, most notably the disk cache system, that I need to document further.

Permalink 5 Comments

Welcome

July 20, 2008 at 2:37 pm (Uncategorized)

This blog is where I’ll be posting different articles and content on my developer projects, probably mostly related to my Deep Shadow Maps (DSM) implementation for blender.

DSM is a volumetric shadow map technique that allows transparent, antialiased shadows at a cost that’s much less then ray tracing for complex scenes.  I’ll be posting different test images in the days to come, showing off some features.

Well, that’s it for that post, kindof tired so more later.

Permalink Leave a Comment

Follow

Get every new post delivered to your Inbox.