![]() |
.. (parent folder) | |
Should we provide a way to load a texture for the bumps or is it okay to always use the same texture (for a example a random texture) ? | |
You should use a regular RGB image and treat the colors as perturbation vectors in R^3. For instance, one can, with range of colors of (0, 255), treat level 128 as zero (or treat it as signed char) and create a unit vector from the vector defined by the values (R - 128, G- 128, B - 128), assuming R, G and B are the appropriate RGB values. This unit bump texture vector will perturb (up to scale!) the regular normal at that surface locations. |
Can we implement bump mapping only for Phong shading, or should we do it for Flat and Gouraud shading as well ? | |
Doing bump mapping for Phong shading is enough. |
HW4 - A link for the article mentioned in the "3D volumetric texture" feature | |
https://gr.cs.technion.ac.il/wc/fetcher.cgi?54Lr8OyYfPkGU4999lBoiDtkgc+hw/WCFiles/An%20Image%20Synthesizer%20-%20Ken%20Perlin.pdf It also appears in the HW section - under the link to HW4 |