Thứ Hai, 4 tháng 11, 2013

Monday Vegetables

Eating My Greens

After my success with the terrain LOD performance improvements, I turned my attention to the vegetation system and the hundreds of thousands of polygons that little monster was consuming.  As some beta testers have observed, the vegetables are perhaps the hungriest component of the lot and switching them off provides an immediate speed gain.

I therefore decided to add some additional slider controls to the creation of vegetation and also improve the back-end so that the engine was not rendering invisible grass objects. I had thought that polygons where not the bottleneck, but it seems on older or less powerful graphics chips they are a factor. By not even rendering them in the first place, I could get a speed boost in this area.

The Gain

The upshot of my evenings work dropped the polygon count from 500K down to 200K without ANY visual difference in the scene.


By changing the sliders in a new Quality Settings panel, I managed to drop it down to 86K polygons without too much visual difference.  


When I made my slider adjustments I went from 77fps to 104fps, and remember the 77fps was a lot lower when we had half a million invisible grass polygons knocking about.  

All in all, I am pretty happy with the improvements to the vegetation system and all it has really cost is 4MB for the new grass grid array and some variable quality loss when you start playing with the sliders.  There could even be a way to get that quality back by using larger grass textures with more grass stalks per image, but that is for another day with a friendly neighborhood artists on standby.

Signing Off

I hope you don't mind me making my blogs a little shorter these days as I want to spend more time in fixing and tweaking while the beta is in it's formative months.  

I've used my little 'run to river' game as a benchmark and it looks like controlled vegetation behaves itself now, so the next offenders are a tie between the shadows casting and the AI module.  I have a plan for improved shadow casting speed and also some notion that perhaps the DarkAI is NOT using multi-core which it was designed to do.  These will be my prey tonight, but not too late as I have a few conference calls on Tuesday. You may wander what conference calls have to do with coding, but it's the price you pay for being in a team and coordinating a larger project offensive.

Không có nhận xét nào:

Đăng nhận xét