I have trouble understanding this article about octahedral impostors. (Https://shaderbits.com/blog/octahedral-impostors)
More precisely, I do not understand how we can map the hemi-octahedron (subdivided) vertices to texture coordinates.
Quote from the article: "For those who are not familiar with octahedra, they are a convenient way to convert between a 2D space and a 3D space, or vice versa."
These two images summarize pretty much my problem:
I have watched on the Internet without much success. Here, the guy says we can easily map 3D to UV (https://lightbulbbox.wordpress.com/2018/05/01/improved-impostor-rendering/) without explaining how or why. I've found some research articles on the compression of octahedra and normals, but the problem is quite different and honestly, I did not really understand them.
Could anyone explain to me how to map a vertex expressed in 3D (ie the position of an imposter's camera) from the octahedron to a 2D texture? pure?
To then, for example, launch a ray on the octahedron and map the coordinates of the contact point on 2D UV, or search for the nearest vertex and restore the texture associated with it.
Thank you so much!