Hi
thank you very much for your quick reply. I found part of my problem but it’s still nor fixed. Hope you can help me further.
This is my code (slightly simplified):
Transform3D t3d0 = new Transform3D();
Transform3D t3d = new Transform3D();
t3d.setTranslation(new Vector3f(planet.getDistance(), 0f, 0f));
TransformGroup tg0 = new TransformGroup(t3d0);
TransformGroup tg = new TransformGroup(t3d);
tg0.addChild(tg);
tg0.setPickable(true);
tg.setPickable(true);
//sunLight = new DirectionalLight(true, solSys.getSun().getLightColor(), new Vector3f(1.0f, 0.0f, 0.0f));
sunLight = new DirectionalLight(true, new Color3f(1f, 1f, 1f), new Vector3f(1.0f, 0.0f, 0.0f));
tg0.addChild(sunLight);
Sphere sph = new Sphere(50, 50, TriangleArray.COLOR_3 | TriangleArray.COORDINATES | TriangleArray.NORMALS | TriangleArray.TEXTURE_COORDINATE_2, planet.getRadius());
Appearance a = new Appearance();
Texture t = simplyLoadMyCoolTextureAndDoNothingElseWithIt();
a.setTexture(t);
Material m = new Material();
m.setEmissiveColor(new Color3f( 1f, 1f, 1f));
m.setColorTarget(Material.EMISSIVE); // tried it with ambient and diffuse, too
m.setLightingEnable(true);
//m.setShininess(50f);
a.setMaterial(m);
sph.setAppearance(a);
sph.setPickable(true);
tg.addChild(sph);
Do you know what’s going wrong? I really hope you can help me. I am that colse to goal.
Greetings, Qudus