Optimization question


I am currently trying to create a game where the map is made of multiple small parts, so the player can modify or replace them. Now my naive approach was to model the parts in Blender and then import them through the asset manager and load them ingame. This however, gives me troubles in the fps department. I have currently roughly 4100 of such pieces loaded (they have simple shapes, nothing complex or animated, currently shapes with 8 corners and 6 faces, like cubes) and my fps is already below 60. So I concluded that creating them in Blender and loading them through the asset manager is not the best approach? How can I optimize this?

Thanks for your help.

Questions along these lines have been asked a lot - try using the forum search.

Basically graphics cards can handle massive numbers of vertices - but not massive numbers of objects.

You need to merge your objects together.

Keywords for searching:
Box worlds
Custom Mesh

Ok, so I take it that I have to group all objects which are adjacent to each other into one big object?

Is there a tutorial somewhere on what “batching” or a BatchNode is? I don’t understand that concept.

Batching is combining multiple objects into one mesh. As I said search on those keywords and read up on them (the javadoc on batch node should explain it as well I guess).

I’ve decided not to implement this, as it is a very advanced topic. Instead I want to use a different approach now, but it might be related to the original problem.

Let’s say I have a scene made of one object created in Blender. Now what I would like to do is change a texture in one part of the scene. For example we have a brick wall and the player hits it with a hammer. Now I want to change the texture of the spot hit into a broken brickwall texture.

Any tutorials/hints/older posts how I can achieve this? Is this significantly easier than the “world made of many dynamic objects” problem?

you can use Zarch’s ImagePainter Plugin :wink: or the ImageRaster, to change parts of Textures. You can also search up decals, and projected texture mapping (maybe)

I wouldn’t consider having a completely modifiable world, whether its modifing vertices or textures easy