Comments (4)
Can you send your whole config?
And the order of the layers chosen may be different than expected if some of them are nested folders. The generator "picks" deeply nested folder (leaves) first, before parents.
from art-engine.
tyvm for getting back to me :)
I haven't used nested folders really because it seemed like less work to simply type out everything that does't work together compared to setting up nested folders. So my layers folder just looks like this: (there are no subfolders within these)
There are three stages: sci-fi (no inconsistencies set for these), then hair above outfit (hair 2 folder), then hair below outfit. Bear in mind that because of this, some inconsistencies are set up as outfit: ["hair"],
and some are hair: ["outfit"],
Here is the config:
"use strict";
const path = require("path");
const isLocal = typeof process.pkg === "undefined";
const basePath = isLocal ? process.cwd() : path.dirname(process.execPath);
const { MODE } = require(path.join(basePath, "src/blendMode.js"));
const buildDir = path.join(basePath, "/build");
const layersDir = path.join(basePath, "/layers");
/*********************
* General Generator Options
***********************/
const description =
"This is the description of your NFT project, remember to replace this";
const baseUri = "ipfs://NewUriToReplace";
const outputJPEG = false; // if false, the generator outputs png's
/**
* Set your tokenID index start number.
* ⚠️ Be sure it matches your smart contract!
*/
const startIndex = 1;
const format = {
width: 4500,
height: 4500,
smoothing: true, // set to false when up-scaling pixel art.
};
const background = {
generate: false,
brightness: "80%",
};
const layerConfigurations = [
{
growEditionSizeTo: 50,
namePrefix: "peanut world", // Use to add a name to Metadata `name:`
layersOrder: [
{ name: "Sci-fi Background", trait: "Background" },
{ name: "Sci-fi Skin", trait: "Skin" },
{ name: "Sci-fi Face", trait: "Face" },
{ name: "Sci-fi Face Accessories", trait: "Face Accessory" },
{ name: "Sci-fi Hair", trait: "Hair" },
{ name: "Sci-fi Outfit", trait: "Outfit" },
],
},
{
growEditionSizeTo: 150,
namePrefix: "peanut world", // Use to add a name to Metadata `name:`
layersOrder: [
{ name: "Background" },
{ name: "Skin" },
{ name: "Face" },
{ name: "Wings" },
{ name: "Outfit" },
{ name: "Hair 2", trait: "Hair" },
{ name: "Earring" },
{ name: "Face accessory" },
{ name: "Floating" },
],
},
{
growEditionSizeTo: 999,
namePrefix: "peanut world", // Use to add a name to Metadata `name:`
layersOrder: [
{ name: "Background" },
{ name: "Skin" },
{ name: "Face" },
{ name: "Hair" },
{ name: "Face accessory" },
{ name: "Earring" },
{ name: "Wings" },
{ name: "Outfit" },
{ name: "Floating" },
],
},
// growEditionSizeTo: 10,
// namePrefix: "Lion",
// resetNameIndex: true, // this will start the Lion count at #1 instead of #6
// layersOrder: [
// { name: "Background" },
// { name: "Hats" },
// { name: "Male Hair" },
// ],
// },
];
/**
* Set to true for when using multiple layersOrder configuration
* and you would like to shuffle all the artwork together
*/
const shuffleLayerConfigurations = false;
const debugLogs = true;
/*********************
* Advanced Generator Options
***********************/
// if you use an empty/transparent file, set the name here.
const emptyLayerName = "unused";
/**
* Incompatible items can be added to this object by a files cleanName
* This works in layer order, meaning, you need to define the layer that comes
* first as the Key, and the incompatible items that _may_ come after.
* The current version requires all layers to have unique names, or you may
* accidentally set incompatibilities for the _wrong_ item.
*/
const incompatible = {
orange_cat_blue_tee: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava", "yellow_flower", "pink_flower", "black_braids_with_headphones", "peach_braids"],
black_cat_green_tee: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava", "yellow_flower", "pink_flower", "black_braids_with_headphones", "peach_braids"],
orange_cat_blue_tee: ["pink_flower"],
lavender_fleece: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava"],
yellow_fleece: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava"],
starry_blanket: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava"],
blanket_and_tea: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava"],
bubblegum_puffer: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava", "yellow_flower"],
yellow_puffer: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava", "pink_flower"],
green_scarf: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava", "yellow_flower", "pink_flower", "dog"],
orange_scarf: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava", "yellow_flower", "pink_flower", "dog"],
adventurer: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava"],
red_hood: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava", "yellow_flower", "pink_flower"],
black_dress: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava"],
white_dress: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava"],
cottagecore_corset: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava"],
cowboy_shirt: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava", "blue_spacebuns_with_earmuffs"],
yellow_balaclava: ["smart_shirt", "teal_shirt", "veggies", "orange_cat_blue_tee", "black_cat_green_tee", "starry_blanket", "blanket_and_tea", "black_dress", "white_dress", "biker_jacket", "jumper_with_camera", "green_vest", "heart_vest", "adventurer", "yellow_jumper", "skull_vest", "red_hood", "peanut_world_hoodie", "orange_hoodie", "cottagecore_corset", "dog"],
green_balaclava: ["smart_shirt", "teal_shirt", "veggies", "orange_cat_blue_tee", "black_cat_green_tee", "starry_blanket", "blanket_and_tea", "black_dress", "white_dress", "biker_jacket", "jumper_with_camera", "green_vest", "heart_vest", "adventurer", "yellow_jumper", "skull_vest", "red_hood", "peanut_world_hoodie", "orange_hoodie", "cottagecore_corset", "dog"],
brown_wavy_flower_scarf: ["bubblegum_puffer", "yellow_puffer", "orange_cat_blue_tee", "black_cat_green_tee", "lavender_fleece", "yellow_fleece", "starry_blanket", "blanket_and_tea", "peanut_world_hoodie", "orange_hoodie"],
green_bob_pink_scarf: ["bubblegum_puffer", "yellow_puffer", "orange_cat_blue_tee", "black_cat_green_tee", "lavender_fleece", "yellow_fleece", "starry_blanket", "blanket_and_tea", "peanut_world_hoodie", "orange_hoodie"],
bubblegum: ["cool_sunglasses", "pink_shades", "flower_glasses", "pink_star_shades", "yellow_star_shades", "heart_glasses", "strawberry_balaclava", "yellow_balaclava", "green_balaclava"],
eye_patch: ["cool_sunglasses", "pink_shades", "flower_glasses", "pink_star_shades", "yellow_star_shades", "heart_glasses"],
cigarette: ["cool_sunglasses", "pink_shades", "flower_glasses", "pink_star_shades", "yellow_star_shades", "heart_glasses"],
black_braids_with_headphones: ["orange_cat_blue_tee", "black_cat_green_tee"],
black_braids_witch_hat: ["orange_cat_blue_tee", "black_cat_green_tee"],
peach_braids: ["orange_cat_blue_tee", "black_cat_green_tee"],
stars: ["pixel_stars"],
ouch_my_heart: ["dog"],
orange_cat_blue_tee: ["dog"],
black_cat_green_tee: ["dog"],
cat_dungarees: ["dog"],
pink_jumper_ferret: ["dog"],
smart_shirt: ["dog"],
euphoric_makeup: ["cool_sunglasses"],
blush_smile: ["cool_sunglasses"],
black_wings: ["smart_shirt", "teal_shirt", "veggies", "blue_jumpsuit", "starry_blanket", "blanket_and_tea", "lavender_fleece", "yellow_fleece", "bubblegum_puffer", "yellow_puffer", "oversized_suit", "yellow_jumper"],
blue_wings: ["smart_shirt", "teal_shirt", "veggies", "blue_jumpsuit", "starry_blanket", "blanket_and_tea", "lavender_fleece", "yellow_fleece", "bubblegum_puffer", "yellow_puffer", "oversized_suit"],
golden_wings: ["smart_shirt", "teal_shirt", "veggies", "blue_jumpsuit", "starry_blanket", "blanket_and_tea", "lavender_fleece", "yellow_fleece", "bubblegum_puffer", "yellow_puffer", "oversized_suit"],
white_wings: ["smart_shirt", "teal_shirt", "veggies", "blue_jumpsuit", "starry_blanket", "blanket_and_tea", "lavender_fleece", "yellow_fleece", "bubblegum_puffer", "yellow_puffer", "oversized_suit"],
yellow_beanie: ["red_hood"],
orange_pigtails: ["heart_glasses"],
green_atomic_bob: ["heart_glasses"],
midnight: ["flying hearts", "pixel_stars", "confetti"],
sunset_clouds: ["pixel_stars"],
black_braids_with_headphones: ["cherry", "pixelcat", "hoops"],
yellow_balaclava: ["cherry", "pixelcat", "hoops"],
green_balaclava: ["cherry", "pixelcat", "hoops"],
strawberry_balaclava: ["cherry", "pixelcat", "hoops"],
yellow_flower: ["cherry", "pixelcat", "hoops"],
pink_flower: ["cherry", "pixelcat", "hoops"],
polkadot_bandana: ["cherry", "pixelcat", "hoops"],
brown_wavy_flower_scarf: ["cherry", "pixelcat", "hoops"],
green_bob_pink_scarf: ["cherry", "pixelcat", "hoops"],
blue_spacebuns_with_earmuffs: ["cherry", "pixelcat", "hoops"],
orange_pigtails: ["cherry", "pixelcat", "hoops"],
// Red: ["Dark Long"],
// // directory incompatible with directory example
// White: ["rare-Pink-Pompadour"],
};
/**
* Require combinations of files when constructing DNA, this bypasses the
* randomization and weights.
*
* The layer order matters here, the key (left side) is an item within
* the layer that comes first in the stack.
* the items in the array are "required" items that should be pulled from folders
* further in the stack
*/
const forcedCombinations = {
// floral: ["MetallicShades", "Golden Sakura"],
};
/**
* In the event that a filename cannot be the trait value name, for example when
* multiple items should have the same value, specify
* clean-filename: trait-value override pairs. Wrap filenames with spaces in quotes.
*/
const traitValueOverrides = {
Helmet: "Space Helmet",
"gold chain": "GOLDEN NECKLACE",
};
const extraMetadata = {};
const extraAttributes = () => [
// Optionally, if you need to overwrite one of your layers attributes.
// You can include the same name as the layer, here, and it will overwrite
//
// {
// trait_type: "Bottom lid",
// value: ` Bottom lid # ${Math.random() * 100}`,
// },
// {
// display_type: "boost_number",
// trait_type: "Aqua Power",
// value: Math.random() * 100,
// },
// {
// display_type: "boost_number",
// trait_type: "Health",
// value: Math.random() * 100,
// },
// {
// display_type: "boost_number",
// trait_type: "Mana",
// value: Math.floor(Math.random() * 100),
// },
];
// Outputs an Keccack256 hash for the image. Required for provenance hash
const hashImages = false;
const rarityDelimiter = "#";
const uniqueDnaTorrance = 10000;
/**
* Set to true to always use the root folder as trait_type
* Set to false to use weighted parent folders as trait_type
* Default is true.
*/
const useRootTraitType = true;
const preview = {
thumbPerRow: 5,
thumbWidth: 50,
imageRatio: format.width / format.height,
imageName: "preview.png",
};
const preview_gif = {
numberOfImages: 5,
order: "ASC", // ASC, DESC, MIXED
repeat: 0,
quality: 100,
delay: 500,
imageName: "preview.gif",
};
module.exports = {
background,
baseUri,
buildDir,
debugLogs,
description,
emptyLayerName,
extraAttributes,
extraMetadata,
forcedCombinations,
format,
hashImages,
incompatible,
layerConfigurations,
layersDir,
outputJPEG,
preview,
preview_gif,
rarityDelimiter,
shuffleLayerConfigurations,
startIndex,
traitValueOverrides,
uniqueDnaTorrance,
useRootTraitType,
};
from art-engine.
Do I need to break up the longest lists of inconsistencies into 2 smaller lists? Really don't know why it's not working 100% of the time, I've checked commas, brackets, and spelling about 10 times hahaha
Is 4 words in an asset's name too much, like: "orange_cat_blue_tee" and "brown_wavy_flower_scarf" seem to be problematic ones.
from art-engine.
Found issue
orange_cat_blue_tee: ["dog"],
and then I repeated:
orange_cat_blue_tee: ["strawberry_balaclava", "yellow_balaclava", "green_balaclava", "yellow_flower", "pink_flower", "black_braids_with_headphones", "peach_braids"],
from art-engine.
Related Issues (20)
- Layers appear very dark HOT 3
- rebuildAll.js not respecting z-index
- Exclude Trait Parts (Hide Back Hair) When Other Traits Is Available (Helmet)
- What if i need to use decimal percentages on the rarities? HOT 1
- Regenerate metadata.json from _dna.json. Useful when an error occured while running util scripts. HOT 1
- rarityDelimiter bug for folders HOT 3
- Cardano.js attribute parsing HOT 1
- Incompatibile Ignored HOT 1
- Memory limit reached HOT 3
- bypassDNA value on this line is undefined. Error/Mistake HOT 2
- Randomization of multiple layer configurations? HOT 1
- Forced combinations is not working as expected HOT 2
- Jpeg switches to png through update:metadata
- const useRootTraitType = true not alway true HOT 1
- Reverse generation from metadata json files
- Rarity precision HOT 2
- How to do incompatible Folders but not only trait names in them? HOT 1
- I want to add trait to name NFT in json. HOT 1
- Error in regenerate util: _dna.split is not a function
- This engine seems buggy than the original version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from art-engine.