I have also verified this visually on SGI machines (which support subtractive blend) and by toggling the demo program between OpenGL lighting and orthogonal illumination mapping.
Z Component of Illumination, note: The images illustrating the X, Y, and Z component of illumination actually include the ambient pass. .
Id3533, tessellation Creator, click-and-drag the shapes from the top menu to the canvas below.
It has happened to me a lot.So the basic idea is to perform diffuse illumination (L dot N) just like you would do per-vertex using OpenGL lighting, but instead, do it per pixel. .The textures are generated at full resolution while the geometry is subsampled by 16 in both I and.The other important effect is that when Lx is negative, the product of Lx and NposX is negative, so it becomes a subtractive pass. .It is helpful to think first of how this technique would be implemented if signed colors, textures, and framebuffer contents were allowed, then work backwards to try to achieve the same result given our actual constraints. .It is done to help minimize the error of this approximation.Ny, render geometry set color to mdiffuse*Ldiffuse*Lz set active texture.We also have to deal with the signedness of Lx, Ly, and Lz, but at this point, let's assume a simple case of Lx, Ly, Lz 0, and see what the order of operations would be to generate the composite shown above.
This has the desired effect of moving the whole dot product calculation into the fragment processing portion of the OpenGL machine.
Disable texture_2D, set color to ambient color, render geometry set DepthFunc to less, set DepthMask true.
Also, the technique here is not adapted for multitexuring, but such adaptations would not be difficult for a given set of functionality (ie number of texture units, tex_env extensions, and blending modes).
The components of L are premultiplied with the light color and the material properties and specified as the current color, while the components of N are each turned into textures.
First, we know we cannot have signed textures, so instead of signed luminance textures of Nx, Ny, and Nz, we use unsigned luminance textures of NposX, NnegX, NposY, NnegY, NposZ, and NnegZ. .
Commercial publication in written, electronic, or other forms without expressed written permission is prohibited.Introduction, put simply, orthogonal illumination mapping is a texture-based multi-pass rendering technique for performing hardware accelerated lighting calculations per-pixel rather than per-vertex. .The trickiest part of this technique is the fact that the dot product is the sum of signed values, and textures and colors are unsigned in OpenGL. .The technique is trivially applicable on other (easily texturable) geometries, but somewhat less trivially applicable on local light sources as some calculations must then be performed per-vertex rather than per-frame.Similarly, Lx * NnegX is then positive, and so becomes an additive pass.Nx, render geometry set DepthFunc to equal, DepthMask to false, Enable blend set color to mdiffuse*Ldiffuse*Ly set active texture.If you do the math, you will discover that this hack causes the darker areas to be a little lighter than they would otherwise.Well, that leaves us with a few alternatives: live with 20 seconds per frame (with stunning image quality) simplify the mesh to achieve an acceptable trade-off between image quality and frame rate use orthogonal illumination mapping and simplify your mesh without impact on the lighting.Even small variations in height can produce wonderful visual cues when illuminated (ala bump-mapping but these small variations are typically the first to go in mesh simplification.
Well, for this simple case, anyway. .