The Science Of CG


#121

You’re not missing anything :slight_smile: imagine the “blurriness” of reflection as a continuum from “soft” (diffuse) to “sharp” (specular). Nothing in nature is perfectly diffuse or perfectly specular, so we might say that all reflections are glossy.

In general we don’t talk about reflections being more glossy or less glossy since that doesn’t tell us anything - if I asked you to make your shader more glossy how would you know whether to make the reflections softer or sharper? So we talk about reflections being “more diffuse” or “more specular” instead.

One thing that’s interesting to note is that reflections tend to get more specular at glancing angles, i.e. when you look at a glossy surface from side-on you’ll see a much sharper image reflected than when you look straight at it.

One thing that’s very important that I think I’ve already mentioned is to pay no heed whatsoever to what parameters are called in most 3G software, especially ones that have been around a while, as they are either confusing at best or just plain wrong.


#122

Gotcha. I understand that there are multi-layered materials, but for the sake of simplicity lets say we’re talking about only one pure material… does that make my first assertion correct? That it’s not possible for a single material to be 50% specular and 50% diffuse and still have a perfectly sharp specular reflection?

And therefore glossiness if given a value between 0 and 1 should act as a kind of multiplier for the amount of specular reflection? (Blending between diffuse and specular - causing blurry speculars)

Thanks for your response! I think this might be whats tripping me up the most, but I’ll get into that in a bit - once I’ve got the real-life physics nailed down. :thumbsup:


#123

Well that really depends on what you define as a “material”. Nick’s example with the wacom tablet is true for most materials you’ll find in the real world (i.e. substrate or organic materials).

The important point is that it’s never a 50/50 blend between the diffuse part and the specular part. The mix between those ‘lobes’ is view-dependent and governed by the fresnel equations.


#124

I understand Fresnel comes into this (thanks to this thread) - but ignoring Fresnel for just a moment, does that make my first assertion correct? That it’s not possible for a single material to be 50% specular and 50% diffuse and still have perfectly sharp specular reflection?

Thanks for your help guys.


#125

Well you can’t really ignore fresnel - what happens when a photon reaches a boundary is determined by the fresnel equations, regardless of the material.

So yes, I guess your assertion is correct.


#126

Thanks for the info.

So here’s where I’m getting tripped up - trying to apply what I’ve learned here to the 3D world. According to the settings of my vray material… why wouldn’t the last render have 50% of the red diffuse showing up?


#127

Because it’s simulating a layered material.

Most shaders (phong,blin,mia) work on layered approach. Something similar to car paint, the first layer is the duco that gives the car it’s reflection/specular component, and the paint layer under that which gives you the diffuse component.

So think of the material here reflection being the duco, and the diffuse being the paint.

Hopefully this convoluted analogy makes some sense :wink:


#128

Because you set your reflectivity to 100%, and it overrided the diffuse. To make it 50% of reflectivity, you need to change the color of reflection to grey, now it’s white. You mixed up refl glossiness with reflection (power). In vray it’s controlled with the color slot (now it’s white).


#129

Hey everyone,

I’m just beginning to learn about CG, but my main interest is lighting. My background is in film school studying as a cinematographer, so I do not have any math or programming background (beyond high school level), but I feel comfortable with live-action lighting. I’d love to get through this entire thread, but I feel that as a newbie it’s going to take me a while–

Is there a way I can download the entire thread for printing or offline reading? Otherwise I’m afraid I’ll never finish it. I noticed back in 2008 there was such a link, but it seems to be broken now.

Or is there a book or something you recommend reading to get started in understanding the concepts behind CG lighting? (At this point I’m not interested in learning specifics of software or hardware, I wish to get a background in the science and concepts first.)

Thanks!!


#130

What kind of format is .mht?
Maybe I’m doing something wrong when I drop in my browser, because I just see a lot of code! :stuck_out_tongue:
Would it be possible to get a pdf-file?

/Elias


#131

It opens in IE and in opera. I don’t know why you’re having troubles.


#132

Tried safari, firefow and chrome on OS X.
Will try opera!


#133

about mental ray in maya in technical terms… why the mia presets shows black like chrome and glass…and the rendering pannel aspects…how it is use in conjunction of light ans materials


#134

I have made a PDF version(1.91MB) if someone is interested…


#135

I’m interested in a PDF version. Can you post it? Thanks!


#136

Here it is…

http://db.tt/s18bkCt (right click, save link as)

If I missed something from this thread please notify me and I’ll update the file.


#137

I want to correct a misconception about the “Inverse Square Law”

The ISL ONLY applies to point-sources of light, which do not exist in the real world. It’s a generalization that is useful, but only if you know what you’re doing.

