Using collision shapes

Previously we’ve used a bounding box and bounding sphere to check whether or not an object is visible to the camera or touched and dragged. We’ve also seen that this can cause false positives. Sometimes you need a more precise method to check intersection. Collision shapes can be used to get a very accurate intersection check at almost no performance costs. They are also fundamental for collision detection and physics.
Continue reading

3D frustum culling with libgdx

When rendering a 3D scene, the actual amount of visible objects is often a lot less than the total amount of objects within the scene. Rendering all object, even those that are not visible, can be a waste of precious GPU time and decrease the speed of the game. Ideally you’d want to render only those objects which are actually visible to the camera and ignore all other objects which for example are behind the camera. This is known as frustum culling and there are several ways to accomplish this. This tutorial will show you the very basics in how to accomplish frustum culling using the 3D api of LibGDX.
Continue reading

Behind the 3D scenes – part2

In the first part of this tutorial we’ve seen the overall structure of the Model class of the LibGDX 3D API. In this second part we will look at the rendering pipeline, starting from loading the model, all the way up to actually rendering the model. We will not go in depth on each specific part of the rendering pipeline. We’ll just look at the very basics, which I think you should know when working with the 3D api.
Continue reading

Behind the 3D scenes – part1

In the previous tutorial we’ve seen how to load a 3D scene using LibGDX. Now we’re going to take a quick look at what is actually going on behind the scenes. You don’t have to know this information to actually use the 3D api and if you don’t care how things work, you can safely ignore this. But I think it is good practice to know what is going on and how you can benefit from that. Therefor, this tutorial will cover the very basics, which I think you should know when working with the 3D api.
Continue reading