Problems with GlowColor, Materials and Shaders

Hi, I’m very new to jME3 (so forgive me if all this sounds dumb) but, I do have a fair amount of experience with J3D and VRML etc.

I’m trying to get a model to appear to light up from inside - e.g. a brake light on a car. I’d usually do this with an emissive color but jME3 doesn’t appear to understand this terminology.

After reading the Materials docs I found the Unshaded and Lighting MatDefs contain a GlowColor parameter…which seems to be exactly what I want. However, when I apply a material with a GlowColor to a model it doesn’t appear to work and I get a message like “m_GlowColor not declared in shader”.

In fact, it appears none of the basic color parameters (Diffuse, Ambient etc.) are declared in the Lighting MatDef.

I keep getting “not declared in shader” messages for m_VertexColor, m_Diffuse, m_Ambient, m_GlowColor etc.

What’s up with it? Am I doing something wrong?

glow color only works with the BloomFilter see this doc

you can ignore the “m_xxx is not declared…” messages

1 Like

also check this tutorial:


GlowMap is a texture parameter- a grayscale image used to denote the location and intensity of the glow effect on the object

GlowColor is a color paramater- it denotes the actual color you want the GlowMap to emit.

you have to set them.

for example:


Material mat = new Material(assetManager, “Common/MatDefs/Light/Lighting.j3md”);

Texture glowing = assetManager.loadTexture(“Textures/GlowMaps/MyGlowMap.png”)

mat.setTexture(“GlowMap”, glowing);

mat.setColor(“GlowColor”, ColorRGBA.Red);


1 Like

Sorry for the late reply guys and many thanks for the help. This looks like it will do the trick.