MetaBalls Demo

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

MetaBalls Demo

Post by BlindSide »

Metaballs at 60+ FPS, based on killthesand's original MetaballSceneNode (Big props go to him).

Optimizations include:
- Meshbuffers with dynamic vbos.
- Colour calculations are now done in vertex shader.
- Normal calculations are now done in vertex shader.
- Proximity checks for only calculating values near the metaballs.
- Other optimizations, preallocations, set_used, etc. (Thanks to hybrid for tips.)
- I even went to the lengths of implementing the algorithm using SSE intrinsics, but I ditched it because it ended up slower than just normal C++.

Shader features include:
- Background refraction based on the spheres normals.
- Reflection mapping.
- Fresnal to alternate between refraction and reflection based on view angle.
- Specular with shine-through.

Press Z/X to increase/decrease the quality at runtime (Lower sample width = higher quality).
Press Space to pause the metaballs animation and benefit from VBOs. You can still change the quality while they're paused.

Screenshots:
Image

Image

Image

Image

Download:
http://irrlichtirc.g0dsoft.com/BlindSide/Metaballs.zip

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Oh no, Windows-only binary and no source code :cry: I want to use it under Linux, please give me your code :D
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Holy finickering fangledoms Batman!

They look gorgeous!

I do love how good reflections and refractions make things look!

I get 138fps on startup
Image Image Image
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

hybrid wrote:Oh no, Windows-only binary and no source code :cry: I want to use it under Linux, please give me your code :D
During the process of optimization, the code quickly became rather messy and unorthodox, so I'll PM it to you later to save me the public humiliation. :P :oops:

Either that, or I can compile you a Linux binary, whats your arch? 386? AMD64?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Lekane
Posts: 31
Joined: Thu Jun 01, 2006 7:07 pm

Post by Lekane »

no source code? what's that shader code then? :lol:
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I want all source code, not just some...
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Holy gwakamoly. That's awesome!
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

It's mainly due to the passing of uniform variables to the vertex shader. I didn't want to go through the headache of (Unsupported on ATI) uniform arrays in GLSL, so I passed the Balls' location as singly named variables. This makes the code very unadaptable. Until I think of a better way of handling this I can't release it as a viable solution. Currently the only solution I can think of is to convert it to DirectX, trying to use CG in OpenGL might also somehow work. Oh, or I could use some string manipulation here and there and emulate the arrays somehow, but that would get messy quite fast.

The shaders are free for you to look at and modify, they are pretty much the same as the ones from my refraction demo with a few additions here and there.

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Wow BlindSide that is amazing. Big props to you bro!
TheQuestion = 2B || !2B
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

This demo looks very good:)
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Well ...what a nice piece of coding and math ...good work BlindSide :wink:
Last edited by arras on Sat May 17, 2008 9:29 pm, edited 1 time in total.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

I posted the demo over at Gamedev.net.

Looks like Irrlicht is gaining some more popularity :P
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Yes, our world takeover has commenced!

EDIT: It always seems that your images get featured on gamedev, as they should. :lol:
TheQuestion = 2B || !2B
Blue Hampster
Posts: 39
Joined: Tue Apr 29, 2008 1:41 pm
Contact:

Post by Blue Hampster »

Hey, could I also get a copy of the source for the metaballs as well? pleasssseeeeeeeee
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Blue Hampster wrote:Hey, could I also get a copy of the source for the metaballs as well? pleasssseeeeeeeee
I wanna work on it some more first, make it faster than this and easier to use then release it.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply