How can I make a material convey the image of a camera? UPBGE

the FPS died

ok so - 1 thing

each lamp has a cost - try shuffling lamps around instead of having many unique lamps
-also try and make use of static shadows if you can.

2 - use material batching - all objects using 1 material can be batched into a single draw call while still having LOD.

  1. are you using a bunch of filters
    ???

all filters are off

gpu?

how many unique materials? objects?

have you used a texture atlas?

how many lamps?

what would be texture atlas?

a single large image containing multiple images used to texture everything in the scene using 1 material.

we can use UV + geometry node / modelo and tile stuff even off that 1 atlas.

ensure you have 16 pixel border around each texture island for mipmapping

(each draw call has a cost, each material a state change cost)

more obejcts using more materials = slower

all objects using 1 material = faster

all objects using 1 material + draw call batching = waaay faster.

1 Like

I do not use

then game is slow*

https://shuvit.org/python_api/bge.types.KX_BatchGroup.html?highlight=batchgroup#KX_BatchGroup

" A draw call is a call to the graphics API to draw objects (e.g draw a triangle), while a batch is a group of draw calls to be drawn together. Batching objects to be drawn together, minimizes the state changes needed to draw each object inside the batch."

https://books.google.com/books?id=7bILAAAAQBAJ&pg=PA433&lpg=PA433&dq=material+state+change+cost+games&source=bl&ots=7wis8rnyOo&sig=ACfU3U0VThbByttKOVZqA7TFpjh90fzcGQ&hl=en&sa=X&ved=2ahUKEwiV07WFtuPlAhURNn0KHZmjBGgQ6AEwAHoECAgQAQ#v=onepage&q=material%20state%20change%20cost%20games&f=false

Baking textures :smiley: help increase the performance a lot since the CPU & GPU don’t have to calculate (Lights, Shadows, Multiple Textures)

then everything has to be unique meshes/uv area and also kills perfs.

best to use batching and use a gpu from after 2010 that is dedicated GPU

Not if all terrain & props are joined to make 1 mesh only.

Not 1 mesh.

  • I’m not trying to fight here, just trying to suggest what I think could help.

That would make occluders useless. Don’t merge the whole level if making anything big.

it really depends, but ive found having more objects with lods and such is far slower than just joining the whole thing into one object. (tested on a 400k vert object)

the biggest factor is collision and raycast efficiency. for objects that have collision enabled, separate objects may be better.

With many objects, meshes, materials and no batching, then yes. But if you have mountains, walls, enterable buildings, etc. not utilizing occluders is pretty bad, specially with high view distance.

This is the scenario of my game, some things like a house (not a house itself) and some objects are missing, but this is the scenario.


I have to pack this mountain

Your right, I was thinking about low-poly meshes in mind :thinking:

@mega_fredbears scene doesn’t seem to have spots for occluders.
He could definitely decimate the polygons tho :sweat_smile:

30k verts for the entire scene is nothing.

Use less lamps. As in, five maximum; one sun, one hemi, three point/spot.
Either go for cheaper shadows or bake them, or do away with entirely.
Apply every modifier that isn’t Armature.

If none of that works, start thinking about a new gpu.
Also you should put an occluder inside the walls of the house, else you’re still rendering the outside when the player goes inside. Even if it’s just a few objects outside and you don’t think it’d be a big deal, it is.

Yes, but it’s indoors. the tower not because you can’t even get in.

1 Like