Hot answers tagged

13

It's mainly used for frustum/occlusion culling and minimizing the collision checks between the objects. Not true. It's mainly used for programming convenience and hierarchial animation. There is no way culling and collision checks benefit from scene graphs. Quite the opposite, actually, since it's required to calculate and cache the world space data before ...


8

Neither is needed. The choice of scene graphs or spatial partitioning or both is a matter of optimisation. And until you have a functioning game, you have nothing to optimise. So obsessing over this sort of detail now is counter-productive to the creation of your game. My advice: make the game, then measure which bits of it are slow, and finally fix ...


7

I tend to disagree with Trevor Powell's answer as there are clearly two different kinds of optimization here. One is optimization after the fact and to make the slow parts go fast, which is what he has touched on, but the other is designing your data structures and flow control to be at least reasonably efficient and sensible in the first place. The second ...


3

The issue I experienced was NOT standard OpenGL behaviour. I had accidentally enabled GL_POLYGON_OFFSET_FILL in my code, which apparently causes the polygon fragments to not line up. Disabling POLYGON_OFFSET_FILL fixed the problem.


3

The point is that once you cull one octree node, you can stop culling and discard all of its children therein. Consider a binary search for example. Once you know that your key isn't in one part of the array, you can stop searching that part completely. The check itself isn't easier to compute, it just decreases the number of calls you may have to make (as ...


2

From your sample image, it looks like the projection you're using is orthographic. If that's the case you can pre-render the whole map to an image/set of images( depending on your resolution) . Then in your game you can just crop to the portion of the image that would be visible from the camera and paint the image in the background. Of course, this will ...


2

The problem seems to be in finding the lightmap texture coordinates, which I assumed were the same as the face textures. They're not. If we examine the RTCW source code, paying particular attention to the ParseTriSurf function, we see the code for loading lightmap texture coordinates is as follows: for ( j = 0 ; j < 2 ; j++ ) { tri->...


1

Yes, split them. The concept of BSP trees is almost as old as it's possible for something to be, in terms of graphics programming. Their use dates back to the Quake engine in 1996, and the Quake engine and its tools provide a sample implementation that has since been released under the GNU GPL, although you should be aware that the code isn't quite up to ...


1

You may look into https://github.com/libgdx/libgdx/wiki/ModelBuilder%2C-MeshBuilder-and-MeshPartBuilder . You can construct your level walls using a single model with more than one mesh parts. Here is some sample code: ModelBuilder worldBuilder = new ModelBuilder(); MeshPartBuilder meshBuilder; Vector3 corner00 = new Vector3(), corner10 = new Vector3()...


1

I think it's because those are 'dentils' (an architecture element. As such, they are spaced apart. They're supposed to go under a ledge. Google images of dentils. Oh, also, look at the file name and see if THAT is named 'dentil'. That'll tell you. As a workaround I'd put a background behind it.


1

Luckily, the BSP file format is well documented (with an overview on wikipedia). While this is great, it's clear from the documentation that you have a good deal of work ahead of you to write a importer for .BSP files. Your first steps should be getting your file parser working through the lumps and printing out when when it reaches each face/vertex. (Make ...


1

This will depend a lot on your game. Counter-Strike, or any source engine game or any Quake derivative, and most other FPSs will have custom editing tools for the actual act of crating a level. That tool will bake the specified static meshes into the format by applying some algorithm. That format will be a spacial index. In the example case, BSP stands for ...


1

Space partitioning would be useless for A* in an established graph. Spatial partitioning speeds collision checking, which is useful when constructing a graph that you navigate with A*. In a static environment, you should be pre-calculating the graph. In a dynamic environment, you will need to do some collision-checking on-the-fly to, at the very least, ...


Only top voted, non community-wiki answers of a minimum length are eligible