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.


Messages - newsomjk

Pages: [1]
1
Support / Re: Trouble getting a glow to look correct
« on: October 13, 2012, 12:31:37 am »
nothing =( Tried Pi/2 -Pi/2 and tried without rotation all without culling set to false. I'll try and keep reading the api and figure it out.

EDIT--
Sorry, scale was just too small. Got em showing now, so I'm gonna mess with the rotation. thanks for the help!

Guess my last question is how would I go about attaching this to a sphere?

2
Support / Re: Trouble getting a glow to look correct
« on: October 12, 2012, 11:01:54 pm »
ah gotcha,
Code: [Select]
glow = Primitives.getPlane(2,3f);
            float off = 25;
            float zoff = 5;
           
            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.rotateX((float) (Math.PI*-1)/2f);
            glow.rotateMesh();
            glow.clearRotation();
            glow.build();

3
Support / Re: Trouble getting a glow to look correct
« on: October 12, 2012, 09:46:02 pm »
Still nothing, if it helps any I changed the object to a sphere and tried just the plain white texture and that looks fine, nice and bright but still translucent but I want to get the lightning bolt appearance on the sphere and that texture still just shows a dim yellow.

Code: [Select]
glow = Primitives.getSphere(6,25f);
           
            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();

Am I loading the texture incorrectly somehow?

4
Support / Re: Trouble getting a glow to look correct
« on: October 12, 2012, 09:11:39 pm »
Ok so I changed it to this, and now nothing shows up:

Code: [Select]
public void createGlow(){
    if(model!=null){
glow = Primitives.getPlane(2,3f);
            float off = 25;
            float zoff = 5;
           
            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();
    }
}

5
Support / Re: Trouble getting a glow to look correct
« on: October 12, 2012, 03:19:15 pm »
Yeah sorry,



I've also tried with a black background.

6
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]