Generate 10k NFT Poems

Generate 10k NFT Poems

Table of Contents

  1. Introduction
  2. Setting Up the Hashlips Art Engine
  3. Creating a Template for Generating Poems
  4. Cutting Out Poem Segments
  5. Renaming and Organizing Poem Segments
  6. Configuring the Hashlips Art Engine
  7. Generating Poems with Different Layers
  8. Customizing the Background Image
  9. Understanding the Metadata of Generated Images
  10. Scaling Up: Generating a Hundred Poems

Introduction

In this tutorial, I will guide You through the process of generating NFTs (Non-Fungible Tokens) using the Hashlips Art Engine. You might think it's strange, but with some careful thought, you can actually generate poems using this art engine. We will not focus on the structure of a poem but instead provide you with the tools and know-how to generate them using code. So, let's dive into the wonderful world of generative poetry!

Setting Up the Hashlips Art Engine

Before we can start generating poems, we need to set up the Hashlips Art Engine. Here are the steps to get everything up and running:

  1. Visit the GitHub repository of Hashlips Art Engine: github.com/hashlips
  2. Download the code by either cloning the repository or downloading the latest release.
  3. Install Node.js version 14.18.1 on your system.
  4. Install Visual Studio Code as your code editor.
  5. Open the Hashlips Art Engine folder in Visual Studio Code.
  6. Open the terminal within Visual Studio Code and run npm install to install the dependencies.
  7. Test the program by running npm run generate in the terminal. You should see some images being generated in the bold folder.

Creating a Template for Generating Poems

In order to generate poems, we need a template. You can use any photo editing software to Create a template, but for this tutorial, I'll use Photoshop.

  1. Start by creating a structured template with dark and light boxes inside a big cube.
  2. Use the T-brackets to realign the document after scanning.
  3. Print out the template and start writing your poetry, keeping in mind the structure of the template.
  4. Once you're done writing, scan the template back into your computer and convert it to grayscale.

Cutting Out Poem Segments

Now it's time to cut out the segments of the poem from the template. Follow these steps:

  1. Duplicate the grayscale template image in Photoshop for each segment you want to extract.
  2. Use the selection tool to select each Blue box representing a segment.
  3. Cut and paste the selected segment into a new layer.
  4. Rename the layers according to the segment's position in the poem (e.g., l1, l2, l3, etc.).
  5. Repeat these steps for all segments of the poem.

Renaming and Organizing Poem Segments

To prepare the poem segments for generating images, we need to rename and organize them. Follow these steps:

  1. Ensure that each poem segment layer is visible and remove the background.
  2. Rename each layer with a descriptive name (e.g., l1, l2, l2_1, l3, l4, etc.).
  3. Create folders in the layers folder named after the poem segments (e.g., l1, l2, l2_1, l3, l4, etc.).
  4. Move each corresponding poem segment layer into its respective folder.
  5. Remove the "raw" folder (which was used for initial organization).

Configuring the Hashlips Art Engine

Now let's configure the Hashlips Art Engine to generate our poems:

  1. Open the config.js file within the source folder.
  2. In the layerConfigurations property, update the order of the layers to match the desired rendering order.
  3. Add the folder names of the poem segments in the desired order to the layerConfigurations.
  4. Save the config.js file.

Generating Poems with Different Layers

With the Hashlips Art Engine properly configured, we can now generate poems using the different layers. Follow these steps:

  1. Run npm run generate in the terminal to generate the poems.
  2. Check the bold folder to see the generated images.

Customizing the Background Image

You can customize the background image of the generated poems. Here's how:

  1. Open the config.js file.
  2. Set background.generated to false to have transparent backgrounds.
  3. Set background.static to true.
  4. Replace the background.color with the desired color code or image path.
  5. Save the config.js file.
  6. Run npm run generate in the terminal to generate poems with the new background.

Understanding the Metadata of Generated Images

Each generated image has associated metadata. Here's an overview of the metadata structure:

  • Name: The name of the image.
  • Description: A description of the image.
  • Image: The image file location.
  • Traits: Descriptive attributes of the image, including trait Type and value.

The metadata provides important information about each image, which is crucial for properly displaying and categorizing NFTs in marketplaces.

Scaling Up: Generating a Hundred Poems

To Scale up the generation process, follow these steps:

  1. Update the growEditionSize variable in the config.js file to the desired number of images (e.g., 100).
  2. Run npm run generate in the terminal.
  3. Check the bold folder to find the generated poems.

Congratulations! You have successfully learned how to generate NFT poems using the Hashlips Art Engine. This opens up endless possibilities for creativity and exploration. Enjoy the Journey!


FAQ

Q: Can I use the Hashlips Art Engine to generate images other than poems? A: Yes, the Hashlips Art Engine can be used to generate a wide range of images. By configuring the layers and metadata, you can create unique artworks, avatars, and more.

Q: Can I customize the size of the generated images? A: Yes, you can customize the size of the images by adjusting the configuration settings in the config.js file. Look for the width and Height properties under the imageProperties section.

Q: How can I add rarity weights to certain layers in the generation process? A: To add rarity weights, modify the rarityWeights property in the config.js file. Assign higher weights to the layers you want to be more rare in the generated images.

Q: Can I generate images with different resolutions or formats? A: Yes, you can configure the resolution and format of the generated images by modifying the imageProperties section in the config.js file. Adjust the resolution and fileFormat properties according to your preferences.

Most people like

Find AI tools in Toolify

Join TOOLIFY to find the ai tools

Get started

Sign Up
App rating
4.9
AI Tools
20k+
Trusted Users
5000+
No complicated
No difficulty
Free forever
Browse More Content