   normal map vs. height map (idea)
  Hello! I was thinking if it would be a good idea to use height maps instead of normal maps for bump mapping. I haven't made any tests until now but I was trying to measure the advantages and disadvantages of such a technique...  The advantages of a height map over a normal map would be: -Only a single component required, the other components of the same texture could be used for other stuff (like specular map,detail texture,etc.). -We could use texture compression without screwing things up like in normal maps. -Much lower memory usage... The disadvantages: -Expensive fragment shader, using three texture lookups from the height map, plus a normalization (maybe a normalizer cube map could be used?) -Possibly much lower rendering speed... Does anybody know any demo using such a technique? I am planning to implement this... but first I'd like to hear the opinion of other people about this.  So what do you think?   
  3 texture lookups? for what? The normal is one pixel (rgb) and you only need one lookup to get these rgb values. How do you want to calculate the lighting with the heightmap? You need a normal vector for this.   ;Quote:Original post by Specialist843 texture lookups? for what? The normal is one pixel (rgb) and you only need one lookup to get these rgb values. How do you want to calculate the lighting with the heightmap? You need a normal vector for this.Exactly! You calculate the normal from the height map, from three neighbouring pixels, which form a triangle.   ;  hmmm computing normal from height, probably using sobel filter, it isn't a bad idea, but usually we try to precompute most of data to get as much fps as we can... isn't is? Less memory usage? recent hardware is usually shipped with at least 256 MB of video memory so i see no point in calculating normals on fly...its better so save computation power to implement some postprocess effects...tell me if im wrong   ;  Yes and no.Because memory BW grows slower than processing power, there will be a day in which filtering heightmaps (say, luminance, 8bit) will be faster than looking up the normalmap (say RGB 24 bit).Currently, this isn't the case for most HW but I expect on last gen to have a chance at getting this ok... however normalmap compression has now been improved so it's an unfair comparison.Also, the heightmap is a necessary evil for parallax effects.So, is it a good idea to filter the heightmap on the fly?IMHO, not yet.   ;  Think it needs to be surveyed...[Edited by - 3dmaniac on September 9, 2007 11:14:30 AM];  This would be a great method of generating a normal map FROM a height map. You would be able to create a height map texture, and then convert it into a normal map.Consider your idea officially stolen. kthxbye;Quote:Original post by shotgunnutterThis would be a great method of generating a normal map FROM a height map. You would be able to create a height map texture, and then convert it into a normal map.Consider your idea officially stolen. kthxbyeHeh... sorry to disappoint, but finite differencing has been around for a loooong time. I'm pretty sure the NVidia Photoshop DDS exporter has this option. Anyways, it's relatively common to overlay the height information onto a normal map, usually by sticking it in the alpha layer. Keeping only height information around, though, sounds to me like a non-starter, particularly with 3Dc which is great for compressing normal map data.   ;  yes its doable (ive done it before for terrains)one problem to be aware of is mipmaps, ie 1 pixel dist is a greater % of the texturesize at mipmap level 6 than it is a level 0   