Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you think that's cool, the next level, which really could be considered to behave like a hologram is "parallax mapping" and it's variant "parallax occlusion mapping".

Wikipedia has a little video showing the effect of parallax mapping in action: https://en.wikipedia.org/wiki/Parallax_mapping

Another good example: https://doc.babylonjs.com/features/featuresDeepDive/material...

And there's a decent explanation here: https://learnopengl.com/Advanced-Lighting/Parallax-Mapping

Some game examples: http://wiki.polycount.com/wiki/Parallax_Map

Some nice game examples, specifically with looking into windows: http://simonschreibt.de/gat/windows-ac-row-ininite/

Basically, in terms of levels of realism via maps, the progression goes

1. Bump mapping: the shader reads a heightfield and estimates the gradients to compute an adjustment to the normals. Provides some bumpiness, but tends looks a little flat.

2. Normal mapping: basically a variant of bump mapping -- the shader reads the adjustment to the normals directly from a two- or three-channel texture.

3. Parallax mapping: the shader offsets the lookups in the texture map by a combination of the heightmap height and the view direction. Small bumps will appear to shift correctly as the camera moves around, but the polygon edges and silhouettes usually give the illusion away.

4. Parallax occlusion mapping: like parallax mapping, but done in a loop where the shader steps across the heightfield looking for where a ray going under the surface would intersect that heightfield. Handles much deeper bumps, but polygon edges and silhouettes still tend to be a giveaway.

4. Displacement mapping: the heightfield map (or vector displacement map) gets turned into actual geometry that gets rendered somewhere further on in the pipeline. Pretty much perfect, but very expensive. Ubiquitous in film (feature animation and VFX) rendering.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: