Optimizing The Rasterizer

Does anyone have some tips on optimizing the rasterizer? The rasterizer takes up 80% of the profile in my game. I know the basics like small textures, mipmaps, keeping texture dimensions powers of 2 etc. But are there any other tips that some people might not know?

You can use basic logic to implement a visibility swapping system, send a message when you hit an invisible object and that message tells objects to become visible or invisible.

Anyway, the BGE needs a much better culling system then what it has now in that it renders everything.

Also, use as few lamps as you can, if you only need 2 lamps total to have decent lighting, then so be it.

Also, the Blender.org release logs has optimizing tips if you’re using GLSL.

I believe the GameEngine actually does have frustrum culling. It was added back sometime in 2.3x I think, look at release notes. Granted, it isn’t the best, 100% optimized culling, but it is there.

Culling code is indeed present but not active. I haven’t looked at that code yet but I guess that it could be reactivated with little effort, which should be very positive for the performance.

I think I heard that blender had frustum culling. If blender does have it, it isn’t working very well.

While I love new optimizations, that might not be your whole problem. The percentages in the profile add up to 100%. So, unless your frame rates are dropping, it could just be that the rasterizer is about the only thing working.

I see what you’re saying, but the framerate drops to around 70-80 and I’m not all that far on the game. If it continues to drop like this, I won’t be able to make it very complex.

You can use 1 sun lamp and use all other lamps baked. But it isn’t very realistic…

what’s your hardware? and what settings u using, u can always lower the res in the gameplayer

2.08 GHz AMD Athlon XP Processor
NVidia GeForce4 w/ 64MB memory
I know it’s not the best, but my computer’s 5 years old.

The main problem that I have is that I need 1 of my textures to display full size (no mipmaps) but you can’t do that in blender. You can either disable or enable mipmaps for ALL TEXTURES. When you have mipmaps disabled, It puts a lot more work on the rasterizer. With mipmaps on, rasterizer is at 40%-50% Kinda sucks.

ungh ge-force 4, pretty old card

If blender does have it, it isn’t working very well.
That’s easy to say, but then again are you a coder? Cut them some slack.

Anyways, blender has had frustum culling and back face culling for some time now. What blender lacks is “occlusion culling” and decent object management.

ya but surprisingly, it actually works pretty well for how old it is

New cards are very cheap and frighteningly easy to install (I’ve done it and I’m an idiot). You may wish to think of upgrading.

I’m not trying to say that the coders aren’t doing well (They have been doing a GREAT job and without them we wouldn’t have Blender). I’m just saying that the backface culling doesn’t seem like it works too well.

The coders should put more effort into optimizing the graphics of the GE and fixing the culling. Frustum culling bothers me SO MUCH. It uses an object’s bounds to tell if it in the frustum of the camera. That’s okay for lots of small objects, but if you have a large object like a landscape, frustum culling won’t help at all because that object’s bounds will ALWAYS be in the frustum so the object will always be visible. I would like to see support for detecting if INDIVIDUAL faces are in the frustum so frustum culling would help the GE a little more for larger scale games.

lol, other thread about culling

The only feasible way to do it is implementing some space partitioning system like octrees, it will require an extra “compile” step, but would boost the performance a lot

I’m just saying that the backface culling doesn’t seem like it works too well.
That is the best of backface culling… there’s nothing else to say…

I’ve have coded my own small games and projects before in OpenGL (C++), and backface culling does make a difference in frame rate. Same goes for frustum culling. If blender did not have any culling, I can promise you that your games would run 2-3 times slower.

Disable the Profiler. Then use Fraps to check to your frame rate. Usually a 40% improvement for more comlex scenes. And I get 340% faster for the default scene. It is not that Fraps that is amazing, it is just the the profiler does way more than add up the frames. So the profiler can slow down your whole game.

Yeah I have fraps. It doesn’t seem to make a difference for me.

Just wondering… would it be possible to to frustum culling with individual faces? It would help a lot if you have high poly objects