Tag Info

New answers tagged

-1

Entities should be stored separate from your terrain/voxels. Voxels are represented by integer positions, and therefore not possible to make them move smooth.


0

It's a good idea to keep your static terrain in a single buffer. Updating it for small changes is totally reasonable. However for something like an animation I think you're going to need to diversify your terrain system. Objects like doors, levers, and other objects that need to be animated should not be drawn with the same buffer as the terrain buffer. ...


0

The answer to "How to handle collision" part of your question is something like this: First you need to quickly discard pairs of voxels that are too far away to be colliding (think spatial partition). Then for each pair of voxels that are candidate to collision you should: check if they really are colliding; generate the collision data {penetration, ...


2

Voxels can be considered Axis Aligned Bounding Boxes (AABB)s. I suggest looking up the math surrounding collision detection and AABBs. It's actually quite simple as you can describe an AABB with just two Vectors (a maximum and minimum point). Here's a super simple example: http://www.miguelcasillas.com/?p=30 Of course AABB collision detection is really ...


0

What you would do is have a limited depth for your octree and allow multiple voxels per leaf. I used a depth of around 6-8 for spatial partitioning for collision detection but for voxels you'll probably need more; it's up to you. You'll also need a limit to stored voxels before splitting, say 10 for the sake of example. As your populate your octree when you ...


0

I don't think you should be instancing individual blocks. That's a lot of data you have to send back and forth to the GPU... it just isn't feasible, especially for a voxel engine. I would construct a mesh from the chunk data and place it into a VBO. Every time there is a chunk update, discard the mesh and create a new one in it's place. I feel that the ...


3

The way you are rendering voxels is extremely ineffective. For each cube you have to do calculations, set uniforms, and worst of all bind textures(This is usually a very expensive operation) Typically effective voxel rendering involves multiple techniques to speed up rendering: Rendering in chunks: You split your world into neatly sized proportions, which ...



Top 50 recent answers are included