Hello there, so I have added a bloom filter to a spell cast by a mage. This spell has a particle emitter and in addition is a sphere geometry. So without a bloom filter its perfectly circular and nice however i want to add bloom to make it a bit more visible.
This spell has:
-A sphere geometry
-A sphere collision shape for both rigid body control and ghost control
-The particle emitter is a spherical image
The problem is when i add a bloom filter it looks like a square where i want it to be a sphere. A good example is:https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:bloom_and_glow where oto is shooting a green ball but with bloom, i want something similar to that.
Sounds like maybe you have one of the bloom parameters turned up too much. A picture is worth a thousand words.
@pspeed said:
Sounds like maybe you have one of the bloom parameters turned up too much. A picture is worth a thousand words.
This is what it looks like in the application, as you can see it has a spherical collision shape but the bloom is a cube:

Code:
[java]
Sphere ball = new Sphere(3, 3, 3);
sphere = new Geometry(“Spell”, ball);
Material mat = new Material(assetManager,
"Common/MatDefs/Misc/Particle.j3md");
mat.setTexture("Texture", assetManager.loadTexture(
"Effects/flame.png"));
mat.setColor("GlowColor",ColorRGBA.Green);
//Bloom
FilterPostProcessor fpp=new FilterPostProcessor(assetManager);
BloomFilter bloom=new BloomFilter(BloomFilter.GlowMode.Objects);
fpp.addFilter(bloom);
game.getApp().getViewPort().addProcessor(fpp);
sphere.setMaterial(mat);
setSpellCastHitBox(new GhostControl(new SphereCollisionShape(3f)));
setSpellCastNode(new Node());
spellCastPhysics = new RigidBodyControl(new SphereCollisionShape(3f));
sphere.setLocalScale(0.25f, 0.25f, 0.25f);
spellCastEffect = new ParticleEmitter("Emitter", ParticleMesh.Type.Triangle, 60);
spellCastEffect.setStartColor(ColorRGBA.Green);
spellCastEffect.setEndColor(ColorRGBA.Green);
spellCastEffect.setStartSize(3f);
spellCastEffect.setEndSize(2.5f);
spellCastEffect.setGravity(0, 0, 0);
spellCastEffect.setHighLife(20f);
spellCastEffect.setLowLife(1f);
spellCastEffect.setImagesX(2);
spellCastEffect.setImagesY(2);
sphere.setLocalTranslation(game.getPlayer().getWorldTranslation().addLocal(0, 8, 0));
spellCastEffect.setMaterial(mat);
spellCastEffect.setNumParticles(100);
spellCastEffect.setParticlesPerSec(100);
sphere.addControl(getSpellCastPhysics());
getSpellCastPhysics().setLinearVelocity(game.getApp().getCamera().getDirection().multLocal(new Vector3f(200, 10, 200)));
sphere.addControl(getSpellCastHitBox());
spellCastEffect.setInWorldSpace(false);
spellCastEffect.setVelocityVariation(0.7f);
getSpellCastNode().attachChild(sphere);
spellEffectNode = new Node();
getSpellEffectNode().attachChild(spellCastEffect);
[/java]
What does it look like without bloom? That’s a very odd shape.
Without bloom it looks how i want, a circular particle emitter:

That’s weird. I’ve never used the glow color stuff but maybe it isn’t rendering the particles correctly. I’ve never even looked at the object glow technique so I don’t know if there is something special about transparency or anything.
…maybe try a regular bloom not in object mode just to see if it produces the same shape or not.
@pspeed said:
That's weird. I've never used the glow color stuff but maybe it isn't rendering the particles correctly. I've never even looked at the object glow technique so I don't know if there is something special about transparency or anything.
…maybe try a regular bloom not in object mode just to see if it produces the same shape or not.
Still produces the same shape, if i put the material as particle.j3md its a circle but any other materials (lighting,unshaded) or bloom it goes cube.
Alright i fixed it, it looks like particles and bloom are a no no. If i remove my particle emitter it becomes circular but adding it turns into a square.
You might want to simulate the glow of a particle inside the particle sprite.