Author Topic: jPCT benchmark?  (Read 33181 times)

Offline JavaMan

  • long
  • ***
  • Posts: 231
    • View Profile
Re: jPCT benchmark?
« Reply #15 on: March 11, 2009, 01:10:32 am »
Wow! That sounds great! I know you are just looking into this, but do you have an idea as to when an alpha might be available? I wanted more polys than what jPCT seems to be able to do, so I was looking into jME. But, I would really like to use jPCT instead of jME becuase well, jPCT is so much simpler to use.
« Last Edit: March 11, 2009, 03:22:56 am by JavaMan »

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: jPCT benchmark?
« Reply #16 on: March 11, 2009, 01:43:15 am »
Great, glad your still looking into ways to make it even more faster  :)

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
Re: jPCT benchmark?
« Reply #17 on: March 11, 2009, 04:26:39 pm »
It seems like compiling would only make the models load faster to me.  Not that I know anything.  I'm all for more speed as long as the library stays small.  That's the clear difference between JME and Jpct and I hope it stays that way. 
click here->Fireside 7 Games<-

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: jPCT benchmark?
« Reply #18 on: March 11, 2009, 08:50:49 pm »
It seems like compiling would only make the models load faster to me.  Not that I know anything.  I'm all for more speed as long as the library stays small.  That's the clear difference between JME and Jpct and I hope it stays that way. 
No, they won't load faster. Compiling them will happen at run time and is only valid for the hardware renderer. Adding that feature won't increase the size of the library very much. To the public, there will be two new methods, compile() and decompile()...that's basically all...plus maybe a few helper methods like isCompiled() or something.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: jPCT benchmark?
« Reply #19 on: March 12, 2009, 11:31:02 pm »
Status report: It's coming along nicely...there's still a lot of work to do, but compiling itself works pretty well so far. Right now, i'm compiling the objects into simple vertex arrays, i.e. no VBOs and such (will come later...i just don't want to open another can of worms right now). Some features like environment mapping are still missing and i have to rewrite the multi-threaded GLRenders too.
Here's good old Beethoven rendered using a compiled object (you can't tell...the default pipeline will look exactly the same... ;)):



Even using only simple vertex arrays, it renders around 6 times as fast as with the default render pipeline (330fps compared to 55fps). A simpler test scene benefits by the factor of 4, a very complex scene which results in over 1000 vertex arrays when compiled jumps from 5fps to 20. However, some scenes suffer from compiling them...it's not that the old pipeline will be obsolete with this one...

Offline JavaMan

  • long
  • ***
  • Posts: 231
    • View Profile
Re: jPCT benchmark?
« Reply #20 on: March 13, 2009, 02:49:11 am »
That is fantastic! I can't wait to get my hands on it, when you finish.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: jPCT benchmark?
« Reply #21 on: March 13, 2009, 08:41:18 pm »
Update: Beethoven is at 1700fps now, the more complex model at 125fps. That's around 25-30 times faster than before this change (tested on my Radeon HD 4870/Core2 Quad @ 3Ghz)... ;D
« Last Edit: March 13, 2009, 08:53:32 pm by EgonOlsen »

Offline JavaMan

  • long
  • ***
  • Posts: 231
    • View Profile
Re: jPCT benchmark?
« Reply #22 on: March 13, 2009, 09:40:37 pm »
If you keep increasing fps at this rate, I won't be able to post because of my keyboard shorting out with all my drool. ;D
« Last Edit: March 14, 2009, 01:03:32 am by JavaMan »

Offline C3R14L.K1L4

  • int
  • **
  • Posts: 54
    • View Profile
    • CK's place of many works
Re: jPCT benchmark?
« Reply #23 on: March 14, 2009, 12:29:23 am »
Great news!

Offline .jayderyu

  • long
  • ***
  • Posts: 116
    • View Profile
Re: jPCT benchmark?
« Reply #24 on: March 15, 2009, 05:52:01 pm »
OK just to be clear on this.

A compiled Object will be rendered over at the Video Card, while a non-compiled Object will still be rendered on the CPU.
A compiled Object will not be dynamicly changeable as much as a non compiled object?

I'm pretty good that. I don't really change my objects after creating them anyway?.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: jPCT benchmark?
« Reply #25 on: March 15, 2009, 06:48:03 pm »
A compiled Object will be rendered over at the Video Card, while a non-compiled Object will still be rendered on the CPU.
A compiled Object will not be dynamicly changeable as much as a non compiled object?
Yes, that's basically how it works. In addition, animated objects can be compiled too, but the result will be slower than with static objects...but maybe still faster than using the CPU. I guess it depends in that case.
Compiled objects have some limitations: Their lightMul-value (see Config.lightMul) is implicitly 1 regardless of the setting in Config, because that's the way OpenGL's lighting works. And a compiled object can't use more texture layers than the hardware supports, i.e. 4 on almost any current card and 2 on older ones like GeForce2 and similar. The cpu based pipeline has no limitation here (in theory...in practice, it will become slow anyway with too many layers).

Offline .jayderyu

  • long
  • ***
  • Posts: 116
    • View Profile
Re: jPCT benchmark?
« Reply #26 on: March 15, 2009, 08:57:57 pm »
Ok that's cool. We will also be able to have objects that are either compiled or non compiled? If that's the case that could be very cool. The many "simpler" objects can be done on the GPU while more complex characters could be located on the CPU.

Will it be possible to change textures. If I were to say out of my 2(old card) have a decal texture. Could I modify the decal texture?

Also I was wondering since there is new pipeline being made. Is it possible that there might be easier to allow access to the shader tech?  I would really like to see Cell shading someday :P

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: jPCT benchmark?
« Reply #27 on: March 15, 2009, 09:12:34 pm »
Yes, you can intermix the two modes happily without a problem. In fact, this is something that came to a surprise to me after i've added the first bits of the new stuff...i tried to mix both and it worked right from the beginning... ;D

About the textures...it depends. You can always do a setTexture(...) on a compiled object without a problem. You may as well modify the u/v-coordinates if you've compiled it as "dynamic", which is slower but still faster than cpu processing, at least on my machine. What you can't do is to modify the texture of a single polygon. The compiled object simply won't reflect this change. For a decal, i would go for extra decal polygons on top of the scene's geometry anyway (Robombs does this for example).

And finally about shaders: I guess so. I've no real experience with shaders, but as long as you stay in the pipeline for compiled objects, it should be possible. Maybe i'll add some hooks later that allow people to hook right into the pipeline and do custom stuff...

Offline .jayderyu

  • long
  • ***
  • Posts: 116
    • View Profile
Re: jPCT benchmark?
« Reply #28 on: March 15, 2009, 09:27:18 pm »
That's sounds good. I'll keep the poly-decal idea in mind. I was thinking about a more unlimted customized tattoo placement by modifying the base texture.

As for the shader thing. I know you don't have too much interest. I was just hoping having a "hook" that we could set some LWJGL classes into the object/world/renderpipeline so that we could just access the shader tech in general. I really don't mind it not being part of the integrated JPCT.

Offline JavaMan

  • long
  • ***
  • Posts: 231
    • View Profile
Re: jPCT benchmark?
« Reply #29 on: March 15, 2009, 11:30:02 pm »
So, the only option that is lost from going non-compiled to compiled would be ability to change texture UVs on the fly?