News for hackers. Stuff that matters.
Re:How to Build a Portrait with Dice (using Photoshop) by nezumi on Saturday November 19, 2011 @06:10AM (#3255082)
It's great to see examples where code can be side-stepped in favour of a quick-n-dirty, 'designer'-type solution - different ways of thinking about the problem.

I have fond memories of my first years in the VFX industry being made a fool of by non-programmer effects artists who, by hooking together a few nodes in the industry-standard package Houdini, could in minutes recreate algorithms that took weeks for me to code the 'right' way, and in a couple more minutes interactively tweak the constants to get results which I would have taken even more weeks to derive 'scientifically'. It was a crash-course in the value of rapid-prototyping, but also in that particular case introduced me to new ways of thinking: Houdini presents a completely different view of geometry and image processing, which is thoroughly non-intuitive to the typical comp-sci graduate. Houdini taught me an (almost literally) orthogonal way of thinking about computer graphics problems.

The lessons are more general: - rapid prototyping is not necessarily coding - sometimes the non-technical, 'designer' approach is the more efficient one (not necessarily in this case - there is plenty of merit in both approaches) - the more tools you learn, the more leverage you have - why not learn some of those design tools and learn a different way of thinking about things.

(This comment is inspired-by, not directed-at, the two dice portrait posts.)

Re:How to Build a Portrait with Dice (using Photoshop) by sgdesign on Saturday November 19, 2011 @05:54AM (#3255062)
I thought it was interesting to see a different solution to the same problem (see: http://news.ycombinator.com/item?id=3254392 ). The developer thinks "let's write some code!", but the designer thinks "let's use Photoshop!"…
Re:How to Build a Portrait with Dice (using Photoshop) by veyron on Saturday November 19, 2011 @09:30AM (#3255353)
The designer thinks to use the tools he or she is most familiar with, just like the developer.
Re:How to Build a Portrait with Dice (using Photoshop) by sgdesign on Saturday November 19, 2011 @11:03AM (#3255497)
Turns out Photoshop is even more powerful than what you'd think: I created an action to automate the whole process with any photo. You can download it here:

http://cl.ly/BwdO

(By the way, little known fact: you can actually script Photoshop using Javascript. I once used this to automatically generate all letter tiles as separate images for a touchscreen keyboard based on a template)

Re:How to Build a Portrait with Dice (using Photoshop) by pavel_lishin on Saturday November 19, 2011 @11:29AM (#3255547)
> you can actually script Photoshop using Javascript.

Could you write up a tutorial post?

Re:How to Build a Portrait with Dice (using Photoshop) by Tloewald on Saturday November 19, 2011 @01:20PM (#3255820)
Photoshop's scripting capabilities are pretty astonishing. I taught myself over lunch the other day. You can script in JavaScript, AppleScript, or VBScript and implement dialogs and UI panels.

It works exactly as you'd expect and scripts are quite lean (you don't need to do a bunch of setup).

Re:How to Build a Portrait with Dice (using Photoshop) by sgdesign on Saturday November 19, 2011 @11:40AM (#3255577)
I'm not an expert in Photoshop scripting by any means, so I'd have to remember how I did it first… in the meantime you can check out these tutorials:

http://www.kirupa.com/motiongraphics/ps_scripting.htm

http://morris-photographics.com/photoshop/tutorials/scriptin...

Re:How to Build a Portrait with Dice (using Photoshop) by thesnark on Saturday November 19, 2011 @02:01PM (#3255920)
I am the guy who wrote the original post, I think this is great work, I wish I could use photoshop as proficiently!

I should say that for my part, I drew inspiration from flight404: http://www.flight404.com/blog/?p=131

and a paper I read where someone wrote an algorithm to do this with dominos.

Re:How to Build a Portrait with Dice (using Photoshop) by e28eta on Saturday November 19, 2011 @03:08PM (#3256094)
I'd be intrigued if something could be done with the orientation of the 2, 3, and 6 faces to improve image quality.

I'm coming up mostly blank, but they probably create textures when the same number is in a large contiguous block and the orientations are the same.

Also, I'm wondering if anything can be done with 2&3 specifically because they have bright corners and dark corners.

I'm guessing the effects are fairly subtle and can't really be used to good effect, but...

Re:How to Build a Portrait with Dice (using Photoshop) by viraptor on Saturday November 19, 2011 @06:22AM (#3255089)
I wonder why did they reduce the number of colours twice? Using the mosaic filter pretty much canceled the effect of the first "posterize" run.
Re:How to Build a Portrait with Dice (using Photoshop) by sgdesign on Saturday November 19, 2011 @10:12AM (#3255406)
That was a mistake on my part. I didn't realize that "mosaic" would introduce unnecessary shades of grey in the mix.

This comment explains the problem:

http://www.attackofdesign.com/how-to-build-a-portrait-with-d...

And you can also check out Marc Edwards' take on this:

http://dribbble.com/shots/324185-Dice-Portrait-Tutorial#comm...

Re:How to Build a Portrait with Dice (using Photoshop) by bvdbijl on Saturday November 19, 2011 @06:36AM (#3255102)
I believe this is because you would be getting a mosaic with all the different shades of gray instead of only 6
Re:How to Build a Portrait with Dice (using Photoshop) by viraptor on Saturday November 19, 2011 @06:56AM (#3255139)
If you reduce to 6 colours, then make a mosaic, you will get all different shades of grade. Mosaic will take (simplifying) an average of colours one tile covers.
Re:How to Build a Portrait with Dice (using Photoshop) by bvdbijl on Saturday November 19, 2011 @12:32PM (#3255708)
Yeah, you should swap those two steps
Re:How to Build a Portrait with Dice (using Photoshop) by DougBTX on Saturday November 19, 2011 @08:44AM (#3255272)
Just an oversight. He says at the end of step three that "we have our image divided into 16px tiles colored with 6 shades of grey", but as you point out, if you count the number of shades in the image above, there are more than six.
Re:How to Build a Portrait with Dice (using Photoshop) by gutini on Saturday November 19, 2011 @10:42AM (#3255462)
I used a similar visual concept to produce the following: http://www.behance.net/gallery/Impossible-Triangle/1968627

However, I chose to manually use random numbers so it wasn't exactly quick. I wonder if there's a way I could have hooked Photoshop up to do that.

Re:How to Build a Portrait with Dice (using Photoshop) by Tloewald on Saturday November 19, 2011 @01:23PM (#3255827)
It would look better if the image were dithered into the target palette.