It is currently Mon Apr 15, 2024 7:38 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Wed Mar 21, 2012 11:35 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
Hopping around reading posts ("hyper-text tends to make me hyper that way), I find now that I've got a number of them all jumbled together in my brain--which the doc told ma would probably work best if kept below 25 pct fill. In short succession, I read/remembered:

1. pegleg44 was writing about making heightmaps

2. lianam was writing about draping things on heightmaps

and 3. going back a ways, in mahvin's picture-frame tute, ofnuts mentioned a script (now how'd he phrase it?) "to convert a profile/section into the matching black to white values for a bump map."

Now, best I can figure, 1 and 2 combined explosively to make me want to "drape human faces" on top "suitable cranial bumpmaps."

...which then, I further figure, made me think of 3, and almost immediately that "most human faces are more alike than they are different."

So if you're still humoring me--morbidly curious to see if there is a point--consider my Viss-ion (that's a vision and a mission):
--take a b&w portrait
--process it to remove "normalize the brights and darks" (I think I must mean brighten the shadows and mute the highlights
--drape the normalized face over a bump map created by a descendant of ofnut's tool which could parametrically generate heightmaps of generic human head (parameters are left to the imagination, but they're finite)

I know pegleg would want it: family comes into his studio, whiff-BAM, here's 3D portraits of the whole family, you're welcome, in laminated bubinga.

Don't know if it would have come up here, but MS has PhotoSynth (based on Bundler research) which synthesizes point clouds from 100s or even 1000s of random photos of the same thing from all angles. Trouble is that the free meshing software (meshlab) is a hard row to hoe.

Okay then. Glad to have that out and have my 4K RAM free for other Grand Schemes. (It occurs to me that if I was in the carnival, I'd be the guy setting up the ducks to be shot down...)

Thanks. It's a pleasure to be here.

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 7:08 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Aug 24, 2011
Posts: 1785
Location: Dallas, TX
:rofl I love the way you think, serious, intelligent thought patterns on a given subject, mixed with a great sense of humor and a hint of scrambled brains. Reminds me of my own "ADHD-ish-ness" when I'm trying to explain something.

On a serious note (if that's possible here) I think you will find there are several here who are interested in ANY method for creating a mesh grid and shaping it, or using it to shape a layer similar to the one in PS. I think there are two or three threads about what might be coming in 2.8, if it ever comes out. Too lazy to dig 'em up for ya though.

Anyway, gramp, I enjoy your posts. Never, ever, ever forget how to play!

This has been a Drac Atak.

_________________
Image


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 8:25 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
Draconian wrote:
... I think you will find there are several here who are interested in ANY method for creating a mesh grid and shaping it, or using it to shape a layer similar to the one in PS. I think there are two or three threads about what might be coming in 2.8, if it ever comes out. Too lazy to dig 'em up for ya though.
...


[Ah, Drac, don't start. But thank you. See what I mean? Nice people here. Just remember you once thought this when I finally revert to type. Would your opinion change if you knew my wife dictates my posts?]

I had forgot to mention that I have, actually experimented with the first, "shadow reduction," step by making an inverted brightness layer (does anyone even know what a "negative" is anymore?) and using a layer mask, and screening/overlaying/multiplying/subtracting (chimpanzee at the typewriter approach--no time to think--must press pretty buttons...)

I haven't really done "draping" exc. as trying to use a gradient fill might pertain to it.

Experiments "painting" a heightmap have been disappointing because it's an unnatural art. I have though reached for Wings3D (modeler) and Blender which (even as I used it) I imagined would work soooo much better in the hands of people from here.

I found Wings (wings3d.com) to have a very natural interface, and there are a number of tutorials about how to use it and model particular things. Like heads. [Ad mode off]

I just want you to know that my wife... that I... sometimes even try the ideas herself before posting.

Cheers!

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 9:24 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Gramps have you tried Hexagon?
The download is still free at this time.
Very simple interface and easy to use. :)
http://www.daz3d.com/i/3d-models/free-3 ... e?cat=1486
Some nice beginner tutorials can be found here
http://www.cgdreams.co.uk/hexagon_vid/
Some vids do not work, but most do.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 9:44 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Aug 24, 2011
Posts: 1785
Location: Dallas, TX
gramp wrote:
Would your opinion change if you knew my wife dictates my posts?]


No problem, women sometimes make me CRAZY too! :hehe

Back to the subject, sort of....I have wings 3D and Hexagon and I guess I'm either too inept or too lazy to figure everything out so I don't use them. Just don't have the time for the learning curve.....buttons.......buttons......pretty buttons!

_________________
Image


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 9:55 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
gramp wrote:
So if you're still humoring me--morbidly curious to see if there is a point--consider my Viss-ion (that's a vision and a mission):
--take a b&w portrait
--process it to remove "normalize the brights and darks" (I think I must mean brighten the shadows and mute the highlights
--drape the normalized face over a bump map created by a descendant of ofnut's tool which could parametrically generate heightmaps of generic human head (parameters are left to the imagination, but they're finite)

