www.jpct.net
jPCT-AE - a 3d engine for Android => Support => Topic started by: ggp on February 17, 2012, 07:45:08 pm
-
How to make the light glow of the example "Multiple light sources" AnD3Bench?
-
It is just billboarded plane on light position
-
...with additive blending.
-
Thank you.
-
Billboarding - OK.
TextureManager.getInstance().addTexture("glow", new Texture(res.openRawResource(R.raw.glow), true));
glowPlane = new Object3D(dummyPlane, true);
glowPlane.setTexture("glow");
glowPlane.setAdditionalColor(RGBColor.WHITE);
glowPlane.setLighting(Object3D.LIGHTING_NO_LIGHTS);
glowPlane.setTransparency(7);
glowPlane.setBillboarding(true);
glowPlane.shareCompiledData(dummyPlane);
glowPlane.build();
glowPlane.strip();
light= new Light(world);
light.setIntensity(250, 250, 250);
SimpleVector sv = new SimpleVector();
sv.set(fuente.getTransformedCenter());
sv.x = 0;
sv.y = -50;
sv.z = 40;
light.setPosition(sv);
world.addObject(glowPlane);
additive blending? code example please. I can not find.
-
myObject3D.setTransparencyMode(Object3D.TRANSPARENCY_MODE_ADD);