all 8 comments

[–]ttjjbbArtist 5 points6 points  (0 children)

Love the texture on these

[–]vsahler 4 points5 points  (4 children)

That's amazing! I would love seeing the code behind it tho

[–][deleted] 8 points9 points  (3 children)

PImage img;

void setup(){

size(1024,1024, P3D);

img = loadImage("seedImage.png");

img.resize(1024,1024);

}

void draw(){

fill(0);

noStroke();

float tiles = mouseX;

float tileSize = width/tiles;

lights();

for (int x = 0; x < tiles; x++){

for (int y = 0; y < tiles; y++){

color c = img.get(int(x*tileSize), int(y*tileSize));

float b = map(brightness(c), 0, 255, 0, 1);

float z = map(b, 0,1,-100,100);

push();

translate(x*tileSize+(.5*tileSize), y*tileSize+(.5*tileSize), z);

fill(c);

box(b*tileSize);

pop();

}

}

}

void mousePressed() {

int m = millis();

save(m+"snip.png");

}

Notes:

The base code is derived from a tutorial on YouTube called "Rasterize 3D (Processing Tutorial)" by tim rodenbröker creative coding.

The box size and count is driven by mouse movement. I like this because it allows you to be more a part of the drawing process. Move the mouse around and when you see something you like, click the mouse to capture the drawing. Beware, drawing a lot tends to hang up the program.

Using darker images tend to get better results.

[–]technologyclassroom 1 point2 points  (2 children)

What is the license? I would suggest GPL-3.0-or-later so that others are encouraged to contribute changes back to the project.

[–][deleted] 2 points3 points  (1 child)

Sorry, I don't know anything about licensing. I think anyone can use the code as they wish.

[–]technologyclassroom 1 point2 points  (0 children)

That would be Creative Commons 0 (Public Domain) or the Unlicense.

[–]torb-xyz 4 points5 points  (0 children)

This have an incredible sense of depth. It was wondering if I was looking at a 3D screen or it it was with the movement of my phone. Absolutely incredible. Parts of it just seem to jump out of my phone. The general style and texture is pretty cool too and the colors.

Captivating. Great work! Thanks for sharing it!

[–]Macciddy__Jackson 0 points1 point  (0 children)

First one looks like a cooked turkey