Sign in to follow this  

Normal Map Creation

This topic is 3740 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I will reply to my own retired topic (which you can findhere ), because Mr. Ashikhmin himself posted me a PM with some VERY useful information. They might be useful to other people as well and I also want to present some results :) I was working on one of his papers (link ) from the year 2000 in order to extract geometric information from of a set of 6561 input images, called BTF (bidirectional texture function). At some point I got stuck and posted to gamedev.net, but did not get an answer for months. Mr. Ashikhmin then sent me a link to one of his unpublished papers (link), which deals with the same matter but seems to be less difficult to implement. The paper deals with the creation/extraction of Normal Distribution Functions (NDF). At any point of a surface, the NDF describes the orientation of a normal in dependence of the incoming ray (light) and an outgoing ray (view). I used parabolic mapping to project those four dimensions down to two dimensions. The lower image shows three examples of parabolic NDFs. For those still familiar with old-school demo-scene tricks, those maps can be imagined as "Phong Lookup Tables" on a per-pixel basis. Parabolic NDFs It is now possible to evaluate the average orientation of the pixel's normal from the parabolic map. If you do this for each pixel, you get very detailed normal maps (notice the pattern of the wallpaper) you can use in games, for example. Normal Map from BTF One last remark: This is no new stuff, it has been done before. I am still working on it, because there are several issues and problems I did not mention in this reply.

Share this post


Link to post
Share on other sites
Looks pretty cool, thanks for sharing. I did have a look into the original published paper a year or so back; but I couldn't find a use for it at the time so shelved it. Maybe I'll dig it out again...

Quote:
there are several issues and problems I did not mention in this reply
Any hints as to what these are?

Cheers,
Jack

Share this post


Link to post
Share on other sites
hello jack, thanks for your interest!

well, first of all the alignment of the normal map and the actual underlying geometry might suffer from imprecision. by imprecision I mean a translation in the range from 1mm up to 3mm. how to deal with this error is decribed in this paper (which I am currently trying to implement).

another point is, if you take a closer look at the normal map of the floor tiles, you see some irregularities at the grooves of the material. too small resolution of the input images might be one reason for this. another reason might be insufficient sampling of my parabolic maps. Currently, I am implementing a push-pull image-algorithm to cope with this problem.

also, imagine the amount of memory that would be necessary to store 256x256 normal distribution maps! I store each of them them with 32x32 pixels, but 256x256 pixels would be better. It is unpractical to deal with such an amount of texture maps.

therefore, some sort of clustering has to be applied to the sampled materials. example: imagine the material wool. wool is made of small, macroscopic strings. each string is pointing to a certain direction, some strings are visible and some are not, but in the end it's just ONE string (and maybe the "dark gap" between two strings). so if done right, you have to store only two NDFs. but, in order to restore the original material, you have to know how the string were orientated before the clustering. thats actually one field of current research.

Share this post


Link to post
Share on other sites

This topic is 3740 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this