Code Monkey home page Code Monkey logo

nft-collectile's Introduction

NFT Collectibles using Blender Python

image

What is this?

This project is to demonstrate for generating NFT Collectible Avatar-Styled images. For details, please check https://blog.hdks.org/Create-NFT-3D-Collectibles-Using-Blender-Scripting/ .

How to Use

1. Clone this repository

git clone https://github.com/hideckies/nft-collectibles-blender-python.git

2. Settings in script files

cd nft-collectibles-blender-python
cd scripts

Set the value of each setting in script files.
In particular, PROJECT_DIR should be set to the absolute path to this repository you cloned.

In gen_metadata.py,

# gen_metadata.py

#  --- Settings --------------------------------------------

# ...

# An absolute path for the root directory
PROJECT_DIR = "c:/nft-collectibles-blender-python/"

# ...

# ---------------------------------------------------------

In gen_model.py,

# gen_model.py

#  --- Settings --------------------------------------------

# ...

# An absolute path for the root directory
PROJECT_DIR = "c:/nft-collectibles-blender-python/"

# ...

# ---------------------------------------------------------
  • Set the same path to PROJECT_DIR for both files. Currently, I don't know how to import variables from other files in Blender Python.

3. Run gen_metadata.py

Open Blender and move to Scripting workspace.

screenshot_1

To check the status during processing, you can open the console by clicking “Window”-> “Toggle System Console” in the top menu.

In Scripting workspace, click the Open -> choose a gen_metadata.py -> click the Run Script.

*If you get the error message "ERROR: Properties duplicate.", please run again.
This message show when there is a metadata for each file that has exactly the same attributes. To create a unique collection, you have to avoid duplication.

When completed, you should see json files like 0.json, 1.json, ... in outputs directory.

4. Run gen_model.py

Click the Open -> choose a gen_model.py -> click the Run Script.

When completed, you should see image files like 0.png, 1.png, ... in outputs directory.

nft-collectile's People

Contributors

hideckies avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.