PDA

View Full Version : What does diffuse do?

Samoht VII
05-09-2012, 12:23 AM
I am trying to texture these days and I am having trouble working out what diffuse actually means. So it is when an object reflects light?
So how do i know what objects reflect light? I don't really get what i'm looking for when i am looking for diffuse.
I was also told specularity and diffuse should equal 100%. Is that a good rule to follow as a beginner?
If anyone could just put diffuse as simple as possible.
Thanks

Danner
05-09-2012, 01:05 AM
when you put a light on an object, the object will become lighter because it is affected by the light, that is diffuse, how much lights affect your object.

SplineGod
05-09-2012, 02:25 AM
A polished surface will reflect light rays more or less the same as their angle of incidence ( the angle between the light ray and the surface).
Diffuse surface scatter the light more incoherently based on the roughness of the surface.
For example a mirror will have a high reflectivity but low diffuse.
A piece of sandstone will have low reflectivity but high diffuse.

bazsa73
05-09-2012, 02:39 AM
I remember vaguely that diffuse means when light slightly enters the surface then exits again and so doing it the light gets scattered.
http://www.keyshot.com/keyshot3/manual/images/diffuse_spec_example.jpg

SplineGod
05-09-2012, 03:25 AM
No, that would be called subsurface scattering. Basically its sort of a glowly effect when light penetrates skin, wax or other things that are slightly translucent. :)

prometheus
05-09-2012, 04:06 AM
No, that would be called subsurface scattering. Basically its sort of a glowly effect when light penetrates skin, wax or other things that are slightly translucent. :)

Really? subsurface scattering is within the objects volume, so that is why I wonder if not the term surface scattering is proper for diffuse? when only affect top surface geometry.

Michael

Sensei
05-09-2012, 04:18 AM
Between light sample direction vector and surface normal vector there is done dot product calculation. Which is giving angle between the two vectors. It's negated. And then 1.0 means surface and light are pointing in perfect face to face directions.
Value 0.0 means that there is 90 degree difference. Less than 0.0 up to -1.0 means surface direction is similar to light sample direction. -1.0 means they're parallel (same x, y and z)

Sum of all lights all samples is then multiplied by diffuse scalar provided by user in Surface Editor/Node Editor. And then by color of surface (directly provided in color picker or read from texture).

Simply putting, diffuse which you see in Surface/Node Editor is multiplier.

Lightwolf
05-09-2012, 04:20 AM
I remember vaguely that diffuse means when light slightly enters the surface then exits again and so doing it the light gets scattered.
http://www.keyshot.com/keyshot3/manual/images/diffuse_spec_example.jpg
Well, the image does describe the surface properties that cause diffuse lighting, but as Larry mentioned, entering the surface would indeed be subsurface scattering (unless it's "plain" transparency).

Cheers,
Mike

prometheus
05-09-2012, 05:12 AM
Between light sample direction vector and surface normal vector there is done dot product calculation. Which is giving angle between the two vectors. It's negated. And then 1.0 means surface and light are pointing in perfect face to face directions.
Value 0.0 means that there is 90 degree difference. Less than 0.0 up to -1.0 means surface direction is similar to light sample direction. -1.0 means they're parallel (same x, y and z)

Sum of all lights all samples is then multiplied by diffuse scalar provided by user in Surface Editor/Node Editor. And then by color of surface (directly provided in color picker or read from texture).

Simply putting, diffuse which you see in Surface/Node Editor is multiplier.

Lol..You always think in maths and describes it that way, this makes perfect sense:D But donīt you have any emotions Mr Data? and how would you Envision emotion data formulas?:jester:

Michael

erikals
05-09-2012, 05:17 AM

once again, about diffuse and other stuff...

http://www.daveschool.com/index.php/gallery/tutorials/312-3d-lighting-and-rendering-part-1
http://www.daveschool.com/index.php/gallery/tutorials/316-3d-lighting-and-rendering-part-2

Sensei
05-09-2012, 05:19 AM
"I can only feel something after drinking glass of beer" *), paraphrasing "Harry Potter".. ;)

*) Hermiona Granger.

Tobian
05-09-2012, 08:07 AM
Diffuse is basically diffused reflectance.

Any surface is usually described by a sum of it's light reflectance, transmission and (in the case of things like skin or wax) complex internal light bouncing, in the form of sss.

In CG these properties are described by 'shaders' a simplified mathematical simulation of how light reflects, or often called the BSDF (http://en.wikipedia.org/wiki/Bidirectional_scattering_distribution_function) (bi-directional scattering distribution function) Normally 'Diffuse' in Lightwave is handled by a Lambertian (smooth) bsdf model. There are other models which re-create the look of rougher surfaces, such as Oren_Nayer and Mineart. (available as nodes since LW9.0) As illustrated by Sensei they are just loosely simulated, for speed, based on the facing to an emission source. In a way you can think of 'diffuse' as just being another type of 'reflection' just where the roughness of the surface is such that you can't see a mirror-like effect. You could make a 'diffuse' shader by having an extremely blurry reflection shader (well over 100%) but that would be insanely slow to calculate, smoothly :)

As illustrated in those DAVE school vids: reflection + diffuse should always equal 100% or less. The one thing they miss out of those, however, is that the ratio between diffuse and reflection is almost never a whole number, but described in terms of a Fresnel: So the further from facing you get, the more reflective a surface is an the less diffuse it's reflection is. You can plug a Fresnel value (multiplied by a texture) into reflection, and it's inverse into diffuse.

In turn, if you add in sss to the mix, this replaces some of the diffuse too, as the sss+diffuse+reflection likewise shouldn't equal more than 100%. Transmission too needs to be factored into the mix, and some surfaces have several layers or reflection too, which can make some shaders quite complex (Such as car paint).