View Full Version : Lighting/Shaders/BumpMaps/Texture
oMeZzZ 11-10-2008, 12:40 PM Hey there all,
I'm very keen on learning about the above-mentioned title, but before I go googling the hell out of these topics I would really appreciate it if someone could give a brief explanation on each of them highlighting: (how they are used, what methods are involved in each, what makes them special etc...)
Thanks in advance :D
[EDIT: and please add-in any topics you feel that are also relevant)
|
|
JamesMK
11-10-2008, 02:46 PM
Well, it's sort of a broad subject, to say the least... but here's a starting point:
Lighting refers to, of course, any methods used to light scenes, and can be divided into two major groups; local methods and global methods. The former usually applies to any standard light sources such as omnis, spotlights, infinite lights, ambient light and so on, while the latter includes anything that looks beyond the current pixel, including but not limited to raytraced reflections, ambient occlusion, various types of global illumination methods (radiosity, irradiance caching, QMC, FG and so on). Shadows go somewhere inbetween, but belong to the lighting category, and include shadow maps, raytraced shadows, area shadows and so on.
Lighting in general is arguably the most important aspect of any visual production, be it CG or actual real-world footage, so even if everything else is top-notch, bad lighting can effectively ruin a shot completely, while great lighting can make even the most mundane stuff look fantastic.
Shaders typically refer to algorithms defining how the lighting is supposed to affect a certain point, taking angles of surface normals in account in relation to the angle of the incoming light and sometimes the angle of the surface in relation to the camera. In an expanded sense, shaders also include any methods used (mathematical in nature) to create patterns or variations to any surface property, that is not defined by a bitmap texture, but rather by algorithmic means. The usual hierarchy is that the top-level container defining the final look of the surface of a model is called a material, and that material in turn is composed of one or several different shaders, each responsible for controlling some particular property of the material, such as the overall illumination model, color, bumpiness or specularity (and so on).
Bumpmaps are simply bitmaps or algorithmic patterns that serve the purpose of adding certain perturbations to the normals of a surface to simulate any non-smooth material, i.e. to add what appears to be a geometric variance where the supporting surface doesn't actually vary at all, to make an otherwise completely flat surface appear irregular (with respect to lighting) in some way - in other words a way to visually add detail where there is no "real" detail. This is in contrast to displacement maps, which are used to actually move parts of a surface to a different place by subdividing (at rendertime) the surface as needed to accurately represent the displacement relative to the original input surface, thereby adding "real detail".
Texture usually just means a bitmap. Any 2D image file used to influence any parameter otherwise controlled by a shader, typically to change the diffuse color, but generally to change every single thing along the surface based on the bitmap and the texture coordinates associated with the surface to get variations in color, surface normal, specular power and falloff, reflectivity and so on, but also for special properties such as controlling where hair should grow on a character, or anything like that. Do note that "texture" can also refer to any kind of input that results in variations of a material property, so some people might be talking about procedural textures as well, which are algorithmic constructs that do not necessarily use any actual bitmaps, but rather just mathematical definitions of patterns or noise.
It goes without saying that one could easily write entire encyclopedias on each one of these subjects, but I have no intention of doing so - so, just take the stuff above as simple definition of terms and look for more information, then keep in mind that none of it can be treated merely as theoretical constructs - CG is something you do rather than just read about.
sundialsvc4
11-11-2008, 03:17 AM
A few clarifications of terminology in the preceding post might be helpful...
The term "shader" always refers to an algorithm of some kind, most commonly one that is designed to be implemented by specialized hardware ... such as the GPU on a graphics card. While the name was originally chosen in reference to the fact that these capabilities were historically used to calculate light-and-shadow, some GPUs are now being used to perform massively-parallel general purpose calculations. (Likewise, some general-purpose CPU's now have very-considerable parallel-processing capabilities...)
A (surface) normal is a hypothetical vector that is "exactly perpendicular to a plane, and pointing toward the 'front' side." One of its most important purposes is to determine reflections. And here's where that "bump map" comes in: if we intentionally perturb the direction of that vector in our reflection calculations, we'll achieve the visual effect of light bouncing off that surface "as though it were facing a different way, when it really isn't." In other words, "a 'bumpy-looking' surface ... on the cheap!" Very handy.
Finally, "textures" are a classic example of how the peculiar nature of the digital computer can be used to take "an idea from the real world" and apply it to situations that don't have a "real world" equivalent. The idea that originally stemmed from the need to make a surface "look distinct ... rocky, woody, stony, or what-have-you ... on a pixel-by-pixel basis," suddenly blossomed into a highly abstracted application of that same idea. A "texture" is really "a signal-generator." For every pixel or point on the surface, it produces a signal. And the "signal" that it produces can be used to influence, not only a surface's appearance, but any-and-all other characteristics of that surface, as well. (So, it is "the same idea, but 'ever-so-much more so.' ") Yep, "textures" are implemented using "shaders," and they can influence not only color, but normals, specularity, reflectivity, alpha . . . .
oMeZzZ
11-11-2008, 08:49 AM
sundialsvc4 and JamesMK...
Thanks for the replies, I've got a slightly better understanding of how it fits in together.
Are there any useful images, tutorials that you have found over the years which may help my understanding even further?
- cheers
JamesMK
11-11-2008, 09:15 AM
Read http://en.wikipedia.org/wiki/Rendering_(computer_graphics) and everything linked from it - that should cover most of the terminology as well as the history of most techniques involved from a theoretical point of view.
sundialsvc4
11-13-2008, 01:58 AM
There is a vast amount of material out there.
I suggest that you first read-and-re-read this thread and contemplate what we have said ... so that it begins to make "common sense."
I always find it to be very-useful to just try to clear my head and think about 'big, hairy problems' (like this one) in terms of "the big, common-sense picture." If our objective was to use a computer to turn "some appropriate digital representation of 'a cube'" into "a stunningly realistic-looking 'picture of a cube'," what hurdles would the computer need to be able to overcome? Y'know... just in big, common-sense terms...
Then... reading over this thread again... what part might each of these four 'strange' concepts play in this ... "y'know, big common-sense" ... task?
Just contemplate that.
Now, once you've got that "big common-sense" view firmly in your cranium ... :bounce: ... start to consider how the digital computer acts like a great big bottle of "eversomuchmoreso" (http://www.halfbakery.com/idea/The_20Emperor_27s_20New_20Perfume). (The computer, after all, can take an algorithm that has a "big common-sense" application and apply that algorithm anywhere and everywhere, to accomplish "magickal things" that appear to be totally unrelated.)
At approximately this point in time ... your brain will explode. :surprised
Give it a rest. Have a beer. :beer: Sleep on it. Don't push it. "The little light will come on."
oMeZzZ
11-13-2008, 11:34 AM
hahaha
I love the way you explained it!
In the last few days I have realized exactly what you said...It's gona take a while considering I'm currently studying for exams :P
At least I have my render farm setup...now I can actually do some learning and render with a bit more ease.
- thanks for the support.
oMeZzZ
11-17-2008, 01:14 PM
For anyone like me, who needs a straight-forward tutorial on using VRAY to light up scenes...the following site will be really helpful for you: http://www.aversis.be/tutorials/
Here is an image I made using the principles in most of the tutorials:
http://img508.imageshack.us/img508/451/insidegymglassstairsnu5.jpg (http://img508.imageshack.us/my.php?image=insidegymglassstairsnu5.jpg)
http://img508.imageshack.us/img508/insidegymglassstairsnu5.jpg/1/w800.png (http://g.imageshack.us/img508/insidegymglassstairsnu5.jpg/1/)
CGTalk Moderation
11-17-2008, 01:14 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.