UPBGE 3.0 Lags when activates Add Object

There’s any solution for this? Maybe increases logical memory or something? My scene is a little bit complex but the object is simple as well, just a plane with some text objects.

My goal is to make an inventory to the player.

Maybe the text objects have physics enabled, thats why when added to scene lags occur…

Its hard to be sure without having a look :slight_smile:

Well, every text object is set to No Collision. Normally when the lag happens makes a usage spike on dephsgraph, but I don’t know for sure now.

my guess its a side-effect of the eevee bge integration. its possible the object game-conversion process isnt optimized. which case theres nothing to do.

Desgraph is related to Blender routine elements such as modifiers.
Does your object have an modifiers? Speaking of which, how about material nodes, is it a complex setup?

The material nodes of the text and item background are simply emission shaders.

The thing is that no matter if the added object is an empty or a cube with complex material, it always make a lag instant.

My workaround for this is to instead of adding/ending the object (both of these actuators causes lag) I make an animation to the object appear and disappear beign very far from the camera.

In the past I was having a lot of troubles to find out what’s wrong with a subtitles system that I’ve done and I find out that is Adding/Removing (both as actuators and python script) is what makes the lag spike.

I believe Emission nodes are relatively heavier in a real-time scene that normal light entities. Emission is a material shader so it has to calculate more.

1 Like

A post was split to a new topic: How to use occlusion culling feature in UPBGE 3.0