Author Topic: How to use the BloomGLProcessor  (Read 7868 times)

Offline icarusfactor

  • int
  • **
  • Posts: 58
    • View Profile
How to use the BloomGLProcessor
« 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Re: How to use the BloomGLProcessor
« Reply #1 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).

Offline icarusfactor

  • int
  • **
  • Posts: 58
    • View Profile
Re: How to use the BloomGLProcessor
« Reply #2 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Re: How to use the BloomGLProcessor
« Reply #3 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.
« Last Edit: February 27, 2011, 08:58:30 am by EgonOlsen »

Offline icarusfactor

  • int
  • **
  • Posts: 58
    • View Profile
Re: How to use the BloomGLProcessor
« Reply #4 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?




Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Re: How to use the BloomGLProcessor
« Reply #5 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:

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

Offline icarusfactor

  • int
  • **
  • Posts: 58
    • View Profile
Re: How to use the BloomGLProcessor
« Reply #6 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.


Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: How to use the BloomGLProcessor
« Reply #7 on: February 27, 2011, 08:33:14 am »
and what atom[n].setTransparency(5); ? :)

Offline icarusfactor

  • int
  • **
  • Posts: 58
    • View Profile
Re: How to use the BloomGLProcessor
« Reply #8 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Re: How to use the BloomGLProcessor
« Reply #9 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.

Offline icarusfactor

  • int
  • **
  • Posts: 58
    • View Profile
Re: How to use the BloomGLProcessor
« Reply #10 on: February 27, 2011, 09:30:44 am »
Nice, thanks the lower values worked fine.

 Now how do I get an object to glow?

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: How to use the BloomGLProcessor
« Reply #11 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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Re: How to use the BloomGLProcessor
« Reply #12 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.

Offline icarusfactor

  • int
  • **
  • Posts: 58
    • View Profile
Re: How to use the BloomGLProcessor
« Reply #13 on: February 27, 2011, 05:15:49 pm »
Ok , thanks for the help that got me back going .

Offline icarusfactor

  • int
  • **
  • Posts: 58
    • View Profile
Re: How to use the BloomGLProcessor
« Reply #14 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.