THE BLOCK 8PEPEN CODE

BLOCK 8PEPEN is a generative artwork in which the RGB values are determined by the Block number of the Base Network. The following article delves into the code that powers this unique piece of art.

THE OPEPEN FRAMEWORK

The fundamental structure of the artwork is an 8x8 pixel representation of an Opepen silhouette. Opepen serves as an open art canvas/protocol, encouraging participation from artists worldwide who contribute their interpretations of its shape.

Basic Opepen shape
Basic Opepen shape

The 8PEPEN symbolizes the most simplified form achievable in pixel format, consisting of a total of 64 pixels arranged in an 8x8 grid.

THE BLOCK 8PEPEN

The code driving this artwork generates infinite variations based on the Block Height of each minted piece. Utilizing block data enables ensuring that each minted artwork is unique to its respective block.

The Block Height, or Block Number, influences four key layers of the artwork:

  1. The canvas background color

  2. The position and color of the eyes

  3. The background color of the body

  4. The color and pixel count of the 8pepen body

Block 8pepen Layer
Block 8pepen Layer

1. THE BACKGROUND

To enhance the dynamic nature of the artwork, I've opted to calculate the background color based on the last three digits of the block number on the Base Network.

Let's consider BLOCK 8PEPEN #1 as an illustrative example:

 

For BLOCK 8PEPEN #1, with a block number of 13473826, the RGB values are derived from the last three digits as follows:

R: 6 (multiplied by 25 to fit within the 0-255 range) -> R = 6 * 25 = 200

G: 2 (multiplied by 25) -> G = 2 * 25 = 50

B: 3 (multiplied by 25) -> B = 6 * 25 = 150

Thus, the calculated RGB color for the background of this artwork would be (R: 200, G: 50, B: 150).

Background calculation
Background calculation

2. THE EYES

For the eyes of BLOCK 8PEPEN, they play a significant role in humanizing its shape. The direction of the eyes, either left or right, is determined by the last digit of the block number. Here's the logic:

  • When the last digit is odd, the eyes look to the right side.

  • When the last digit is even, the eyes look to the left side.

Eyes position
Eyes position

3. THE BODY BACKGROUND

To determine the background color of the body in BLOCK 8PEPEN, a grayscale value is derived from the fourth last digit of the block number. The higher the digit, the darker the background; conversely, the lower the digit, the lighter the background.

Starting from a base RGB value of (250, 250, 250), the grayscale value decreases by a factor of 20 for each increment in the digit. At 0, the body background color will be nearly white, while at 9, it will be nearly black.

Body Background color
Body Background color

4. THE BODY COLOR AND PIXELS

For the body of BLOCK 8PEPEN, a grid of random pixels is generated, with the randomness of colors influenced by the RGB components of the last four digits of the block number.

The number of random pixels drawn is determined by the fifth last digit of the block number, contributing to variability in the appearance of the grid. A lower digit results in fewer pixels being drawn, increasing the probability of the body's background color being visible.

The body color itself is determined by a random function, ensuring that every token minted has a unique combination of colors, even if multiple tokens are minted within the same block.

Random Pixel function
Random Pixel function

Random colors are generated for each 64 pixel within the canvas. The randomness is influenced by the RGB components of the last 3 digits.

For each color component (red, green, blue), a random value between 0 and 255 is generated, and the corresponding RGB component of the number (r, g, b) is added to it. This helps ensure that the generated colors are influenced by the RGB components of the number.

The scaling factor for each color component is adjusted based on the fourth last digit of the number. If this digit is even, the scaling factor is set to 2, otherwise, it remains 1.

UNLIMITED & FREE

In conclusion, BLOCK 8PEPEN embodies a fusion of art and technology, where each piece is a unique reflection of the blockchain's data.

Join the journey of discovery and creativity by collecting your own BLOCK 8PEPEN token. The token is free to mint on with an unlimited supply. The code is written to ensure not a single generated artwork is the same.

Embrace the uniqueness of blockchain art and be part of a global community shaping the future of digital expression.Start your collection now and become a part of the groundbreaking Opepen movement.


Thanks for your time and interest in my art. You can visit filter8.xyz for more information.

You can find me on warpcaster or twitter.

Wish you a wonderful day.

Your Filter 💜

Subscribe to FILTER8
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.