Jump to content

Science of the Spheres - development


NovaSilisko

Recommended Posts

Okay, here's something more interesting than a desk! We've gotten an alternate physics engine (Bullet, www.bulletphysics.org) partially implemented into Unity, but it's enough to showcase the differences in similar test cases.

Unity's implementation of PhysX:

crush-physx.gif

And our new implementation of Bullet:

crush.gif

The cubes are all 5x5x5 meters, and weigh 100 kg (technically they're arbitrary mass units but they can be assumed as kg if you like), the sphere is 50m diameter and weighs 25,000 kg. The insane mass difference causes some problems and jittering on both sides, but as has hopefully been demonstrated, Bullet is somewhat more graceful in its errors than PhysX! As a bonus, we've modified Bullet to support double precision, meaning it's ultra-precise in its positions and rotations.

Also note I tried to make both cases as similar as possible, so the same friction and bounciness values, timesteps, etc.

Edited by NovaSilisko
Link to comment
Share on other sites

To me none of the demonstrations look realistic. 0.1 t blocks don't just fly sideways, when a 25 t ball drops on them. The sheer mass of the ball should press the blocks so hard into each other that the increased friction should prevent any great movements of them.

Link to comment
Share on other sites

To me none of the demonstrations look realistic. 0.1 t blocks don't just fly sideways, when a 25 t ball drops on them. The sheer mass of the ball should press the blocks so hard into each other that the increased friction should prevent any great movements of them.

Perhaps if it were simply resting on top of them, but with an impact of great speed, the stacks of blocks will buckle (especially so due to the round shape of the ball - the inner edges of the blocks are pushed downwards before the outer edges, giving the blocks nowhere to go but outward), making a sort of cascading motion as everything is shoved laterally.

But, neither depiction can be completely realistic anyway as these are completely rigid bodies - nothing would be able to withstand that impact without deforming. The ball would easily smash the blocks in the center (and actually would probably yield a result quite similar to the latter image), and receive a large dent on its underside. That's not simulated here, of course. Though time will tell if we want to become total psychopaths and try to make everything deformable.

Anyway, the whole point of the demonstration was to see how gracefully both physics systems handled the same ridiculous scenario. In this case, "Not" and "Quite well", respectively. The increased physical accuracy is just a bonus, too. The real prize is that physics uses double precision for calculations now, thus avoiding most of the issues inherent with floating point numbers that have affected KSP over the years.

Edited by NovaSilisko
Link to comment
Share on other sites

:D

What about the performance of the Bullet engine? Did you make stress tests?

Performance is about the same, a little bit slower, but that's due to the modifications to use double precision. Physics systems won't be too complex in this case (with the possible exception of when you're crashing) so it shouldn't be all too noticeable in-game.

Link to comment
Share on other sites

XD, also wouldn't the implementation of a different physics system be easier to implement multilayer because I think that I read somewhere about PhysX making multiplayer and physics very difficult?

No clue. Let's not talk about multiplayer right now, though :P

Link to comment
Share on other sites

Also, Nova, once you've implemented destructible terrain will you release a demo for us?

There will be a demo at some point, maybe of just the terrain but more likely it will happen later and contain a full game experience, just with a limited area (as in, only one solar system available, no changing coordinates or interstellar travel allowed), and limited tech available.

Link to comment
Share on other sites

PLEASE BE A separate TEST SCENE, PLEASE !!!

otherwise, looks great :) .

one thing that might be nice is a web-player build, to be used as a demo to put on your site, no installation required and perks up the page a bit :)

how did you get a new physics engine in ? asset store ?

Edited by Nemrav
Link to comment
Share on other sites

It's FAR past time we "introduced" ourselves :wink:

Sorry for not being around lately, but with SotS and other jobs going on, I hadn't much time to maintain my mods and keep involved in the community, but I'll try to still help around now and then.

I'm currently responsible for the Bullet integration in Unity we are going to use (which we'll place in the Asset Store for other people to use when it's complete enough) and for the Voxel engine we are creating for SotS too.

We don't have clearly defined roles, so I'll probably end up doing a lot of random stuff after the big systems are in place.

It's nice to see the reception of the dev news here, and I hope we can get something for you guys to play with soonish, maybe a physics rover test room so you can have a bit of fun breaking stuff like we do :D

Link to comment
Share on other sites

O_O modder kings unite(y)

all you need now is ferram4 to do your aerodynamics. :wink: one thing you might find a problem is lift coefficients.... if you plan to have wings.

all still looks great, who knows, you might get a fan art bundle soontm. what's the part standard :)

can't wait :)

edit :

how come KSP no have ? Edited by Nemrav
Link to comment
Share on other sites

I read you want to make it possible to destroy entire planets. Is partial destruction included? If it is, how do you want to avoid the 'floating islands'? I mean the left overs of the crust which weren't destroyed by a bomb and don't have a visible connection to the rest of the plant.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...