Clipping Range used as occlusion culling?

I’m getting to the point where my game is getting big. However, I don’t want to switch scenes or load another level because I need seamless travelling. It is (somewhat) pretty open, based on a shallow ocean with small plots of islands. I have a skybox, clouds, and a sun with a “track to” to my player, with the camera clipping ending at just after the skybox. My question is, is this basically the same as occlusion culling? Like, is everything out of my camera’s range of view not rendered? That’s the way I have it set up now and I’m trying different ways to make the frame rate go up while playing.

Also, is using the particle system to place plants on land better performance wise than having individual plant objects (even if you use alt+d to have the data linked) placed throughout the land? Like, does BGE read the particle system as just using one object, even though it shows it randomly everywhere?

And what would be a good way to use occlusion culling in an open world type of game. I’d turn it off, but I have a first person view setup and when I turn it off from not using it, my camera wont show the arms of my player unless I move my camera far away from the player. So, If I have to have it on, I’d rather know how to use it. Second, is occlusion culling better for performance than using an “add object” actuator when an area senses you and a “end object” when you leave said area?

Thanks everyone.

Okay so I just realized particle system is a no go in bge. Any other good ways to randomly put grass, plants, etc everywhere?

  1. Yeah everything outside the clip is not rendered. (you’ll still lose a few frames if you have a lot of stuff back there)
  2. Yeah, alt+d refers from one object.
  3. Switch to internal, create a particle system, convert it and switch back to the game engine.
  4. Use an occluder around buildings that the player can enter for example. When the player is on the outside, things inside the building will not be rendered. Inside it, things on the outside will not be rendered.
  5. Adding and ending objects will be more efficient than occluding them.

For more information on optimization, watch my tutorial

Yes you can use the particle system to place objects, (grass, plants, etc.) there is a video in resources on how to do this.

Another thing you can do is group instance object, with an LOD attached to them, example; there is only one palm tree on an inactive layer (or in another Blend file) that is part of a group, along with some grass. Place an empty on the main scene, and make an instance of it. Alt D copy that empty, or use the particle system, to place the palm tree around your main scene.
(linking a group instance from another Blend includes it’s own empty)

Use LOD also with islands, and stuff, so that the further away you get the LOD takes affect.
The built in LOD works well.

Faces that are outside of the camera frustum are not rendered.

While this decreases render time the objects are still present (but not shown to the audience) and will be considered by other aspects of the game (logic, scene graph, physics, animation …).

Occlusion culling is an additional option to skip rendering faces (that are not already outside the camera frustum). You should be careful that the saved render time is greater that the additional culling processing time.

Blender’s Particle system is not supported by the BGE as you might have noticed. The BGE supports dynamically copying objects on the fly. This can be used to create particle effects. The objects are ordinary game objects following the same rules as any other object.

Be aware each single object increases the processing time on all aspects of the game (not just render time). As more objects exist in your scene as more processing time will be used.

As you might have noticed the Culling mechanics are pretty rough. Either the face gets rendered or not. The LOD (Level of detail) provides a finer granularity (to the costs of memory and development time). As each additional face increases render time, the LOD approach tries to reduce the number of simultaneously rendered faces. The design is to use a mesh with less faces when distance to the camera is larger. The idea is that the audience will hardly notice the changes to the mesh.

Again this reduces render time only.

Object culling/Object streaming
This is a must have in a real open world architecture. While the above methods limit render to the visible area, this one loads/unloads objects. You can see it as “lowest LOD” level. This means the objects are removed from the game and reestablished when necessary.

While removing is easy the last one can be tricky as you need to know what to create when and where.

Out of sight processing
Additionally certain aspects of your game might still need a transformation. For example you might not need to render a "“dealer character” while the NPC went away. You do not need to consider it’s physics and animation because of the distance. I might not even be possible to interact with it. But it might have still impact on to your game world. E.g. it moves from city A to village B over time. It byes and sells things which results in changes of it’s inventory and money. It has impact on the economy of the whole area. It might get ill, or killed. This is called out-of-sight processing (as you can’t see what happens).