Consider a white fluorescent light – one of the long ceiling ones.

Let’s say you put your hand close to one end. Let’s call the amount of illuminance you receive X. Now, move your hand to the other end of the bulb. Has X changed?

You’ve moved a significant distance from the original point, but the intensity of the light arriving on your hand has not changed a bit. Why?

It’s because you’re dealing with an area of light, which contains an infinite number of theoretical point sources. When you move away from one point, you are actually moving towards another.

The same holds true when dealing with distance away from the light, instead of just across it. Moving your hand away from the light, you are moving a different distance from each theoretical point source. Doubling your distance away from an area source does NOT halve the illuminance, especially when you’re very close to the source.

This is why it’s very important to use multiple-sampled area lights to simulate these kinds of light sources.

However, if you are far enough away from the light source, then the ISL is a “close enough” approximation that works really well, so long as you are using a linear workflow.

Speaking of which…

Linear lighting workflows are the single most important thing you can do to get a physically plausible result. I didn’t notice a single mention of it in the pdf.


#138

You’re right. But usually we don’t measure it horizontally, we measure the distance from the away light. This still makes sense regarding simulating realistic torches, and most artificial light sources. What you say is right in those conditions you’ve mentioned. But an arealight is more like an array of lights. Of course, if we move in this array, conditions don’t change. Though they still have the inverse-square decay, it’s simply not visible because of overlapping lights. This is more a theoretical question if we consider it one big light or an array of lights. But we can presume the arealight contains of infinite number of point lights, and this way the ISL still works. it’s an interesting point you made! :thumbsup:

I think I mentioned gamma-correction issue, which is what linear workflow is about.


#139

Finally spent the time to read this whole thread yesterday after bookmarking it when it first started! Lots of great stuff. :thumbsup: I thought I’d have a go at contributing.

As has been touched on before in this thread, when you start trying to do things more realistically, the scale of your objects and the scene start to become more important. Or at least, keeping some kind of ‘scale connection’ between your geometry and the shaders and lights you use. I’ve created some renders in Maxwell to demonstrate this (though you could do the same in mental ray etc). Oh, and I realise this thread is quite a few years in span, but these days Maxwell can use the N, K fresnel equation for its materials and also load measured data in the form of ‘complex IOR’ files so you get the right response per wavelength of light etc. It has a library of around 275 measured substances. mental ray also has measured BRDF shaders I believe but they aren’t included with the host applications yet.

Anyway, back to scale and materials! Let’s start with absorbtion (or ‘attenuation’ or ‘falloff’) for things like glass:

As you can see, my statue (from a free Stanford collection) is 1 meter tall and is made of glass. It’s important to know that even in very transparent substances like glass, the light does die off as it moves through the object (I guess because of impurities and the micro structure itself etc). Changing how fast the light is absorbed inside changes the look of the material. As far as I know, common glass has an attenuation distance of about 30cm, so the third statue is the most correct… for this scale! If instead of changing the attenuation distance, I scaled my scene up or down, I would notice the same changing appearance because the light is travelling further or shorter distances through the same substance.

Scale also matters for SSS (subsurface scattering) effects:


(Please ignore the ugly artifacting in the first two statues… the model is from scan data and so there must be holes and geometry issues causing it.)

Here I’m only changing what in Maxwell is called the scattering coefficient, which basically means how dense the particles are inside the object. It doesn’t really matter what the number means exactly for this demo, just that denser looks more solid. The more particles there are inside the object, the less likely the light is to make it all the way through. You also may be more likely to think that the object is of a smaller scale towards the left, and bigger on the right.

For that material the surface colour is a yellowish-orange, and the particles inside are white. Also, you often have with SSS an option to bias how much of the light scatters ‘forwards’ through the object, or ‘backwards’ back towards the light source. In this case my bias (called assymetry in Maxwell) is set to 0 so it’s 50/50 (equal in all directions, diffuse).

One last example (sorry if the images are too big, you can drag them into a new tab to see the full size):

Here is a combination of the above two effects, in a way. I have kept the SSS coefficient the same, but changed the absorbtion as with the glass example. Once the absorbtion is really low, the light can only penetrate 0.4 cm into the object and so you don’t get much influence from the white particles inside. The light is dieing off before it gets back out. Again, changing the scale of the model would do this also.

In mental ray, the absorbtion on the MIA (or Arch & Design material in 3DS Max) is called Refraction Falloff under the Advanced Refraction rollout. In terms of SSS being accurately changed with the scene scale, I think that only works in mental ray when using the Misss Physical shader, which uses photons.


#140

Good examples, Jozvex! :thumbsup: It shows once again why you should try to stick to real scale.