Ability to increase number of destructible meshes?

I was testing out a simple destructible mesh imported from the physX Lab and it works fine as you can see by the image below. I was using the guns from the FPS example game project to cause the damage.

I copied and pasted the box over and over and there was no issue until I got to around the 1000th instance. At that point, when I would test out the scene, rather than breaking into pieces like it should it would ‘delete’ the chunks that were supposed to break apart. Whatever chunk was taking damage would instantly disappear rather than fall/ simulate physics. I get the feeling I’m hitting some sort of ‘cap’.

The game I’m working on will require a lot of destructible meshes in one map. I’m aware of the dangers of having too many objects simulating physics at once but that shouldn’t be an issue in our game since not many will be able to be destroyed at once.

Hi,

tune these variables:

p.APEXMaxDestructibleDynamicChunkIslandCount=2000
p.APEXMaxDestructibleDynamicChunkCount=10000

In the Engine\Config\ConsoleVariables.ini.

Regards

Pierdek

Thank you so much!

Where is the ConsoleVariables.ini? I don’t have any…

If you have the engine installed version from the launcher the config files are placed somewhere around:

f:\Epic Games\4.7\Engine\Config\

f:\Epic Games\4.6\Engine\Config\

But it depends where you have installed the engine and which version of the engine you are using.

If you are using the github version you should ask yourself :wink:

So I can’t change it on a per project basis but only globally for the whole engine version? Anyway, thanks!

You can try change them per project by creating config file similiar to “Engine\Config\ConsoleVariables.ini” in your project “YourProject\Config\ConsoleVariables.ini”, but for me it did not work.

Yeah this is what I have tried, and it did not work.
I now put the commands in the global file and it indeed works! Thanks! Do you know what exactly the 2 different commands do? Where is the difference between Chunk Count and Chunk Island Count?

From apex headers:

	/**
		The maximum number of allowed NxActors which represent dynamic groups of chunks.  If a fracturing
		event would cause more NxActors to be created, then some NxActors are released and the chunks they
		represent destroyed.  The NxActors released to make room for others depends on the priority mode.
		If sorting by benefit (see setSortByBenefit), then chunks with the lowest LOD benefit are released
		first.  Otherwise, oldest chunks are released first.
	*/
	virtual void							setMaxDynamicChunkIslandCount(physx::PxU32 maxCount) = 0;



/**
		The maximum number of allowed visible chunks in the scene.  If a fracturing
		event would cause more chunks to be created, then NxActors are released to make room for the
		created chunks.  The priority for released NxActors is the same as described in
		setMaxDynamicChunkIslandCount.
	*/
	virtual void							setMaxChunkCount(physx::PxU32 maxCount) = 0;

I did add these lines to the Console ini file and also the engine ini file and they work int he editor but when I package the game for the console they do not work. I was trying to limit from the default 2000 to 500 for performance reasons on the console. Do you have any idea why this would not work on the console?

p.APEXMaxDestructibleDynamicChunkIslandCount=2000 p.APEXMaxDestructibleDynamicChunkCount=10000

I did add these lines to the Console ini file and also the engine ini file and they work int he editor but when I package the game for the console they do not work. I was trying to limit from the default 2000 to 500 for performance reasons on the console. Do you have any idea why this would not work on the console?

p.APEXMaxDestructibleDynamicChunkIslandCount=2000 p.APEXMaxDestructibleDynamicChunkCount=10000