Main Menu

Second beta of jPCT 1.18 released!

Started by EgonOlsen, April 16, 2009, 09:27:19 PM

Previous topic - Next topic

EgonOlsen

You can get it here: http://www.jpct.net/download/beta/jpctapi_118pre2.zip

It contains a few minor changes compared to the first beta and adds the option to use JOGL instead of LWJGL. It includes a new jar called "glfacade.jar" for this, which can be found in lib/jpct/jogl. You'll also find a readme.txt in there that explains how to use it. You may encounter method not found exceptions when using JOGL. In that case, please let me know and i'll add them. Here are all changes including the ones of beta1:

Quote
Added support for "compiling" Object3Ds for higher performance when rendering high polygon object. Fixed scaling of child objects (again...). Object3D.getWorldTransformation() now takes bill boarding into account. Added a method to OcTree to disable the usage of the octree for rendering. Changed default collision usage of octree from false to true. The 3ds- and obj-loaders now load transparency information. Setting a render target using frame buffer objects now uses the depth buffer correctly for the image rendered into the target.
Config.saveMemory is now true by default. The world's ambient light now defaults to 100,100,100 instead of -100,-100,-100. The purpose of negative light values is long gone with the legacy renderer being outdated. Fixed Object3D.getTransparency() for opaque objects. Added isTransparent() to Object3D.
Added the IRenderHook-Interface that can be used to execute own code in the pipeline of a compiled Object3D. Added two helper methods to the ShadowHelper that can be useful in an IRenderHook.
Improved overall OpenGL-renderer performance a little bit. Using a render target in the same scene that is rendered now works fine when using the single-threaded GLRenderer with FBOs. Added a setAlpha()-method to Texture.
An Object3D can't be assigned as its own parent/child any longer. Added a static mergeAll-method to Object3D. Improved performance and memory usage for loading text based file formats like OBJ. Overlays are no longer selectable by default. Removed a deprecated enableGLCanvasRenderer-variant from FrameBuffer. Added the possibility to use JOGL instead of LWJGL for rendering into an AWT canvas. Removed the manual and the faq from the documentation. They were both outdated and should be replaced by the Wiki. Fixed a crash that could occur when disabling a multi-threaded renderer.

As usual: Have fun!

fireside

I'll have to do some experimenting with jogl eventually.  It's a nice extra option. 
click here->Fireside 7 Games<-

C3R14L.K1L4

Humm I've been away for a while but the API is always evolving, nice...
Quote"The 3ds- and obj-loaders now load transparency information"
Excellent!

EgonOlsen

#3
A small update: http://www.jpct.net/download/beta/jpctapi_118pre3.zip

Only two minor things have changed:
Quote
....Added a class for a simple lens flare effect to util. Added the option to rotate an Overlay.

Edit: Some textures that you can use to try out the lens flares: http://www.jpct.net/download/misc/lens.zip

JavaMan

#4
Quote....Added a class for a simple lens flare effect to util. Added the option to rotate an Overlay.

Oh good!  ;D I have a small, very small project in mind, and I was thinking lense flare would put a nice touch on it. I unfortunately had no idea how to do it. So again good! Now I won't have to :)

EgonOlsen

Quote from: JavaMan on April 22, 2009, 11:31:29 PM
Oh good!  ;D I have a small, very small project in mind, and I was thinking lense flare would put a nice touch on it. I unfortunately had no idea how to do it. So again good! Now I won't have to :)
It's pretty easy to do. However, i'm going to modify the LensFlare-class a little before the official release by splitting the render pass of the lens flare in two separate parts (update/render) for performance reasons.

zammbi

Very nice work you been adding in Egon 8)

C3R14L.K1L4

#7
Quote from: JavaMan on April 22, 2009, 11:31:29 PM
Oh good!  ;D I have a small, very small project in mind, and I was thinking lense flare would put a nice touch on it. I unfortunately had no idea how to do it. So again good! Now I won't have to :)

Usually games render a texture quad (rectangle) with a transparent texture of the flare. Obviously, that quad is always facing the camera. For multiple flares it's the same, but their distributed in a line from the light source to the camera. An example of the first one in WET (quake 3 arena based engine):


http://img510.imageshack.us/img510/2468/image3aku.jpg

As you can see there are three quads on front of all lights.

I've not seen yet the feature Egon added, but quite prossibly it's based on this "technique"...  ::)

EgonOlsen

It's similar but it's done in screen space. Here's how it looks:



BTW: I don't like lens flares. When playing a first person shooter for example, you usually simulate the world like a human would see it. No human being sees lens flares without looking through a camera, which is not what you usually would do while fighting enemies...

JavaMan

#9
QuoteUsually games render a texture quad (rectangle) with a transparent texture of the flare. Obviously, that quad is always facing the camera. For multiple flares it's the same, but their distributed in a line from the light source to the camera. An example of the first one in WET (quake 3 arena based engine):

Thanks for the tip! It looks like that would be good for a glow effect.

QuoteBTW: I don't like lens flares. When playing a first person shooter for example, you usually simulate the world like a human would see it.
It can get annoying. In Star Trek legacy it can be really annoying, but my project isn't a game: more of a demo, test thing.



QuoteNo human being sees lens flares without looking through a camera, which is not what you usually would do while fighting enemies...
I guess you don't wear glasses, at least not at night. Outside at night, I see lots of lense flare from just about every light source. ;)

EgonOlsen

#10
Quote from: JavaMan on April 23, 2009, 11:16:33 PM
I guess you don't wear glasses, at least not at night. Outside at night, I see lots of lense flare from just about every light source. ;)
No i don't, but i should... ;) I think what you see with glasses are coronas or similar, not lens flares. Lens flares like shown above can only be created by multiple lenses in a row, not by glasses. Apart from that, most heros in games don't wear glasses either... ;D