Layered Materials also Bump mapping example please

Hello all
just starting out with Optix and wondered if there was an example of layering one material on top of another via an alpha mask also a simple example of bump mapping via a texture lookup.

Many thanks

Hi,

I don’t think examples of these would/should be necessary. You should be able to implement them given a basic understanding of the techniques you desire.

For bump-mapping simply google bump-mapping and there are many tutorials on how to implement this in OpenGL or Direct3D. You can do the same with OptiX and you will learn more on the way. From a brief view of a few results this looks like a good place to start: http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-13-normal-mapping/

For layers materials you will probably want to use the OptiX v3.0 callable-programs and create a shade tree. There is a basic example for using callable programs for this already.

EDIT: Also you will find there are new things to consider when it comes to bump-mapping in ray-tracing that are not as obvious from GL however. For example reflections of a bumped map surface can cause many self intersections, to resolve these you would need a costly displacement map implementation which is a whole can of worms in performance/implementation. The simplest method is to clamp the reflection vector to the planes surface and cannot face into the surface etc.

Thanks Crog for the explaination and great link.