HDR Fireworks + Particle Engine benchmark

Hey, guys.
I just put together a small executable version of my little fireworks test.
MediaFire link >_>

Features:

HDR:

  • HDR rendering to a 16-bit floating point render target.
  • Bloom effect to make it look really awesome.
  • Advanced luminance based tone mapping.

Particle engine:

  • Just basic smoothed points.
  • Batched together to a single draw call.
  • A special data buffer that keeps the particles compacted.
  • Uses MappedObject for better performance.
  • Performance is excellent: 575 000 particles at 63 FPS.

Requires:

  • A OpenGL 3.0 compatible video card and OS.
  • Java 1.6.

Any feedback or questions?

About 250k with 30fps.
Effect is really cool.

Hehe, isn’t it? Thanks for testing it!

“Can’t find server JVM” on mine. Win 7 Java 7.

Hi, looked cool at the start, then the VM died after 2s of fireworks. Looks like my computer exploded after all lol.

Btw try setting default values in the menus when they pop up.

Looked cool, good job

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006da33a4b, pid=3356, tid=756
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# V  [jvm.dll+0x243a4b]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x000000000023b000):  JavaThread "main" [_thread_in_vm, id=756, stack(0x0000000002470000,0x0000000002570000)]

siginfo: ExceptionCode=0xc0000005, writing address 0x00000000177f4000

Registers:
RAX=0x3f8000003c23d70a, RBX=0x000000000023b000, RCX=0x0000000002aa1000, RDX=0x0000000016110000
RSP=0x000000000256ee70, RBP=0x000000000256efa0, RSI=0x0000000018bb1000, RDI=0x0000000000000000
R8 =0x0000000000002aab, R9 =0x00000000177f4008, R10=0x0000000002581359, R11=0x000000006d9f2630
R12=0x0000000000000000, R13=0x000000077bec9f00, R14=0x000000000256f000, R15=0x000000000023b000
RIP=0x000000006da33a4b, EFLAGS=0x0000000000010202

Top of Stack: (sp=0x000000000256ee70)
0x000000000256ee70:   000000000000000e 0000000000000000
0x000000000256ee80:   000000000023b000 0000000000000000
0x000000000256ee90:   000000000023b000 000000006d9bdf57


etc etc




---------------  S Y S T E M  ---------------

OS: Windows 7 Build 7601 Service Pack 1

CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 30 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht

Memory: 4k page, physical 8320880k(5640404k free), swap 16639912k(13493832k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (20.1-b02) for windows-amd64 JRE (1.6.0_26-b03), built on May  4 2011 07:15:24 by "java_re" with MS VC++ 8.0 (VS2005)

time: Mon Nov 07 02:11:31 2011
elapsed time: 34 seconds

The bat file starts it with the -server VM command. No idea why it doesn’t work. Try to just double click the jar.

Because you just had to create more than one million particles. Sigh. I’m currently just allocating data for 1 000 000 particles on the GPU, so if you go over that it’ll write outside the buffer bounds and explode. The problem is that 1 million particles is already 24MBs, so it’s pretty much starting to get out of hand. BTW, do you have any performance numbers from your shiny quad core? =D

Runs fine @77fps with ~680,000 particles (Core i7 2600K @ 4Ghz, Radeon HD 5870, Cat 11.9). However, clicking the mouse to “turn off the epic bloom filter” results in a black and white rendering of the fireworks. Turning it on again results in a white screen.

server jvm isnt included in the default jre. only in the jdk one
so usually what people do is copy the server folder from the jdk jre to the normal jre

I5 2500k @ 4.3ghz, radeon 6950.

Roughly 575,000 particles, 103 fps.


#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006bf1e5bb, pid=4704, t
id=9728
#
# JRE version: 7.0_01-b08
# Java VM: Java HotSpot(TM) 64-Bit Server VM (21.1-b02 mixed mode windows-amd64
compressed oops)
# Problematic frame:
# V  [jvm.dll+0x1ee5bb]
#
# Failed to write core dump. Minidumps are not enabled by default on client vers
ions of Windows
#
# An error report file with more information is saved as:
# E:\Roi Atalla\Downloads\fireworks\hs_err_pid4704.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

i7 2600k, GTX 570
I used 1000 fireworks with a brightness of 300

EDIT:
Lowered it to 25 fireworks with a brightness of 15:
about 850K at ~70FPS