Just some thoughts

Hi, as says Monster, culling is used to avoid to render geometry of objects that are outside camera frustum. The frustum is set in camera panel (mainly clip start and clip end, and angle of view). The Frustum looks like this: (It’s an old patch I made but that is not in Blender).

To improve culling system, there is the LOD (Level of details feature). With this you can replace distant meshes from the camera by decimate or simplified meshes with less geometry according to distance from the camera. I repeat what said Monster sorry.

When you duplicate your meshes with ALT+D, they share the same mesh but I think there is no rendering optimization (just memory optimization) in BGE. In upbge we have Geometry Instancing that can be very efficient for things like grass I think.

There is also a culling system for animations that are outside camera frustum. There are other types of culling for lamps, the objects that are outside lamp frustum won’t render shadows…

But there is no culling for physics (I made patches to control physics culling in upbge that are not in the trunk yet but I hope this will be in the next upbge release). For the moment the only way to have a kind of culling for physics for objects is to use either suspendDynamics actuators or the python API to suspend dynamics, or replace meshes. For soft body, impossible to stop soft body simulation (I made a patch in upbge too for this but not yet commited). Physics can have a big impact on performances depending on geometry and bounds choice.

In many cases, insideFrustum API functions can be used to implement your own custom culling. We have many other tools to otpimize this in upbge (insideFrustum API is a bit complex, we have a function object.culled for example which does approximatively the same in upbge). If you have shaders in your scene, you can for example stop passing uniformas to the shader when the object is culled or not inside frustum.

There are some articles in BA forums about how to optimize your games. There are tons of possibilities. I think that when you make your game, you always have to think about performance impact of what you are doing, when you are scripting, modeling, texturing, making shaders…

We have other otimization tools in upbge too that are not in BGE for the moment (constant materials…). All of this is described in upbge release notes but I speak too much about the upbge sorry hehe.

I forgot also baking that can be really important for lighting effects and to transmorm high poly meshes in low poly meshes with textures that simulate reliefs.

Blender’s Particle system is not supported by the BGE as you might have noticed. The BGE supports dynamically copying objects on the fly. This can be used to create particle effects. The objects are ordinary game objects following the same rules as any other object.

Right, but . . . You can use the particle system to place objects in the game scene, in Render mode, it makes it easy on uneven terrain, Then you switch back to the game engine. And your objects are there. I’ve done it by following the tutorial in resources.

To improve culling system, there is the LOD (Level of details feature). With this you can replace distant meshes from the camera by decimate or simplified meshes with less geometry according to distance from the camera.

You would also change the texture to something smaller. And if it’s out of sight, replace it with a 3 vertex plane. (merge two vertaces (?spelling) on a plane) replace that 4048 x 4048 texture with 64 x 64 on large terrains.
I wouldn’t use the built in LOD to create LODs, rather, I make my own LOD, and try to blend it so that the popping in and out, is not so noticable. That’s where the magic is. Sometimes I’m succsessful, sometimes not so much.
Unreal uses screen size (how large an object appears in in the screen, by percentage) instead of distance. I’m thinking this might be more efficient because its calculating in 2D, rather than 3D. But IDK for sure.

Really, this is all great advice guys. Thanks a lot! One more question on the subject, didn’t want to make another thread… is there a way to LOD texture on a terrain ground so that after a certain distance it is lower res or smaller size or something? I’ve looked on the forum and have seen other things like terrain LOD for actualy terrain geometry but most all my terrain is basically low polly. And even without spec and bump map textures, my diffuse texture alone puts a beating on my game (and it freaking 512 X 512, yeah I’m trying to stretch this performance thing out.) I’m basically getting 45-70 fps in the stand alone player depending on what I look at. So I’m trying to get the average higher before moving onto more designing/modeling and adding islands.

But yeah, so far of all the threads I’ve made on this forum this one has gotten the best and most straightforward answers. Thanks a ton!