I know pegleg would want it: family comes into his studio, whiff-BAM, here's 3D portraits of the whole family, you're welcome, in laminated bubinga.

Well it certainly sounds like something I would like since I am in the business of creating height map raster files for my 3D CNC machine. And I have tried that normalizing kind of thing I think your talking about, which was kind of cool but still produced different results depending on the photo. I would kind of use the curves to make most of the face 50% grey and then select the darker portions of the nose and make them darker to raise it up and then the eyes and make them lighter and stuff like that but still there was a lot of work and not to good of results.

The autodesk 123d catch program is certainly neet looking and have heard of people getting good results with it http://www.123dapp.com/catch but I have not tried it yet.

I think since a photo of a face is actually captureing light reflecting it doesn't automatically make a good height map image. Therefore there will always be work that needs to be done to make a better image. A good height map will look much like an X-Ray negative.
Image

I made a proetty good height map face one time by taking a video of myself with a vertical red laser and camera strapped onto a jig that pulled horizontally from one side to the other. The camera took a video as the laser scanned across my face. The laser scanned straight on in front and the camera was at a 45% angle as it shot the video. Then I chopped up the video using vegas video and then took the batch of photos into photoshop and made a script to make each frame of red squiggly lines into a selection that contained a gradeint blend, and then took that gradient blend and smeared it across the canvas, and then made a one pixel verticle selection out of that smear, thus taking a contoured selection that contained a gradient and making it straight vertically. Then all I had to do was take each vertilce line of pixels and line them all up in one raster file to create a very detailed looking height map. Now if someone could make a peice of software to cut up a video and do all the steps I just described that would be cool.

Alan


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 10:03 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Aug 24, 2011
Posts: 1785
Location: Dallas, TX
Wow pegleg, that bear looks like frosted glass. Put a spout on it and filler up with honey. What you are described sounds like a huge undertaking, IMO, to write something like that for GIMP. I dunno, maybe it's easier than I think. I hope someone does try though.

_________________
Image


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 3:00 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
Ya thats a gummy bear. The arms can be done on a layer by drawing with the circle 19 brush set to Use Color From Gradient inverted while the brush spacing itself has to be set to 1. The body and head are simply rounded radial blend tool blends on their own layer. The ears too. and I used the curves dialog box to make the snout raised up a little and the nose at the end. You kind of use the curves to draw out the profile you know. And then its all meshed in seamlessly by setting each layer mode to Darken Only.

The final product could then actually be inverted and colorized to look 3D
Image

Or take it into Sculptis to give it a nice metalized look. You increase the mesh count and draw with the raster as a brush.
Image

Alan


Last edited by PegLeg44 on Thu Mar 22, 2012 3:13 pm, edited 1 time in total.

Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 3:12 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Aug 24, 2011
Posts: 1785
Location: Dallas, TX
Sweet! You da man.

_________________
Image


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 3:39 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Hope you don't mind, but I inverted your gummy bear and saved the depth map for future use (stereograms). As for a way to create depth maps, Tom's G'MIC preset might be of use. :)

http://www.flickr.com/groups/gmic/discu ... 634319265/

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 6:17 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
Hi Lyle

You can use the gummy bear, anyone can. That link seemed to use a rough type of height map to use as a template for creating the stereograms things or whatever but it doesn't seem to show how to make a really detailed type of height map. But thanks for the link.

Alan


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 8:08 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
@peg

Good-looking.

@lyle
I agree with pegleg. I didn't drag out my 3D goggles, but I have seen similar effects recently: there's clearly depth, but not always natural.

My commercial (but reasonable) MeshCAM software can read heightmaps, and its output shows the differences between pegleg's and TK's approaches to good effect. While peg still could benefit from a brush that just painted "sphere" heightmaps (instead of his having to scrupulously try to synthesize them), TK's depth map (LH side) is not much different from a black and white photo. (I'm not being completely fair here because TK emphasizes that you have to fiddle with the settings until it "looks 3D" to you, but the anaglyphs I've seen recently often gave the 3D impression of a set of 2D cutouts standing in front of each other.)

Howbesoever this may be, the Important part for me in your link is the existence of Tom Keil hisself.

Therein is a fellow who has done the math, and any man who can get (any) 3D out of a 2D photo which only has clues, is in a better spot than most to get 3D out of a pair of stereoscopic images that have triangulation going for them.

