Since I wrote this post I've written a new technical paper called "Surface Gradient Based Bump Mapping Framework" which does a better and more complete job describing the following.
All my papers can be found at https://mmikkelsen3d.blogspot.com/p/3d-graphics-papers.html
So I wrote a small demo of the no tangents bump mapping technique from my paper and Andy Davies has worked with me by supplying the Gothic window model and textures.
There is both a binary and source code available. However, it is a Direct3D11 sample so for those with older cards......get an upgrade!
When running the Gothic window you can toggle between height map and derivative map on the M key.
For the model on the right there are no options since it's doing triplanar bump mapping.
In other words it's generating texture coordinates from three planar projections and then mixing based on the normal which would be significantly more cumbersome to achieve using conventional tangent space based normal mapping since no one likes to store three sets of tangent spaces.
I would also like to say thank you to Rune Stubbe of Square Enix for pointing out that triplanar is a good application for my method!
Finally, the triplanar example on the right is using three different textures (one for each plane). There is a derivative map, a height map and a procedural function. For anyone who's still not getting this. There is no texture unwrap in the triplanar case! :)
I'd also like to point out that the shader on the Gothic window is using an auto-generated bump scale to match xNormal so this sample is a good reference for that as well. The triplanar is a good reference for seeing how you can mix different kinds of derivatives. And this includes scenarios where these are obtained from different texture spaces.
That's it for this time.
Friday, December 16, 2011
Tuesday, December 13, 2011
Oh no! Quads only!
I have found in general it can be difficult to get hold of a control mesh that is quads only, well proportioned, and represents something "interesting".
For this reason I thought I'd make one available which was obtained by taking the third example from the bottom given here http://iat.ubalt.edu/summers/math/platsol.htm and then typing the given function:
http://jbit.net/~sparky/academic/icosym_ctrl_744quads.obj
Hope others will find this useful.
For this reason I thought I'd make one available which was obtained by taking the third example from the bottom given here http://iat.ubalt.edu/summers/math/platsol.htm and then typing the given function:
2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)), T=golden ratio
into Maple and then having Maple apply marching cubes to triangulate it. A retopo of this mesh is available here:
http://jbit.net/~sparky/academic/icosym_ctrl_744quads.obj
Hope others will find this useful.
Subscribe to:
Posts (Atom)