# Generative Art

<figure><img src="https://3705667097-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgfLdtGYbRx63ivinWz%2Fuploads%2F53q5FsEk58u4ChCaLFnI%2Fgqgr.png?alt=media&#x26;token=6bb14af9-e354-48c1-82d1-53ceebb6f0f1" alt=""><figcaption></figcaption></figure>

## What is generative art?

Generative art is a creative process where artists use **computer programs or algorithms** to produce artwork. The artist first defines rules and parameters that guide the computer in generating the art. These rules can include mathematical equations, randomness, or even data from the environment.&#x20;

The beauty of this art lies in its ability to produce unexpected and evolving creations, as the computer can generate countless variations based on the initial instructions. It's a blend of human creativity and machine execution, offering new possibilities for artistic expression.

## Collaboration with KodaDot

We are more than happy to support artists. We can offer a package of benefits that will help promote your art, get you a new audience, and expose your art to more collectors. We organized several successful exhibitions around the world, and we continue with our efforts.

#### Please read this document carefully 🚀

### Code requests:

1. The same hash produces the same output
2. Different screen resolution produces the same art
3. With different hashes, art has enough entropy - there are enough variations
4. Art should listen to the changes in screen resolutions

## Specs of the code

* **P5js** is supported very well.
* WebGL is supported but needs to be properly tested in our code-checker).
* Your code works on low-performance machines and doesn't require heavy computing.
* **Load fast** - if it's working slowly, it breaks joy from art - **load time should be under 3 seconds.**
* Animated/Loop NFTs are supported.
* The payload for clients should not be big.
* Art must utilize viewport size (smaller value from width and height).
* Just to let you know, 600x600 px versions of your art pieces will be used for the "screenshot" for the preview.
* The collection should have **enough entropy** to avoid collisions of the same pictures in bigger-sized editions.
* For testing, provide Zip files (they can be tested in the code-checker too)
* Art: 1x1: **Square shape**
* Art code should not be minified - written as a "string" of code.

## What format does KodaDot support?&#x20;

The file should be in HTML/JS/CSS, and it needs to accept a URL parameter called **hash**. Each hash should be able to change your art.&#x20;