For that matter "stereoscopic" images are mathematically well-suited to the purpose but, referring to MS Photosynth and Bundler again, different photos of the same object from different perspectives also contain some 3D info.

Still, a tool in GIMP that was "heightmap-aware" might let one "sculpt" away. Imagine. A white cube. Take the new "tool" (chisel? but I bet sculptors have a raft of others: for now, just say, chisels of all different endpoints) and drag it over the block. The block shows darker (deeper) marks, in a predictable, programmatic way that "follows the rules of a chisel."

Sorry. The idea's morphing again.

And to bring it back home, you're right, Lyle that TK's G'MIC tool is likely a pretty good place to play.

Thank you.


Attachments:
Elephant_Model.png
Elephant_Model.png [ 889.68 KiB | Viewed 2095 times ]
1735_Gummy2_Model.png
1735_Gummy2_Model.png [ 203.54 KiB | Viewed 2095 times ]

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."
Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 8:20 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
I did want to add the 3D render of the cow heightmap from TK's page too. It definitely shows depth, but does not make for a realistic bubinga cow.

@Rod
I have not tried Hexagon yet, but I'll sure give it a whirl. Thanks for the pointer.


Attachments:
Cowie_Model.png
Cowie_Model.png [ 286.08 KiB | Viewed 2094 times ]

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."
Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 8:44 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Was going to do a stereogram, but why not just use GIMP's Bumpmap filter and a few other things. :)


Attachments:
gummy_bear.jpg
gummy_bear.jpg [ 161.97 KiB | Viewed 2091 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 8:51 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
Hi Gramp

Sometimes I use a photo as a texture over height map layers that I create below it. I adjust the opacity of the photo layer to adjust the amount of texture. The layers below are varying percentages of black. You could even blur parts to round them off a little too.

But I don't use just the photo itself but I capture the alpha of it by right clicking on a chanel and then choose chanel to selection. then I make a new layer and paste in white. Then I set that layers opacity.

Alan


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 8:55 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
Very nice lyle

I have a technique for smoothing these height maps also http://patternhelp.com/uploads/HeightMapTutorial8.pdf in case your interested.

Alan


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Thu Mar 22, 2012 9:06 pm  (#17) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Will check it out pegleg; was going to use anisotrophic (and other) techniques but my laziness came back to me. lol

:)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Wed Mar 28, 2012 7:49 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
To tie a bow on this:

for a few dollars more, one clever programmer has a 3d modeler solution that, indeed, lets one "push" and "pull" a host of cranial parameters to "fit" a model to a photograph, or 2 or 3.

www.facegen.com

Demo has all you'd want for experimenting, but understandably does not allow saving a model.

I came away with the idea that a single, generic "face-heightmap" if available could be teased out in GIMP (with the prolific tool suite) to a broad set of faces. Unfortunately for me, I think it might take talent...

One very interesting aspect of FaceGen is that--after you've done your very best at creating a 3D head to match your photo--you can hit a "variation" option which will generate 8 slightly different alternatives to your model and let you pick any of them.

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Wed Mar 28, 2012 8:42 pm  (#19) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
I use FaceShop for 3D face creation. :)
http://www.abalonellc.com/faceshop-pro.html

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Heightmap mashup? 2D photo to 3D heightmap? Possimus?
PostPosted: Wed Mar 28, 2012 10:52 pm  (#20) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
gramp wrote:
To tie a bow on this:

for a few dollars more, one clever programmer has a 3d modeler solution that, indeed, lets one "push" and "pull" a host of cranial parameters to "fit" a model to a photograph, or 2 or 3.

http://www.facegen.com

Demo has all you'd want for experimenting, but understandably does not allow saving a model.

I came away with the idea that a single, generic "face-heightmap" if available could be teased out in GIMP (with the prolific tool suite) to a broad set of faces. Unfortunately for me, I think it might take talent...

One very interesting aspect of FaceGen is that--after you've done your very best at creating a 3D head to match your photo--you can hit a "variation" option which will generate 8 slightly different alternatives to your model and let you pick any of them.


That's a really cool program Gramps. I'm going to play around with it a bit and see if it can make good height maps for my CNC software.

Thanks for the link!

Alan


Top
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) [SOLVED] G'MIC as Pixel Intensity Calculator/Heightmap Generator???

14

No new posts Attachment(s) Old Photo

16

No new posts Attachment(s) Retouching an Old Photo

7

No new posts Attachment(s) Glossy Photo's

4

No new posts Attachment(s) Photo To Comic Art

2



* Login  



Powered by phpBB3 © phpBB Group