Package com.jme3.post.filters
Class BloomFilter
java.lang.Object
com.jme3.post.Filter
com.jme3.post.filters.BloomFilter
- All Implemented Interfaces:
- Savable
BloomFilter is used to make objects in the scene have a glow effect.
There are 2 mode : Scene and Objects.
Scene mode extracts the bright parts of the scene to make them glow
Object mode makes objects glow according to their material's glowMap or their GlowColor
See advanced:bloom_and_glow for more details
There are 2 mode : Scene and Objects.
Scene mode extracts the bright parts of the scene to make them glow
Object mode makes objects glow according to their material's glowMap or their GlowColor
See advanced:bloom_and_glow for more details
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumGlowMode specifies if the glow will be applied to the whole scene or to objects that have a glow color or a glow mapNested classes/interfaces inherited from class com.jme3.post.FilterFilter.Pass
- 
Field SummaryFields inherited from class com.jme3.post.FilterdefaultPass, enabled, material, postRenderPasses, processor
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a Bloom filterBloomFilter(BloomFilter.GlowMode glowMode) Creates the bloom filter with the specified glow mode
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidoverride this method if you have some cleanup to dofloatreturns the bloom intensityfloatreturns the blur scalefloatreturns the downSampling factor
 for more details seesetDownSamplingFactor(float downSamplingFactor)floatreturns the exposure cutoff
 for more details seesetExposureCutOff(float exposureCutOff)floatreturns the exposure power
 for more details seesetExposurePower(float exposurePower)protected MaterialMust return the material used for this filter.protected voidinitFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) Initialization of filter subclasses.protected voidpostQueue(RenderQueue queue) Override this method if you want to make a pre pass, before the actual rendering of the framevoidread(JmeImporter im) Override this method if you want to load extra properties when the filter is loaded else only basic properties of the filter will be loaded This method should always begin by super.read(im);protected voidvoidsetBloomIntensity(float bloomIntensity) intensity of the bloom effect default is 2.0voidsetBlurScale(float blurScale) sets The spread of the bloom default is 1.5fvoidsetDownSamplingFactor(float downSamplingFactor) Sets the downSampling factor : the size of the computed texture will be divided by this factor.voidsetExposureCutOff(float exposureCutOff) Define the color threshold on which the bloom will be applied (0.0 to 1.0)voidsetExposurePower(float exposurePower) defines how many times the bloom extracted color will be multiplied by itself.voidwrite(JmeExporter ex) Override this method if you want to save extra properties when the filter is saved else only basic properties of the filter will be saved This method should always begin by super.write(ex);Methods inherited from class com.jme3.post.Filtercleanup, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresDepthTexture, isRequiresSceneTexture, postFilter, postFrame, preFrame, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer
- 
Constructor Details- 
BloomFilterpublic BloomFilter()Creates a Bloom filter
- 
BloomFilterCreates the bloom filter with the specified glow mode- Parameters:
- glowMode- the desired mode (default=Scene)
 
 
- 
- 
Method Details- 
initFilterprotected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) Description copied from class:FilterInitialization of filter subclasses. This method is called once when the filter is added to the FilterPostProcessor It should contain Material initializations and extra passes initialization- Specified by:
- initFilterin class- Filter
- Parameters:
- manager- the assetManager
- renderManager- the renderManager
- vp- the viewPort where this filter is rendered
- w- the width of the filter
- h- the height of the filter
 
- 
reInitFilterprotected void reInitFilter()
- 
getMaterialDescription copied from class:FilterMust return the material used for this filter. this method is called every frame.- Specified by:
- getMaterialin class- Filter
- Returns:
- the material used for this filter.
 
- 
postQueueDescription copied from class:FilterOverride this method if you want to make a pre pass, before the actual rendering of the frame
- 
cleanUpFilterDescription copied from class:Filteroverride this method if you have some cleanup to do- Overrides:
- cleanUpFilterin class- Filter
- Parameters:
- r- the renderer
 
- 
getBloomIntensitypublic float getBloomIntensity()returns the bloom intensity- Returns:
- the intensity value
 
- 
setBloomIntensitypublic void setBloomIntensity(float bloomIntensity) intensity of the bloom effect default is 2.0- Parameters:
- bloomIntensity- the desired intensity (default=2)
 
- 
getBlurScalepublic float getBlurScale()returns the blur scale- Returns:
- the blur scale
 
- 
setBlurScalepublic void setBlurScale(float blurScale) sets The spread of the bloom default is 1.5f- Parameters:
- blurScale- the desired scale (default=1.5)
 
- 
getExposureCutOffpublic float getExposureCutOff()returns the exposure cutoff
 for more details seesetExposureCutOff(float exposureCutOff)- Returns:
- the exposure cutoff
 
- 
setExposureCutOffpublic void setExposureCutOff(float exposureCutOff) Define the color threshold on which the bloom will be applied (0.0 to 1.0)- Parameters:
- exposureCutOff- the desired threshold (≥0, ≤1, default=0)
 
- 
getExposurePowerpublic float getExposurePower()returns the exposure power
 for more details seesetExposurePower(float exposurePower)- Returns:
- the exposure power
 
- 
setExposurePowerpublic void setExposurePower(float exposurePower) defines how many times the bloom extracted color will be multiplied by itself. default is 5.0
 a high value will reduce rough edges in the bloom and somehow the range of the bloom area- Parameters:
- exposurePower- the desired exponent (default=5)
 
- 
getDownSamplingFactorpublic float getDownSamplingFactor()returns the downSampling factor
 for more details seesetDownSamplingFactor(float downSamplingFactor)- Returns:
- the downsampling factor
 
- 
setDownSamplingFactorpublic void setDownSamplingFactor(float downSamplingFactor) Sets the downSampling factor : the size of the computed texture will be divided by this factor. default is 1 for no downsampling A 2 value is a good way of widening the blur- Parameters:
- downSamplingFactor- the desired factor (default=1)
 
- 
writeDescription copied from class:FilterOverride this method if you want to save extra properties when the filter is saved else only basic properties of the filter will be saved This method should always begin by super.write(ex);- Specified by:
- writein interface- Savable
- Overrides:
- writein class- Filter
- Parameters:
- ex- the exporter (not null)
- Throws:
- IOException- from the exporter
 
- 
readDescription copied from class:FilterOverride this method if you want to load extra properties when the filter is loaded else only basic properties of the filter will be loaded This method should always begin by super.read(im);- Specified by:
- readin interface- Savable
- Overrides:
- readin class- Filter
- Throws:
- IOException
 
 
-