Generating Normal Maps From 2D Images

Nice. But you lose the accessibility information when you do it that way. But then, maybe you can generate it from the normal map somehow…

I think the best results might come from some fitting process where you have for example three pictures of the surface with a different but known light direction. Then you try to fit the best possible diffuse, normal, specular etc. maps to these images. You could use some fast techniques like yours and knackerd’s to get a good initial guess, and then iteratively refine it somehow. Too bad I stink at math…

-Ilkka

Well , having the light direction and pixel value , you still get an indeterminated system , with 1 equation and 3 variables ( for three dimensional vectors) …

maybe …this is just an idea , u can fix some normal vectors to some pre-defined RGB values …i.e the 0,0,0 RGB value (black) would indicate a flat surface point , and you may for instance set it´s normal value to 0,0,1 , and according to R,G or B variation you can change the (x,y,z) coordinates of the normal …
just an idea

Originally posted by raverbach:
Well , having the light direction and pixel value , you still get an indeterminated system , with 1 equation and 3 variables ( for three dimensional vectors) …

Hence the three pictures

One option is to take multiple pictures with different light directions and then just interpolate between them and forget about dot product lighting altogether. That’s one damn easy way to capture all lighting properties of the surface, beyond those you get from the usual realtime lighting models. It’s pretty fast to render too, most (if not all) of the time you’ll just be interpolating three textures. The texture memory usage could skyrocket though. You might get away with less pictures if you used some kind of polynomial interpolation, but then there goes the fillrate. Oh and then there’s the specular that depends on viewer position too. Oh well…

-Ilkka

If your goal is to extract 3D information from 2D images, I think this link could be useful :
http://www-sop.inria.fr/robotvis/robotvis-eng.html

It’s quite different from what you were talking about, but I think it’s an interesting approach.