Game Graphics: Rasterization

Last time, I talked about racing the beam, a type of graphics used when memory was scarce. Now it’s time to step into the future with more memory and talk about what modern 2D games still do to this day: rasterization.

Just in time Memory

Continuing the trend set by racing the beam, rasterized graphics are also on a grid, just a much tinier one. Though not unique to rasterized, the “frame buffer” is the logical conclusion of bitmap mode fidelity: enough memory is allocated so that every pixel can have its own color. What’s different about a frame buffer is that everything is drawn before it is shown and, crucially, this doesn’t have to happen in the same order as the pixels are displayed. Rasterization draws entire shapes — triangles, lines and rectangles — into the frame buffer and the screen is typically updated all at once. Continue reading “Game Graphics: Rasterization”

Game Graphics: Racing The Beam

Have you ever wondered how the graphics in your favorite video games worked? This is the start of a series on game graphics, and what better place to start than how exactly the original Mario Bros. got those glorious pixely pixels onto the screen. Buckle in, because we’re “racing the beam” with systems like the NES, Commodore 64, and many other classics from the 1980s.

And to understand the 1980’s, it’s important to understand how the televisions of the time worked. Cathode Ray Tube (CRT) televisions work by precisely bombarding a phosphor layer with electrons, which excites the phosphor, which then releases visible light. The beam scans from left to right then top to bottom, giving each pixel a small fraction of a second of time. All of this effectively means that pixel data needs be sent at the same time as when the pixels are being lit up, which is why this type of graphics is often dubbed “racing the beam”.

Continue reading “Game Graphics: Racing The Beam”

Oscillon by Ben F. Laposky

Early Computer Art From The 1950s And 1960s

Modern day computer artist, [Amy Goodchild] surveys a history of Early Computer Art from the 1950s and 1960s. With so much attention presently focused on AI-generated artwork, we should remember that computers have been used to created art for many decades.

Our story begins in 1950 when Ben Laposky started using long exposure photography of cathode ray oscilloscopes to record moving signals generated by electronic circuits. In 1953, Gordon Pask developed the electromechanical MusiColor system. MusiColor empowered musicians to control visual elements including lights, patterns, and motorized color wheels using sound from their instruments. The musicians could interact with the system in real-time, audio-visual jam sessions.

In the early 1960s, BEFLIX (derived form Bell Flix) was developed by Ken Knowlton at Bell Labs as a programming language for generating video animations. The Graphic 1 computer featuring a light pen input device was also developed at Bell Labs. Around the same timeframe, IBM introduced novel visualization technology in the IBM 2250 graphics display for its System/360 computer. The 1967 IBM promotional film Frontiers in Computer Graphics demonstrates the capabilities of the system.

Continue reading “Early Computer Art From The 1950s And 1960s”

3D Animation For All Thanks To Google AI

Google rarely fails to impress with technology demos. Their latest — Monster Mash — is aimed at using artificial intelligence to allow the creation of simple 3D animations without a lot of training or trouble. We’ll warn you: we aren’t artists so we didn’t get the results the demos were showing, but then again, if you are even a little artistic, you’ll probably have better luck than we did. You might want to start watching the video, below.

There’s also a research paper if you are more interested in the technology. The idea is to make simple line drawings in 2D. Then you inflate the object to 3D. The final step is to trace out animation paths.

Continue reading “3D Animation For All Thanks To Google AI”

aemkei's xor patterns

Alien Art Drawn With Surprisingly Simple Math

Programmer [aemkei] Tweeted the formula (x ^ y) % 9 alongside code for more “alien art”. But how can a formula as simple as (x ^ y) % 9 result in a complex design? The combination of Bitwise XOR (^) and Modulo (%) generate a repeating pattern that’s still complex enough to satisfy the eye, and it’s ok if that doesn’t sound like an explanation. Bitwise operations are useful when working with memory and shift registers, but also worth learning if you want to drive lines or matrices of LEDs or interpret combinations of multiple switches, or in this case a great way to throw an interesting test pattern up on a new flip-dot display or low-res LED matrix. Are you into it? We are, so let’s jump in.

XOR Truth Table
0b00 0b01 0b10 0b11
0b00 0b00 0b01 0b10 0b11
0b01 0b01 0b00 0b11 0b10
0b10 0b10 0b11 0b00 0b01
0b11 0b11 0b10 0b01 0b00

Bitwise XOR compares each binary digit of the two inputs. The XOR returns a 1 when only one of the two digits is a 1, otherwise, it returns a zero for that position. Let’s say the coordinates were 3, 2. Converted to binary we have 0b11 and 0b10. From this truth table, we can see the most-significant digits are both 1, returning a 0, while only one of the least-significant digits is a 1, so the comparison returns a 1.

Moving onto the %, which is the Modulo operator has nothing to do with percentages. This operator divides two numbers and returns the remainder if any. Take 9 % 5. When dividing 9 by 5, 5 goes in once with a remainder of 4 so 9 % 5 = 4. Now our original formula from the top will draw a black box for every ninth number except that the bitwise XOR throws a wrench into that count, varying how often a number divisible by 9 appears and supplying the complexity necessary for these awesome patterns.

detail of aemkei's xor patterns

What are the most interesting designs can you create in a simple formula?

Machine Inside Of A Chip: How Sprite_TM Built The FPGA Game Boy Badge

Kids of the 1990’s would call you a liar if you told them that within thirty years you’d go to a conference and be handed a Super Nintendo Entertainment System to wear around your neck. But that’s what happened with the badge Jeroen Domburg, aka [Sprite_TM], designed for the 2019 Hackaday Superconference. It’s built in the Game Boy form factor, complete with a cartridge slot, beautiful screen, and the familiar button layout. But there’s so much more here, like the HDMI port on the bottom and the ability to completely reconfigure the device by dropping a binary file onto it over USB.

Of course what makes this possible is the FPGA at the heart of the design. The story of how the badge was developed is shared in great detail during Sprite’s Supercon talk. The timeline, the hardware choices, and the oopses along the way make for a great story. But what you really don’t want to miss is how he built the machine inside of the FPGA — the collection of Verilog code known as “gateware” that brings together the System-on-a-Chip (SoC). From his delight at being able to spawn more processor cores by changing a single variable, to the fascinating SNES-inspired graphics subsystem, the inside story shared below is even more interesting than the physical device itself.

Continue reading “Machine Inside Of A Chip: How Sprite_TM Built The FPGA Game Boy Badge”

Advanced Techniques For Realistic Baking Animations

Computer graphics have come a long way since the days of Dire Straits and their first computer animated music video in 1985. To move the state of the art forward has taken the labor of countless artists, developers and technicians. Working in just that field, a group from UCLA have developed an advanced system for simulating baking in computer graphics, and the results look absolutely delicious.

We propose a porous thermo-viscoelastoplastic mixture model.

The work is being presented at SIGGRPAH Asia, and being an academic paper, is dense in arcane terminology. To properly simulate baking, the team had to consider a multitude of interdependent processes. There’s heat transfer to consider, the release of carbon dioxide from leavening agents, the browning of dough due to evaporation of water, and all manner of other complicated chemical and physical interactions.

With a model that takes all of these factors into account, the results are amazingly realistic. The team have shown off renders of cookies in the oven, freshly baked loaves of bread being torn apart, and even muffins full of melted chocolate chips.

We imagine it would have been difficult not to work up an appetite during the research process. We’ve seen impressive work from SIGGRAPH before, like this method for printing photorealistic images on 3D surfaces. Video after the break.

Continue reading “Advanced Techniques For Realistic Baking Animations”