PFP Drops — an NFTHive exclusive

Hive Digital
8 min readApr 6

--

PFPs created with our Tool — Links at the Bottom!

After we went over basic NFT drops in our last article, we will now come back to the PFP drops briefly mentioned therein. PFP (profile picture) drops were developed to give creators an easy way to mint and sell PFPs or PFP-like NFTs — Images that consist of a random selection from pools of image layers. Check out some collections from our PFP collections page for some examples.

The industry standard way these PFPs are usually created is that the creator has to sit down, combine the layers in an image editor, and mint each of those “manually”. We’re aiming to automate this part of the job, by minting randomized combinations on demand, each time a user claims a drop. The randomization happens 100% on-chain, by leveraging the official WAX random number generator. The whole process is transparent and guaranteed to be fair. We’re aiming to make the technical part as easy as possible, so creators can focus on what they’re doing best: creating art!

Note: If you’re interested in creating a PFP drop, but you’ve never created a drop on NFTHive before, we recommend that you check out our basic drops article first, as it covers a lot of the fundamentals that apply to both basic as well as PFP drops - these fundamentals will not be covered again in this article.

Once again the starting point is nfthive.io/creator — from there click on “Manage Drops” and then “New PFP Drop”. You will be taken to an editor that should seem familiar to you. The fields “Purchase Limits and Restrictions”, “Drop Details”, “Start and End Date / Time”, “Price and Payment details”, and “Restrict Drop to Specific Accounts” behave the same way as basic drops.

The first (and new) field is the attributes field. This is the heart and soul of the drop. This is where you can upload image layers and define their order. Take this VBot for example. (Although it wasn’t created using the PFP drop creator, it’s a good illustration of what layers and attributes are about)

The final image
The attributes (traits) making up the PFP

The image associated with the NFT doesn’t just exist on its own, the metadata which defines how the image is constructed is part of the NFT as well. Going forward we’ll refer to the traits (body, armor, head, … ) as attributes and their characteristics (White, None, Antenna, ….) as values. This is what we’re setting up in the attribute editor.

The attribute editor at the beginning of the process

You have two options here. “Add Attribute” adds a new attribute to the NFT. Using the example above, that would correspond to “body”, “head”, “background”, etc. The “Save” and “Load” buttons allow you to save your progress locally, in a file. These will not write to or read from the blockchain. We added this feature as we realized that adding potentially hundreds of layers can still be time-consuming and not be done within a single session. You can save your progress at any time and come back later.

We’ll create a simple example PFP NFT. Let’s start by adding an attribute “body” that will be the base layer that all NFTs from this drop will share.

Adding a new attribute initializes it with the special ‘none’ value (more on that later)

Immediately some changes become visible: A preview of the (still empty) layers appears at the top, we are informed that this is “A valid combination according to the rules” (more on that in a bit) and the new attribute appeared with some further options.

The ‘body’ attribute has appeared in the editor

What stands out immediately is the ‘Chance’ value of 0, which is flagged as “invalid”. As we were informed on the Popup before, new Attributes are being initialized with a special “none” value. This represents a completely empty layer. In some PFPs or just in certain attributes this makes sense (the VBot above for example has no armor), in our case, we definitely want to have a layer here. There are two ways to achieve this: Either click on the yellow “none” value to update it or click on “Add Value…”. If we instead would have wanted to keep the “none” value, we would have needed to give it a valid “Chance” value (more on Chances further below). For now, let’s click on “Add Value…”

Adding a layer is as simple as selecting the file

All we have to do here is to give the layer a descriptive name (in this case “default”, as it will be the only one available) and upload an image (or provide an IPFS hash). Clicking the Button right to the Upload button will open a preview of the uploaded file in a new tab, so you can double-check if you uploaded the correct one. We will ignore the “Advanced — Multi-Layer Attributes” section for now. Clicking “Add Value” will update the attributes.

Our first value has been added, the preview has been updated

Apart from the preview, the “Chance” value has been updated to the valid value of “1”. It is now guaranteed that this layer will appear on all NFTs.

