RSS< Twitter< etc

Adjusting the Bilinear Filter Size

Available in Krakatoa MX v2.0.0 and higher

Introduction

Until Krakatoa MX v2.0.0, the three available point drawing filters used to generate the Self-Shadowing Attenuation maps and the final rendered image were Nearest Neighbor, Bilinear and Bicubic. As discussed in a separate topic, the Nearest Neighbor mode draws a particle into the single closest pixel, the Bilinear draws into a grid of 2x2 pixels and the Bicubic into a grid of 3x3 pixels.

In Krakatoa MX v2.0.0, the ability to define the sampling size of the Bilinear filter was added, mainly to help reduce the shadow artifacts discuessed in the topic "Understanding Particle Mode Density". In addition, the same filtering option was added to the Draw Point Filter settings, allowing arbitrary sample size filtering (blurring) of each particle drawn into the final image.

 

Self-Shadow Filter Size

When the Self-Shadow Filtering is set to Bilinear, an additional value spinner becomes available next to the filter type drop-down list. The default value is 1 which matches the original Biliean Filter in earlier versions of Krakatoa. Each particle will be drawn into the Attenuation buffer using the specified Filter Size, with higher values blurring the Attenuation map more and thus reducing possible moire artifacts at cost of shadow crispness and processing time.

The follwing image shows the same PRT Volume rendering of the Stanford Buddha statue using, from left to right, Self-Shadow Bilinear Filter Size of 1, 4, 8 and 16:

As you can see from this example, the shadow becomes more diffuse as the Filter Size increases.

Here is an 8-time zoom into the same rendering to show the effect of the increased Filter Size:

 

Draw Point Filter Size

Similar to the Self-Shadow filtering, the Size of the Bilinear Filter used to draw the particles into the final image buffer can also be controlled. When the Draw Point Filter is set to Bilinear, an additional value spinner will become available to the right of the filters drop-down list. It defaults to 1 which matches the earlier versions of Krakatoa. The value can be increased up to 64, but this is a UI-level limitation - it can be set via MAXScript to an arbitrary value by calling

FranticParticles.SetProperty "DrawPointFilter" "BilinearXXX"

where XXX is any number greater than 1, e.g. "Bilinear96", "Bilinear128" etc.

Increasing the Bilinear Filter Size has the effect of blurring the final image. It is quite similar to the look of Depth Of Field, but it works differently and is constant for all particles regardless of their distance to the camera. Whereas the DOF draws multiple samples of the particle using the current Filter method within the circle of confusion to produce a disk, the Filter Size affects the Radius of the Bilinear Filter Sampling - the same particle is drawn into more than the usual 2x2 pixels.

The image below shows the result of applying a Bilinear Filter with sizes of 1, 2, 3 and 4 to the same rendering of the Stanford Buddha model while illuminating with Shadows using Filter Size 1:

As you can see, the image gets more and more blurred with the Filter Size increase.

Here is a fragment of the same rendering, zoomed in 8 times:

 

See Also: