www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: pepel on November 15, 2011, 04:47:22 pm

Title: make objects bright?
Post by: pepel on November 15, 2011, 04:47:22 pm
Hi there,

  I'm trying to make objects "bright", like the sun of the magic island (an3dbenchXL), but I'm lost :)... any tip?

   it would be nice to have the sourcecode of the an3dbenchxl :)

thanks in advance
Title: Re: make objects bright?
Post by: EgonOlsen on November 16, 2011, 07:52:54 am
The sun is just a sun texture on a quad rendered with additive blending.
Title: Re: make objects bright?
Post by: pepel on November 16, 2011, 07:57:38 pm
I don't get it :( I've do want to make an object that shines like the sun of the magic island, but I don't know how...

have tried convinations of these lines:
Code: [Select]
    //shot.setBillboarding(Object3D.BILLBOARDING_ENABLED);
    //shot.setVisibility(Object3D.OBJ_VISIBLE);
    //shot.setCulling(Object3D.CULLING_DISABLED);
shot.setTransparency(10);
shot.setTransparencyMode(Object3D.TRANSPARENCY_MODE_ADD);
    shot.setAdditionalColor(com.threed.jpct.RGBColor.GREEN);
shot.setTexture("green");
shot.setSpecularLighting(true);
    //shot.setLighting(Object3D.LIGHTING_NO_LIGHTS);


any tip?

thanks in advance
Title: Re: make objects bright?
Post by: EgonOlsen on November 17, 2011, 08:02:28 am
Looks ok. Maybe you can post a screen shot that shows your problem, because i don't get it ATM.
Title: Re: make objects bright?
Post by: pepel on November 17, 2011, 08:37:12 am
I probably didnt explain it correctly. I want the spaceship shots, the green and orange ones, to shine like the sun, or make a similar effect of the multiples light sources on an3dbench.
thanks in advance

[attachment deleted by admin]
Title: Re: make objects bright?
Post by: EgonOlsen on November 17, 2011, 10:48:36 am
You are adding green to black. It doesn't get greener than green that way. The benchmark adds colored dots to a none-black background, which makes it look more intense. Try to use a texture that has a color fading towards the edges and maybe don't use 10 as a setting for the transparency, because that makes the fading almost opaque. Try 0..3 instead. It won't be any brighter, but it might look more like you want it to.