Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - newsomjk

Pages: [1]
1
Support / Trouble getting a glow to look correct
« on: October 11, 2012, 02:23:14 pm »


This is the horrible glow that I'm getting. The issues are that 1) it's a square of color? but the texture is transparent background with lightning bolts on it. and 2) It's sooooo dim?!

What am I doing wrong? Here's the code for the glowing object:
Code: [Select]
public void createGlow(){
    if(model!=null){
          glow = new Object3D(2);

            float off = 25;
            float zoff = 5;
           
             glow.addTriangle(new SimpleVector(-off,-off,-zoff),
            new SimpleVector(-off,off,-zoff),
            new SimpleVector(off,off,-zoff)
            );
            glow.addTriangle(new SimpleVector(off,off,-zoff),
            new SimpleVector(off,-off,-zoff),
            new SimpleVector(-off,-off,-zoff)
            );
           
            glow.setBillboarding(Object3D.BILLBOARDING_ENABLED);
            glow.setTexture("glow");
            glow.translate(model.getTransformedCenter());
            glow.setTransparency(0);
            glow.setTransparencyMode(Object3D.TRANSPARENCY_MODE_ADD);

            glow.setLighting( Object3D.LIGHTING_NO_LIGHTS);
            glow.setAdditionalColor( new Color( 255,255,255) );
            glow.build();
    }
}

and the code for loading the texture:
Code: [Select]
TextureManager.getInstance().addTexture("glow",new Texture(this.getClass().getResourceAsStream("resource/glow.png"),true));

any help would be much appreciated

Pages: [1]