Rendering

Physically Based Rendering - Material

I learned the shading magic like how the most of others did, from a classic Blinn-Phong model to some more complex models like Cook-Torrance model, but the understanding would always be confined around the common practices shaped by our slow speed computer, and our eager desires for the more realistic results. With these compensations, tricks, and hacks we may achieve lots of cool and amazing stuff at first, but if we don’t have a clear bird’s-eye view (for example people like me who is always…

Read
GameMath

Row-Major or Column-Major? Some notes about matrix convention

[](<>)The mathematical conventions Generally speaking, when we want to “render” something to the screen, it means we need to calculate the “color” of each pixel on the refreshing LCD in front of us, and then ask some hardware to fulfill those pixels with the color we specified. But typically what we have in our hard disk are just some mesh and texture data files, which only contain some basic information about the object we want to render, like how many vertexes they have, where the vertex’s position…

Read
GameMath

Space, coordinates, and the magic Quaternion

[](<>)Where is where? In our daily life, when someone asked for the help about how to reach the place they want to go, we would answer them like “walk toward **north** and turn **left** at the first corner”, and here we use some kind of coordinate system to represent the _relativity_ of position in the world we are. And in our virtual world inside the computer, it would be awesome if we could use the same **north** and **left** concepts. But since the computer only knows 0 and 1, there are lots of difficulties to make a **north** really **…**

Read