Introduction to Graphics OptimizationNavigation |
Introduction to Graphics OptimizationSubmitted by epreisz on Sun, 02/11/2007 - 06:07.
If someone were to give you 500,000 lines of code and ask to you increase the framerate from 30hrz to 60hrz, would you know what to do? Where do you start? Should you look at the entire application, or only certain sections? Is it even possible to increase the framerate? Welcome to graphics optimization, a unique, evolving, subset of programming that is often overlooked and misunderstood. It is also a domain that is often not taught, but rather passed from developer to developer like stock tips. Warren Buffet, one of the richest investors in the world stated, “With enough inside information and a million dollars you can go broke in a year”. The same is true of your return on investment in optimization tips. Optimization and Stocks Optimizations and stocks have more in common than tips. When investing in stocks you can gamble on a guess. The same is true for optimization. You may think that a section of code is “probably” slow, but optimizing this code may indeed return zero gains in framerate. That’s right, I said zero. When determining the right stock, we have many tools we can use, but in the end, it’s often an educated guess, a hunch, or experience, that determines a successful stock. The same is true of optimization. The tools we use give us hints and different views into the way our application runs, but the target for optimization is often decided by intuition and experience. Our goal is to make educated guesses. Right Brain Vs Left Brain Science believes that your brain operates in two modes, each controlled by the two hemispheres, the left and right. The left brain is your logical hemisphere. It processes information using a systematic approach. Your left brain views information in a sequential manor the way a program loops through an array. Your left brain performs multiple choice better than it does essay or word problems. Your right brain is your creative hemisphere. It processes information by viewing the forest, not the trees. Your right brain prefers essay questions and word problems over multiple choices. Some people refer to the right brain as your artistic center. Many believe that optimization is an art form. There is some truth to this statement, but there are many who make this claim because they don't understand the science behind the process. When we optimize, we gather information like a detective sleuthing our way towards the next bottleneck, hotspot, or optimization. Sometimes, guesses are involved. Some guesses are educated and others are based on whims or hopes; the science of optimization focuses on educated guesses. New tools, techniques, and processes are putting the science back into the art of video game optimization. By the end of these readings, you will have a systematic approach for optimizing and detecting many of the common performance limiting roadblocks within your graphics application. Optimization Gurus Optimization gurus are not as rare as big foot, but the lack of guru abundance may classify them as an endangered species. In many programming teams it is not uncommon for there to only be one or two programmers who understand optimization. Usually it’s their job to clean up after our messes. It’s not entirely your fault that you don’t understand optimization. Programming, especially video game coding is very difficult. And what we consider a triumph may only lie at the level where we are delighted to see a triangle on the screen. However, our ability to push our limits in video games is reliant on our ability to optimize our application. Also, the technology evolves quickly and it is not uncommon for us to spend our time learning new features not optimizing them. The good news here is that in the past 6 years, much of the optimization techniques for video games haven’t changed (although our ability to detect hotspots and bottlenecks has), and probably won’t change in the near future. |
User login |