Jump to content

  • Log In with Google      Sign In   
  • Create Account

Voxel game colliders.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Marron   Members   -  Reputation: 115

Like
0Likes
Like

Posted 24 May 2014 - 10:52 AM

Hello ! Can someone please explain how can colliders be implemented in a voxel game ? Or at least link to explanation, because I wasn't able to find it anywhere. I want to state that I am using OpenGL 3.3, so I can't just turn on 'mesh colliders' like in Unity. :)

 

Anticipated thanks.



Sponsor:

#2 frob   Moderators   -  Reputation: 21106

Like
1Likes
Like

Posted 24 May 2014 - 10:56 PM

You seem to be confusing graphics with physics.

The two are not directly interchangable.

Some game engines will use graphics meshes to build physics objects. Other games allow for many different types of physics objects; some use modeler-generated physics objects, some use 'footprints' that are laid down over a 2D navigation grid even though the world is a 3D mesh, some use rough bounding boxes rather than detailed meshes, some use combinations of these and more variations too.
Check out my personal indie blog at bryanwagstaff.com.

#3 Krohm   Crossbones+   -  Reputation: 3109

Like
0Likes
Like

Posted 25 May 2014 - 09:10 PM

It's going to be one hell of a work.

If you think voxel world, I think you're trying to do minecraft. An easy way to deal with collisions is the use of an external library. Bullet goes great with OpenGL since it uses the same coordinate system. Unfortunately, it's likely to run amok as you walk away from the center. Minecraft has an ad-hoc physics and still runs amok - after a few hours of walking from the origin I have been told.

 

Nonetheless, I strongly suggest to look at a physics library.

 

Due to the massive amounts of cubes in voxel worlds, you'll probably have to implement some very gross-grained block merge. While I've found cuboids to be fairly fast at both operation and add/remove operations, once you start having ten thousands objects, you'll be taxing the system a bit more than I'd like to and if your chunks are - say 30x30x30 you'll be blasting that big way!



#4 kalle_h   Members   -  Reputation: 1386

Like
0Likes
Like

Posted 26 May 2014 - 03:15 PM

It's going to be one hell of a work.

If you think voxel world, I think you're trying to do minecraft. An easy way to deal with collisions is the use of an external library. Bullet goes great with OpenGL since it uses the same coordinate system. Unfortunately, it's likely to run amok as you walk away from the center. Minecraft has an ad-hoc physics and still runs amok - after a few hours of walking from the origin I have been told.

 

Nonetheless, I strongly suggest to look at a physics library.

 

Due to the massive amounts of cubes in voxel worlds, you'll probably have to implement some very gross-grained block merge. While I've found cuboids to be fairly fast at both operation and add/remove operations, once you start having ten thousands objects, you'll be taxing the system a bit more than I'd like to and if your chunks are - say 30x30x30 you'll be blasting that big way!

 

Minecraft like world is rather poor fit with general physic engines if you can't explicitly tell to physic engine that whole world is built from static, uniform sized and spaced cubes. Basically it has acceleration structure built in and you need just 1 bit to store voxel and then you can do all physics in local space to battle against floating point errors.

But if you want complex physics then doing robust collions resolves with dynamic vs dynamic objects is going to be just as hard as always.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS