PointLight doesn't looks like a PointLight

Hi guys,

I have a problem with the pointlights in JME 3. I’ve made a gif file for you, to make it better understandable. The pointlight’s location is always the same as the location of the flame. But you can see how it looks.


Normally a pointlight should have a bright radial area around it. That how i thought? So why does it looks now like above?

Her is the generation of the pointlight:


markLight = new PointLight();

markLight.setPosition(new Vector3f(5, 1, 5));


markLight.setColor(new ColorRGBA(1f, 0.7f, 0f, 1f));



And the conten of the .j3m file whitch is used as material for the ground-plate.


Material My Material : Common/MatDefs/Light/Lighting.j3md {

MaterialParameters {

DiffuseMap : Repeat Models/Ground/01.jpg

NormalMap : Repeat Models/Ground/01_normal.jpg

AlphaDiscardThreshold : 0.0

Shininess : 10.0

ParallaxMap : Repeat Models/Ground/01_height.jpg

LATC : false

UseMaterialColors : false

EnvMapAsSphereMap : false

LowQuality : false

HighQuality : false

UseAlpha : false

VertexLighting : false


AdditionalRenderState {

DepthWrite Off




So i hope you can help me understand this problem.


You can use a flat terrain for better vertex sampling, instead of a quad.

What’s the problem? Do you want to make your point light follow your flame particle emitter properly? How are you doing it?

Create a node, attach the flame and the point light to it and move the node instead of moving them individually.

Edit: Make the flame and the point light centered at node.

I guess your ground is a quad, lighting is computed for each vertex.

use a grid instead of quad.


Thanks for your answers!

@ glaucomardano:

The particle emitter and the rotating box are in one node, this node and the pointLights are in a further node where also the ground is. So this cant be the reaon of my problem.

@ nehon:

This sounds very possible. First i tried it with the class “Grid” but this class is only for debugging: you only see grindlines, no textures. So my question: is there another class like Box or Quad which has the funktion where I can say how many lines I wont to have in x and y direction. Or is there something like a “Subdivision Survace” modifier like in blender, which makes 4 faces out of 1?

I don’t believe so, but i don’t really know anything :P. You could create a custom mesh, or as you said just create a quad in blender, press w then subdivide, then on the left panel select the number of cuts.

By default attenuation is computed per vertex and not per pixel. To compute it per pixel, set the HighQuality boolean in your J3M file.


[java]MaterialParameters {

// …

HighQuality : true



Oh yeah, thank you “Momoko Fan”, it works now. Sometimes such easy thinks can change so mutch^^!

Oh ok, that is actually important. Would’ve been better to have named it something like “PerPixel” but allright.

My next problem, again with the PointLight, or with the Spatial on whitch its shining:


My question: Why shines the light of the fire only on the left side of the wall?

Material of the Wall:


Material My Material : Common/MatDefs/Light/Lighting.j3md {

MaterialParameters {

DiffuseMap : Models/Walls/Wall02/wall02.jpeg

ParallaxMap : Models/Walls/Wall02/wall02_high.jpeg

NormalMap : Models/Walls/Wall02/wall02_normal.jpeg

HighQuality : true

VertexLighting : false

Shininess : 19.0


AdditionalRenderState {




How i creat the wall:


for(int i=0;i<columns;i++)


Spatial wall= assetManager.loadModel(“Models/Walls/Wall02/wall02.j3o”);



wall.setLocalRotation(new Quaternion(new float[]{0f,(float)Math.PI/2,0f}));





Why are you loading the material?It’s automatically loaded when you load the .j3o model.

Oh, i hadn`t known. But that doesnt resolves my problem.

Can we get a test case that reproduces this issue?

Ok i have now made such a class:


import com.jme3.app.SimpleApplication;

import com.jme3.light.PointLight;

import com.jme3.material.Material;

import com.jme3.math.ColorRGBA;

import com.jme3.math.Quaternion;

import com.jme3.math.Vector3f;

import com.jme3.scene.Geometry;

import com.jme3.scene.Spatial;

import com.jme3.scene.shape.Sphere;

public class Test extends SimpleApplication {

public static void main(String[] args)


new Test().start();



public void simpleInitApp() {

//creating a wall out of singel wall-elements






//the pointlight

PointLight lamp = new PointLight();

lamp.setPosition(new Vector3f(2.5f,0.5f,0.5f));




//marks the position of the pointlight

Sphere sphere = new Sphere(10, 10, 0.2f);

Geometry lightMarker = new Geometry(“Middle”, sphere);

Material midMat = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);

midMat.setColor(“Color”, ColorRGBA.Yellow);





public Spatial creatWall(float x)


Spatial wall = assetManager.loadModel(“Models/Walls/Wall02/wall02.j3o”);

wall.setLocalRotation(new Quaternion(new float[]{0f,(float)Math.PI/2,0f}));


wall.setLocalTranslation(x, 0, 0);

return wall;




the model + textures…:


Or as JME3 Platform projekt( not testet):


Image of the problem:


Your model has no normals.

You have to generate normals when exporting from Blender by selecting “Normals” in the exporter options

Oh, your right!

Thank you!