How to use AI-Generated game assets and mint as NFT

How to use AI-Generated game assets and mint as NFT  - thirdweb Guides

This guide will show you how to generate game assets using Scenario and mint them as NFTs.

We'll walk through the following:

  1. Create a generator and train it
  2. Use the generator to generate images
  3. Create a smart contract to mint these as NFTs

Let's get started!

Creating a generator

Go to Scenario and sign up if you haven't already. Once you are logged in click on the create generator section:

Create a generator

Give your generator a name and upload some images for your project.

Create a generator

Once you have uploaded all the images, you can accept all. Now if you want, you can remove the backgrounds. Once completed, select Next.

Upload images to the generator

You will now be able to select a training mode. I will go with auto for now:

Select the training mode for the generator

Finally, choose what you want to create. I am going to make a character.

Select concept for the generator

Now, click on training. It will take a few minutes to train the dataset. Once completed, click on generate images.

Generating assets

Here you will be able to see the generator that you have just created. Select it, and now we are all set to generate our assets. We are going to need some prompts to develop our assets. If you need to learn more about prompt engineering, use the prompt helper illustrated below. Try changing the settings according to your need and generate some assets. Finally, download the ones you like, and we will mint them as NFTs next!

Generate assets

Deploying an ERC721 Drop

I will create unique NFTs, so I am choosing the ERC721 standard, but you can also create multiple of the same using ERC1155.

To begin, head to the Contracts page in your thirdweb Dashboard and hit "Deploy new contract":

deploy new contract

You will be taken to our Explore page — where you can browse smart contracts built by the top protocols in web3 and deploy them in just a few clicks!

Note: You can also use the thirdweb CLI to set up a smart contract environment by running the below command from your terminal:

npx thirdweb create contract

This will take you through an easy-to-follow flow of steps for you to create your contract. Learn more about this in our CLI guide.

Otherwise, let's get back to Explore:

thirdweb explore page


Here, select your smart contract of choice. For this guide, we're going to use the NFT Drop (ERC721) contract to create our NFT collection:

Set up your smart contract with an image, name, description, etc., and configure which wallet address will receive the funds from primary and secondary sales:

Add metadata for the contract

You can select any network you like; I am choosing Mumbai for this guide. Learn more about the different networks we have available below:

Which Blockchain & Network Should I Use?
Learn the typical workflow for deploying smart contracts on to a blockchain, with an overview of the different options available to you on thirdweb.

If you want to lazy-mint many NFTs simultaneously, you can use batch upload instead of doing them individually.

Once the contract deploys, go to the NFT tab and click on mint. A drawer will open where you need to add the metadata of your NFT.

Mint an NFT

Once you have entered the metadata, click on Mint NFT and approve the transaction!

Set Up Claim Conditions

Claim conditions are the criteria that define who, when, and how users can claim an NFT from your drop, such as release dates, allowlists, and claim limits.

To add a claim phase, head to the Claim Conditions tab and click Add Initial Claim Phase:

Set up claim conditions

Here, you can configure the price, release date, and more for your NFT drop:

Setup claim phase

Update the details as you want and save the claim phase!

Claiming NFTs From the Dashboard

From the NFTs tab, you can click the Claim button to mint NFTs from your drop directly through the dashboard:

Enter the wallet address and quantity you wish to mint too, and click Claim NFT.

Claim NFTs


That's it! You've just minted the first NFT from the drop:

Our first NFT has been minted!

Conclusion

This guide taught us how to use Scenario to generate game assets using AI and mint them as NFTs!

If you did as well, pat yourself on the back and share it with us on the thirdweb discord!