Game using implicit surfaces (a.k.a. Metaballs/Blobbies)

Started by
14 comments, last by SpaceDude 19 years, 10 months ago
Woah, seriously impressive game. I love it. Worked flawlessly on my machine too (2200xp/9700pro/winxp).

I like the camera movement a lot as taking shots feels very intuitive, even if you can''t see the cueball or the cue you can still visualize where the ball is going to go.
Advertisement
It doesn''t work on my pc. I get a window of zero size.

amd 1800 xp , geforce 4 ti4400 and win 98 se

The screenshots look nice
quote:Original post by SpaceDude
I have to admit i don''t know what you''re talking about. My colision detection is pretty simple, you can find if a point is above or below your isolevel very easily. And since i''m working with spheres only, i just take the center of the sphere move it along the gradient by its radius and find if that point is above or below. done.


K then it''s all about collision detection only. You just evaluate if the sphere hits the blob, where the iso-potential is 0. And you use the radius and field vector to find which point of the sphere you''ll take to evaluate the potential. Right ?

I thought you used the fields to generate -1/r2 (gravity like) forces, which would also enable some kind of free collision detection + the collision response (as an effect of the force field). Something I call more generally smooth or elastic collisions.

Anyway. Basically what you exploit the centers of metaballs (to get the potential and field) and the sphere centers. What I did is let surfaces (triangles) repulse material points with "anti-gravity" or "magnetic" (as you like) force fields.

This is just newtonian theory with negative masses (or negative gravity as you like) if you see what I mean.
"Coding math tricks in asm is more fun than Java"
or like two equal electrical charges that repel each other in a potential field.
quote:Original post by Charles B
K then it''s all about collision detection only. You just evaluate if the sphere hits the blob, where the iso-potential is 0. And you use the radius and field vector to find which point of the sphere you''ll take to evaluate the potential. Right ?

I thought you used the fields to generate -1/r2 (gravity like) forces, which would also enable some kind of free collision detection + the collision response (as an effect of the force field). Something I call more generally smooth or elastic collisions.

Anyway. Basically what you exploit the centers of metaballs (to get the potential and field) and the sphere centers. What I did is let surfaces (triangles) repulse material points with "anti-gravity" or "magnetic" (as you like) force fields.

This is just newtonian theory with negative masses (or negative gravity as you like) if you see what I mean.


Spacedude here (don´t have login with me atm)

Yes i find out if the sphere hits the iso-potential 1 actually (0 would be at an infinite distance away).

I do generate fields with 1/r2 forces. I understand what you´re talking about now, but I don´t have any elastic collisions going on. Its just like a hard surface where the iso-potential is 1. I think i could change the physics in my game fairly easily to do what you have done. It would make the game even more freaky

Definetely worth a try though to see what it looks like. Thx
Yes i find out if the sphere hits the iso-potential 1 actually (0 would be at an infinite distance away).

Right. But it's because I remember my implementation. I biased the potential value by -1, which does not change the gradient. It's just a bit faster to test sign than comparing to one. Always my bias towards optimizations.

It would make the game even more freaky

Probably, you could set it as an option in your game.

But then beware that you have to keep your solid collisions even if you add these forces. If the physics were perfect (decreasing potential energy due to air-frictions) these collisions could be enough, provided that you can bound the cinectic energy.

Because if the ball has too much speed and due to finite time steps, the ball center might come much too close to a metaball center and cause a division by zero or at least create quasi infinit forces. Another side effect of growing energy due to numerical approximations (here the non infinitesimal time step) in the simulation.

I remember that because it was only a demo and I had not implemented solid collisions. But sometimes, once every 5 minutes roughly, my car got ejected in outer space with astronomic speed, and the decor was not even visible in any direction LOL


[edited by - Charles B on June 7, 2004 8:25:48 AM]
"Coding math tricks in asm is more fun than Java"

This topic is closed to new replies.

Advertisement