Well, that’s my sky dome. The perceptive among you may be saying to yourselves “that’s not a dome, and it’s inside the sky.” You may even have added “also, it’s inside a mountain.” All true, for various exciting reasons.
Like most things in 3d graphics, that dome is made out of triangles, and the interesting thing about triangles in 3d graphics is that they have a right side and a wrong side. When the right side is towards the viewer, the graphics software draws the triangle, when it’s not, it doesn’t. This is called backface culling and it’s a little piece of genius. If a triangle in your scene is on the back of a crate or the back of a mountain, the viewer can’t possibly see it, so you don’t want to draw it. How does the software know not to draw it? Because the wrong side is facing the viewer. In a typical scene this simple idea saves hundreds of thousands of wasted drawing operations every second.
I built this dome to wrap around my scene – it’s a sky dome – so the viewable sides of all its triangles face inwards. The nearside of the dome has all its unviewable triangles facing towards you, so they’re invisible. Instead you’re seeing the inside triangles of the far side of the dome.
Why is it smaller than a small mountain? This is the best bit. A sky dome can be any size you like. It can be as small as a nutshell, and still seem as large as infinite space. You draw it first, from a viewpoint somewhere inside it, because the sky is going to be the most distant thing in your scene. Then everything else you draw after that, such as mountains or Prince Hamlet, will overwrite the dome, so it will appear to be inside it. In the picture above I just haven’t done that bit yet.
That was this morning. This afternoon I switched streams and started work on my Branching Narrative Compiler, but that’s a whole other story.