We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › grayscale image to 3d-graphic
Page Index Toggle Pages: 1
grayscale image to 3d-graphic (Read 352 times)
grayscale image to 3d-graphic
Dec 9th, 2008, 2:42pm
 
Hi

I'm looking for a way to convert a grayscale image into 3d, so that the white areas are the lowest und the black areas the highest parts. i know it's possible but i can't seem to find anything helpful on the net so far...

could someone please help me?
thanks!!
Re: grayscale image to 3d-graphic
Reply #1 - Dec 9th, 2008, 3:18pm
 
well there's not a lot to actually get.

just iterate over the source image and set z value of whatever you're printing that point to the greyscale value of the relevant pixel (which will be in the range 0-255)

picture of something i saw recently:
http://pixelist.info/wp-content/uploads/2008/09/moq-mo01.png
Re: grayscale image to 3d-graphic
Reply #2 - Dec 9th, 2008, 3:58pm
 
*lol*
okay Smiley i didn't think it'd be THAT easy. but that explains why i couldn't find anything Wink

thank you!
Re: grayscale image to 3d-graphic
Reply #3 - Dec 10th, 2008, 11:20am
 
8)

(oops, hit enter too soon)

it's also one of those things that's hard to search for unless you know what it's called. in this case 'heightmap' is the magic word.

(that picture i posted made me want to do something similar as the effect was spooky. was actually video, changing in realtime...)
Page Index Toggle Pages: 1