We will now add three new attributes “eyes”, “mouth”, and “hat”, and add some values.

Our PFP is slowly coming together

If you want to try this for yourself and play around with it, you can download the state shown in the above picture here. Use the “LOAD” button on an empty PFP project to upload the file.

We can tell a few things from the picture:

  • The leftmost column “Z-Index” defines the order (from back to front) in which the layers are rendered. If we were to assign a Z-Index of 4 to the “body” attribute, the eyes and mouth would no longer be visible.
  • There is one possible value for the attribute “body”, three for the attribute “eyes” and two for “mouth” and “hat” each. For the eyes, the second possible value “half_open” is currently rendered in the preview window above.
  • The chance for any of these values to be randomly picked goes down with the total amount of values within an attribute.

If we wanted to increase the probability of a certain value being picked, we can do so by manipulating the “chance” value. In the example above, there are three possible values for the “eyes” attribute: “open”, “half_open”, and “glasses”. Each of these has been initialized with a chance factor of 1. That means, that each of these values will be picked with a chance of [factor] / [sum of all factors] = 1/3. Let’s say we increase the factor of “open” to 8, and leave the factors for the other two values at 1. That means “open” has an 8/10 chance of getting picked, and the other two of 1/10. This is also displayed in the frontend:

The chance of “open” getting picked has increased to 80%

The final two features of the attribute editor we want to go over, are block attributes, and multi-layer attributes.

Block Attributes can be used to tell the editor which combinations of attribute values do not go together. Let’s look at this via an example. For this, we’ve already extended our attributes a bit. It currently looks a bit like this:

We’ve added some more attributes to the PFP

Now we also added a new weird hairdo, which kind of conflicts with the glasses:

We know this example is silly

What we don’t want to happen, is that this particular combination will be picked during minting (as the frames of the glasses make no sense combined with this hairdo). Fortunately for us, we can set up a rule that will prevent this. In the “hair” attribute row, we click on “Block Attributes…” (second button from the right) and a new popup will open.

Making sure undesired combinations don’t make it to the possible outcomes is easy

In the screenshot above, we set up a simple rule that will prevent this from happening. If the hairdo “weird” is randomly picked by the generator, the attribute “eyes” must not be “glasses”. We could add further values or attributes here. Also, we only have to set this up in one direction: We don’t have to go to the “eyes -> glasses” attribute / value and set up a corresponding block rule there, one rule is enough already.

Afterward, this is visible in the frontend as well:

The selected combination is marked as “invalid”, and we’re also being told why. You can review your rulesets this way

The final feature we want to mention is multi-layer attributes. Up until now, any value has had exactly one layer. Multi-layer attributes enable you to add more layers to individual attribute values. Let’s take a look at another example.

This hairdo is both in front of and behind the body layer

Maybe not as obvious at first glance, but the yellow hair as seen in the screenshot above consists of two layers, one is rendered in front of the body layer, one behind it. Also note that in this scenario, the base layer has the z-Index 1 (as opposed to the default of 0). We had to increase all layers by one, so we could sneak in a layer behind the base layer. It’s not visible from the editor, but clicking on the name of the attribute value (“multi-layer”) shows how we did it:

The value “multi-layer” of the attribute “hair” has an extra layer with a separate image file. It is the only value in the entire PFP that has this

The top half of the Pop Up looks like what you’ve come to know by now, the special part is the second image hash in the “Advanced” section. As you can see, it is associated with the Z-Index 0. It is important to pick a layer that is not occupied by any of the “main” attributes. It’s forbidden to assign two ipfs hashes to the same layer within a single combination of attribute values. If we instead would have wanted to place this extra layer on z-Layer 2 for example, we would have re-arranged the main layers to use the z-Indices 0, 1, 3, and 4.

This concludes our introduction to the PFP creator. As always, if you have any further questions, feel free to reach out to us on our discord. We can’t wait to see what you will create with this!

Check out some of the PFP Drops Created with our tool:

--

--