Creating Bloom Filters in Panda3D

Jul 10, 2024

Creating Bloom Filters in Panda3D

Overview

  • This episode focuses on creating bloom filters in Panda3D.
  • Bloom filters add a glowing halo around bright objects in a scene.
  • Review of various filters available in Panda3D such as cartoon inker, volumetric lighting, and ambient occlusion.

Importing Common Filters

  • Library: from direct.filter.CommonFilters import CommonFilters
  • Class: CommonFilters

Creating a Bloom Filter

  1. Instantiate CommonFilters Object: filters = CommonFilters(window, camera)

    • Parameters:
      • window: Reference to the application window (e.g., self.window)
      • camera: Reference to the application camera (e.g., self.cam)
  2. Set Bloom Filter: filters.setBloom()

    • This step enables the bloom effect in the scene.
  3. Customization Options:

    • Blending: Adjusts how the bloom blends with other colors.
    • Trigger: Sets the minimum brightness for the effect.
    • Size: Adjusts the size of the halo (e.g., size="large"). Example: filters.setBloom(size="large") results in a larger halo effect.

Advanced Filters

  • Mention of other filters like volumetric lighting, screen space ambient occlusion, etc.
  • Users can create custom filters using CG or GLSL shaders, requiring knowledge of shader programming.

Conclusion

  • Experiment with different filters available in Panda3D.
  • Custom shaders can be created for unique effects.
  • More tutorials on filters to come.