*Example:* [*https://image.w.kodadot.xyz/ipfs/bafybeigsw7gagsmvxxivt5kvrl6ueld7yszzef2aylxbzzafez6ybxscca/?hash=0x175adf5fc058830a6319b8238ecc911db6e1b8dd40965629b5f0c5bee655598c*](https://image.w.kodadot.xyz/ipfs/bafybeigsw7gagsmvxxivt5kvrl6ueld7yszzef2aylxbzzafez6ybxscca/?hash=0x175adf5fc058830a6319b8238ecc911db6e1b8dd40965629b5f0c5bee655598c)

In this case, our hash is: ***0x175adf5fc058830a6319b8238ecc911db6e1b8dd40965629b5f0c5bee655598c***

***

*Example 2:*

*The first generative art collection we minted on KodaDot used classical html/css/js + p5.js" basically the simple template. The collection is* [*here*](https://kodadot.xyz/ahk/drops/chained)*.*

### Differences between us and fxhash

&#x20;We are working on the direct support of fxhash, but for now, there are some limitations:&#x20;

1. &#x20;The URL param is hash and not fxhash
2. The hash format is a hash from a user-generated address - (Polkadot addresses have 15 000 combinations per address)
3. We can support both ss58 format (same as fxhash) or the hex format&#x20;

#### Supported hash formats

* ss58 examples:
  * hGCkbgsGatN2yG8E6DX844yNHbamg2pCjWyFkn3MJxWdL4HE
  * EouXhZhDCHJqkEfr15DnkrgVrxwTkuRPBfid1oTioJhQpE1
* Hex format examples: hex hashes have a length of 66 characters (0x + 64 letters)
  * 0x75f431014e6e0e1ca79360f2b21b855c20d3026a82a9d63af2ebd1f671359c7a
  * 0x34a30d72b558863e4b33217a62b1f8aa26535b341b93ba235f42929730c95b9b

### Hash creation

Currently, we have two different types of hash generation on two different networks:

1. **Polkadot** hash generation is random: A user will receive random variation from the code.
2. On **Base** we use `hash(serialNumber)` - <https://github.com/vikiival/dyndata/blob/b05ba5684486135d313aad5b9fb5c51539d25560/utils.ts#L5>

## Important documentation&#x20;

These two things should be able to assist you during your process of creation:

* Template
* Code Checker

## 1) Template

Here is a template where you can find all the information about the code you need. **Please read on before you start coding:** <https://github.com/vikiival/kodahash>.&#x20;

Some things we require to be included in the code like:

* createCanvas();
* getURLParams
* postMessageKoda

How to include them is written in the template mentioned above. Please read it carefully.

## 2) Code Checker

Once your art code is ready and adjusted for KodaDot's needs, you can test the code in our new Code Checker. Please open the page below in the new tab to learn how to use it.

{% content-ref url="code-checker" %}
[code-checker](https://hello.kodadot.xyz/generative/code-checker)
{% endcontent-ref %}

## 3) Submission of your code

Before you submit the art, follow these steps:

* Please run the art via the code-checker mentioned above and report the status together with the code. The code needs to pass! (Take a screenshot for us)
* **Submit**:
  * Zip file with your code
  * Name for collection (the name should be **short - only one word:** it looks much better on the UI)
  * Description&#x20;
  * Collection image - select the one you like the most&#x20;
  * Artistic name you want to be referred to in the collection
  * Your DOT and Base address ([tips for Polkadot wallets](https://hello.kodadot.xyz/tutorial/wallet/create-your-wallet))
* Create your profile on Koda (depending on where your drop is - Base/Polkadot - create your profile on the selected network)

{% content-ref url="../tutorial/profiles" %}
[profiles](https://hello.kodadot.xyz/tutorial/profiles)
{% endcontent-ref %}

### Submit the art here: <https://form.kodadot.xyz/submit>

## 4) Preparation for your drop

We prepared a short list of tips you should be able to follow to make your drop even more successful. Take your time and read it.

{% content-ref url="preparation-for-the-drop" %}
[preparation-for-the-drop](https://hello.kodadot.xyz/generative/preparation-for-the-drop)
{% endcontent-ref %}

### Not sure if your art will be supported?

Please message us on [Telegram](https://t.me/kodadot_eco) or connect with [Luuu](https://linktr.ee/just_luuuu)! We will happily help you to test it.

## Minting

Our curated drop pages Your minting drop page can look like this:

<figure><img src="https://3705667097-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgfLdtGYbRx63ivinWz%2Fuploads%2FcyOR8XnHH2ZhkWLtJO9U%2FScreenshot%202024-08-10%20at%2013.43.12.png?alt=media&#x26;token=5b38df5b-7ce9-4963-a77e-148a87073abc" alt=""><figcaption></figcaption></figure>

Buyers can generate new NFTs under the picture. We set a limit on the total available items. Minting can be free or for tokens. We can also add time, minting phases, and allowlists - everything is possible. We have been experimenting with adding also conditions such as people needing to have funds in wallets, people needing to be owners of another drop.. etc.

## Interested to have your drop on KodaDot?&#x20;

For now, if you are interested, write us on [Telegram](https://t.me/kodadot_eco). Also, you can connect with our Head of Artist Relations, [Luuu](https://linktr.ee/just_luuuu).&#x20;

<figure><img src="https://3705667097-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgfLdtGYbRx63ivinWz%2Fuploads%2FFI87PSMNe87hM9lxLu8w%2FScreenshot%202023-11-23%20at%2010.43.39.png?alt=media&#x26;token=f848b463-5448-40f7-bc93-cfe2ea44c306" alt=""><figcaption><p>example of generative collection</p></figcaption></figure>

We are looking for thrilling art and reserve the right to reject art anywhere in the procedure.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hello.kodadot.xyz/generative/generative-art.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
