Author Topic: How to make the light glow of the example AnD3Bench?  (Read 1544 times)

Offline ggp

  • byte
  • *
  • Posts: 39
    • View Profile
How to make the light glow of the example AnD3Bench?
« on: February 17, 2012, 07:45:08 pm »
How to make the light glow of the example "Multiple light sources" AnD3Bench?




Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: How to make the light glow of the example AnD3Bench?
« Reply #1 on: February 17, 2012, 08:39:11 pm »
It is just billboarded plane on light position

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: How to make the light glow of the example AnD3Bench?
« Reply #2 on: February 17, 2012, 08:41:05 pm »
...with additive blending.

Offline ggp

  • byte
  • *
  • Posts: 39
    • View Profile
Re: How to make the light glow of the example AnD3Bench?
« Reply #3 on: February 17, 2012, 08:51:51 pm »
Thank you.

Offline ggp

  • byte
  • *
  • Posts: 39
    • View Profile
Re: How to make the light glow of the example AnD3Bench?
« Reply #4 on: February 18, 2012, 02:04:08 pm »
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.

Offline K24A3

  • long
  • ***
  • Posts: 231
    • View Profile
Re: How to make the light glow of the example AnD3Bench?
« Reply #5 on: February 18, 2012, 04:04:29 pm »
myObject3D.setTransparencyMode(Object3D.TRANSPARENCY_MODE_ADD);