Have you seen the art and designs people have created with Etch-a-Sketch?
Here’s an example of Etch-A-Sketch art:
It took me YEARS to understand how they did that with the Etch a Sketch.
I mean. 42 years to be exact.
I mean here’s the deal with Etch-A-Sketch.
You have TWO knobs. One moves the cursor up and down. The other left and right.
You have ONE cursor that moves that paints black where it’s being moved..
You mess up. ONCE. And you have to shake the Etch-a-Sketch. Erasing everything.
And retry from the start.
Have you seen the creations created with Minecraft?
Amazing. Truly amazing creations.
All this starts with something so utterly simplistic – a single block moved to a certain position in x, y, z, space and then the color of it’s set.
It’s that easy.
Over the course of the last year, I have looked at OpenGL literature and been mired time and time again in complicated literature and even more complicated functionality of how to draw a simple 3d object on the screen.
Now as I look at a 3d object in real life. Let’s say this cup I pick up. I know there are alternate perspectives to the one I have right now.
First, let me describe the cup.
The Starbuck’s Cup is tall. About 9 inches in height. Narrow, maybe 2 1/2 inches across. The exterior is a dark green, with a rougher texture to to it.
You should have a mental image already, right? I type that exact description into google and what do I get?
Nothing that looks like what I am describing. Not even close in fact.
I refine that description a bit:
“The Starbuck’s Cup is tall. About 9 inches in height. Narrow, maybe 2 1/2 inches across. The exterior is a dark green, with a rougher texture to to it.”
“Starbucks tall plastic cup dark green rough exterior texture”
and what do I get?
My cup within the first set of images (the one with the hand icon hovering over it)…
Now as I have read through the OpenGL documentation, as I implement things I repeatedly have problem after problem I encounter with what OpenGL is producing as results.
But OpenGL offers something extremely valuable to me.
I’m abstracted just far enough away from the actual math that I sincerely don’t want to learn – matrix Math – that it’s compelled me time and again to dig into alternative solutions to rendering.
Alternatives, which I might add, create a layer above the math at a cost.
The cost is this:
These engines, whether it’s OpenGL, or Cryengine, or Unreal – come with having to learn ‘how this engine’ does things, which isn’t EVER directly transferable to another engine and/or approach.
And with these engines. As I
waste invest my time in them, I come across hurdles which prevent me from doing the most simple of things.
Such as drawing a simple stupid 3d pyramid into a two dimensional digital image without having a black box surrounding it.
Now I know there’s gonna be an approach where I can eventually do what i want to do.
But to what end?
I spend. Days. Months. years even coming to be an expert in an engine which has abstracted me away from the math all to grapple with problem after problem after problem with the assumptions the engine makes and the implementation nuances.
So I asked the question – When I look at a single point in the real world or I look at a single object on the screen – what do I see when I look at the finest component of it?
I see a positional aspect of the object, I see the color of the object and I see opacity or translucence.
For instance. The cup sitting on my desk.
I look at the edge – near the top. And I see green. it’s slightly darker there because of lighting with a TINY bit of translucence because there’s there’s a sleight transparent wrap around the green….. And it’s about 2 feet away from me to my right.
Now I make assumptions based on the compilations of colors and the slight permutations in distances and lighting which translate to the cup’s texture. This translates into predictions into how this will feel in my hands – which is usually pretty accurate.
Barring of course hot and cold sensations, which often don’t discolor the object.
But for all intents and purposes.
I could leverage a series of points in much the same way an etch-a-sketch works to draw this cup in my visual range.
Sure, there’d be a BOATLOAD of points that would be necessary to make it photo realistic.
But the fact of the matter is. I could recreate this cup in it’s entirety by using a series of lines defined by points.
Each point has it’s own color. This would be in RGB – red/green/blue mix.
Each point would have it’s opacity, from transparent (0) to solid (1.0)
And each point would have it’s x,y,z location.
The simplicity behind this is the fun part.
One continuous series of lines draws the entire object.
Just like an etch o sketch.
This simplifies my object model dramatically to work the math from.
The Source Code in Visual Basic is simple enough:
And the collection class:
Pretty interesting that every physical object i see in my physical world can be described using this simplistic method…
Hopefully I can do the same simplification with the math.