www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: icarusfactor on February 26, 2011, 09:43:24 pm

Title: How to use the BloomGLProcessor
Post by: icarusfactor on February 26, 2011, 09:43:24 pm
I tried to add the header imports

import com.threed.jpct.IRenderer;
and
import com.threed.jpct.procs.BloomGLProcessor;
When i try to compile with these added to the file I get

 package com.threed.jpct.procs does not exist
    [javac] import com.threed.jpct.procs.BloomGLProcessor;

Am I missing some pre process to get these to be recognized by the lib?
Or is this done in a different way now?
Title: Re: How to use the BloomGLProcessor
Post by: EgonOlsen on February 26, 2011, 10:55:06 pm
It's simply not avaible in jPCT-AE because OpenGL ES 1.1 lacks support for some stuff that it needs to work (can't remember what it was, but it's not in for a reason).
Title: Re: How to use the BloomGLProcessor
Post by: icarusfactor on February 26, 2011, 11:12:15 pm
What kind of Shaders does the  AE version of JPCT have. Also, what about OpenGL es 2.0 , Would like to take advantage of this as well. Any examples?
Title: Re: How to use the BloomGLProcessor
Post by: EgonOlsen on February 26, 2011, 11:18:23 pm
jPCT-AE is OpenGL ES 1.1 with some extensions if available. It doesn't support 2.0 yet, so no shaders. I'm going to add 2.0 support once i a) have the hardware for that and b) find the time to do it. The problem with 2.0 support is, that (in contrast to what they did for "normal" OpenGL) they decided to drop all fixed function parts in 2.0. That's an incredible dumb decision IMHO, because it means that without writing a shader, you'll see...nothing. No textures, no lighting, no fogging...just nothing. What this means is, that i have to write some shaders first that mimic what the fixed function pipeline does now or otherwise, switching from 1.1 to 2.0 in a project will switch from colorful glory to black.
Title: Re: How to use the BloomGLProcessor
Post by: icarusfactor on February 27, 2011, 12:26:21 am
The Molecule Viewer I am working on does not need it, OpenGL 1.1 will be ok , but was wanting to try it since the shaders looked really cool.

Can JPCT work with standard GL ES 1.1 to make items glow or use transparency?
Would like to have an option to look in side each atom shell (JPCT primitive sphere using transparency) in the molecule and have each electron glow inside the atom?



Title: Re: How to use the BloomGLProcessor
Post by: EgonOlsen on February 27, 2011, 12:32:04 am
Of course you can do transparency and you can also do simple glow effects by, for example, adding a transparent billboarded glow texture with additive blending like i did that here for the lights: (http://www.jpct.net/img/triant2.jpg)

There are two funny things with shader support: Once people want it, they forget about other options and once they have it, they don't use it (desktop jPCT has shader support...nobody (except for me) as far as i know ever used it)... ;)
Title: Re: How to use the BloomGLProcessor
Post by: icarusfactor on February 27, 2011, 12:55:00 am
I have this in the config section

Config.glTransparencyMul = 0.1f;
Config.glTransparencyOffset = 0.1f;

And this is the line I add to my Object3D.

atom[n].setTransparency(500);

All I get is a solid, absolutely no transparency.

Title: Re: How to use the BloomGLProcessor
Post by: Thomas. on February 27, 2011, 08:33:14 am
and what atom[n].setTransparency(5); ? :)
Title: Re: How to use the BloomGLProcessor
Post by: icarusfactor on February 27, 2011, 08:38:20 am
Yes, neither end of the spectrum 10 or 500 or other will produce
 any amount of transparency.
Title: Re: How to use the BloomGLProcessor
Post by: EgonOlsen on February 27, 2011, 08:52:47 am
Why do you think that 10 is the lowest possible value? With your settings, 10 is opaque (0.1+10*0.1=1 .1>1 =>opaque) . Try lower values.
Title: Re: How to use the BloomGLProcessor
Post by: icarusfactor on February 27, 2011, 09:30:44 am
Nice, thanks the lower values worked fine.

 Now how do I get an object to glow?
Title: Re: How to use the BloomGLProcessor
Post by: Thomas. on February 27, 2011, 10:29:26 am
I think, that you have to do this manually in jpct-ae, but it is just billboarding plane on light position
Title: Re: How to use the BloomGLProcessor
Post by: EgonOlsen on February 27, 2011, 12:23:16 pm
You can have a look at the Alien Runner sources. It uses a kind of glow effect on the collectable items. The file should also contain the glow texture that i'm using. You can find the zip in the Alien Runner thread in the projects section.
Title: Re: How to use the BloomGLProcessor
Post by: icarusfactor on February 27, 2011, 05:15:49 pm
Ok , thanks for the help that got me back going .
Title: Re: How to use the BloomGLProcessor
Post by: icarusfactor on February 27, 2011, 05:30:06 pm
The only file I can find is demo.java, is this the only file that is specific to Alien Runner besides the res.zip.
Title: Re: How to use the BloomGLProcessor
Post by: EgonOlsen on February 27, 2011, 08:14:30 pm
http://www.jpct.net/forum2/index.php/topic,1629.msg14207.html#msg14207 (http://www.jpct.net/forum2/index.php/topic,1629.msg14207.html#msg14207)