[quote]Exception in thread “main” java.lang.IllegalStateException: Function is not supported
at org.lwjgl.BufferChecks.checkFunctionAddress(BufferChecks.java:58)
at org.lwjgl.opengl.GL33.glGenSamplers(GL33.java:141)
at fireworks.gfx.obj.Sampler.(Sampler.java:11)
[/quote]
Next time I reboot I’ll switch to the ATI cards instead of the crap Intel and try again.

It’s black and white because all color channels are over 1, being capped to white. That’s the whole point of the bloom filter. However, the brightness of 680,000 particles is on par with a nuclear bomb, so yeah, no wonder that it’s white. Reduce the color strength of each star a little and/or scroll the mouse wheel up (a lot) to change reduce exposure of the tone mapper and make everything darker.

Really nice FPS for both you and Cero! Now think about what I could do with multithreading! =D

1000 fireworks per update? As in 60 000 fireworks per second, each spewing out a fire trail of 4 particles per update, and then finally exploding into 50-300 stars? The current cap is 1 million particles, which translates to about 30 fireworks per update and it crashes if you go over that (Buffer overflow on the mapped buffer xD). See the bottom of this post

Next time I reboot I’ll switch to the ATI cards instead of the crap Intel and try again.
[/quote]
Only the newest Intel cards support OpenGL 3 if I recall correctly, but I doubt that they support OpenGL 3.3 anyway.

Okay, new version: http://www.mediafire.com/?c1iszts14vackoe
Changes:

  • Dynamically allocates more GPU buffer memory for particles.
  • Soft capped at 10 000 000 particles to avoid filling up RAM and freezing.
  • Default values (the nice looking settings).
  • Writes out the number of fireworks to the console too.

Ok with fireworks2 and 30 fireworks at brightness of 15:
~1.02million particles
~65FPS

I <3 my computer :smiley:

No, i think you misunderstood…it’s fine after startup (but pretty bright as you’ve said) without pressing the mouse button (i.e. with bloom(?)). Clicking the mouse turns it into a black/white-picture, i.e. everything is either deep black or plain white. That includes rockets and such. Clicking it again turns the whole screen white, i.e. there’s no other color visible than 255,255,255.

I hate you. My stationary computer is on the other side of the globe at the moment. Damn this laptop! xD
I have another test that is just a particle sprayer optimized for multicores. Due to the fact that it is very memory limited, it also gets pretty big boosts from hyperthreading! I can get 1 million particles on my laptop’s hyperthreaded dual core i5. Think about how many particles it could handle with a hyperthreaded quad-core running at a higher clock than my processor! Would you mind testing that other program out? It’s a much more boring demo than this one though…

That sounds really weird… You mean the graphics break after you turn off and on the bloom filter?
Concerning the black and white: The particles have a brightness much higher than the screen can display. Therefore, even if the color of a particle is “red” as in (10, 1, 1) after tone mapping, it will still look like white because they are all clamped to 1. Just when the particles fade away you should be able to see their actual color. Sorry if I’m explaining the same thing again, but I just want to be sure you didn’t misunderstand me. xD
You said the fireworks become white too? That’s obviously not supposed to happen. Do you have time to post what graphics card you have, and maybe even screenshots showing the problems?

Thanks again to everyone who tested it!!!

80fps with 350,000 particles or so with bloom on (Core i7, Vista 64, Java 7u01, Nvidia somethingorother) Impressively massive particle count. Makes my piddly sprite engine system look lame.

Cas :slight_smile:

There’s no fading and such…it’s either bright white for all particles or black (in areas without particles). Just like as if you have converted the image to 1 bpp. After disabling, the image is all white (as said). I’ve already posted my specs in my first post.

Okay I can start it now. AMD Brazos E450.

Try 1000 + 200 + yes = explode
Try 1000 + 15 + yes = explode
Try 10 + 15 + no = work slowly

now, where can I see the FPS? I started from jar. Also I pressed ESC but it wont exit.

@Cero
actually I have Java 7u1 SDK here, no normal jre only installation.

doesn matter, when you install jdk it installs jre too and it doesnt have the server folder by default

Program Files\Java\jre7\bin
client folder but no server folder here

Program Files\Java\jdk1.7.0_01\jre\bin
there is a server folder

so copy it. and there you go

sometimes I guess the server folder is there / or the system uses the jre inside the jdk folder by default
but yeah just copy it and thats it

A screen shot of the b/w-mode: http://jpct.de/pix//bwfire.png