How to use the BloomGLProcessor

Started by icarusfactor, February 26, 2011, 09:43:24 PM

Previous topic - Next topic

icarusfactor

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?

EgonOlsen

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).

icarusfactor

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?

EgonOlsen

#3
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.

icarusfactor

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?




EgonOlsen

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:

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)... ;)

icarusfactor

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.


Thomas.

and what atom[n].setTransparency(5); ? :)

icarusfactor

Yes, neither end of the spectrum 10 or 500 or other will produce
any amount of transparency.

EgonOlsen

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.

icarusfactor

Nice, thanks the lower values worked fine.

Now how do I get an object to glow?

Thomas.

I think, that you have to do this manually in jpct-ae, but it is just billboarding plane on light position

EgonOlsen

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.

icarusfactor

Ok , thanks for the help that got me back going .

icarusfactor

The only file I can find is demo.java, is this the only file that is specific to Alien Runner besides the res.zip.