Sat, Nov 30, 11:42 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 29 7:57 am)



Subject: A Dummies Guide to Indirect Lighting in Poser 8


carodan ( ) posted Wed, 09 September 2009 at 7:00 AM

It's worth reading this thread in it's entirety - I know a lot will become redundant with some of the SR1 update, but you'll understand IDL a lot better anyway.

 

PoserPro2014(Sr4), Win7 x64, display units set to inches.

                                      www.danielroseartnew.weebly.com



vilters ( ) posted Wed, 09 September 2009 at 7:50 AM

What i would try:
bounces 2
IC at 40-50 at the most. It is not a very-very complicated scene, no hard borders. Could even decend to 20-30 for a start.
IQ at 50 and see what happens.
Pixel samples at 3
Min shadow rate at 0.2 to 0.5

And start fine tuning from here.

Just an obsevation; is the cloth "in" the floor next to her left hand?

Poser 1, 2, 3, 4, 5, 7, P8 and PPro2010, P9 and PP2012, P10 and PP2014 Game Dev
"Do not drive faster then your angel can fly"!


Honey_ZA ( ) posted Wed, 09 September 2009 at 7:58 AM

cspear:  Thank you!!

I changed the settings as you suggested and the precalculating took 32min50s and the render is now at 1hr18min and about 85% done.  That is a huge improvement.  The only problem so far that I can tell is that the "cloth" is not as transparent as it is in the "normal" render.  Is that because of raytrace?  I will post results as soon as it is done rendering.

carodan:  I did find the other render interface of Dimension3d but to be honest I still don't know the effects that half of those settings will have.  :(  I have read the entire thread though and will go back from the beginning once I can figure out why it is taking over 14 hrs.  It is a bit hard for me to do comparisons if I have to wait that long.  :)

vilters:  :blushing:  Yes it is "in" the floor.  Once I get the render settings/time under control I will do alot of fine tuning.  Also in the image that is rendering now the hair does not work in the scene but right now that is the least of my concern. ;)
As soon as this one is done rendering I am going to try your settings.

Thank you so much everyone.  I will post results.

HoNeY
http://www.HoneyB.co.za


vilters ( ) posted Wed, 09 September 2009 at 8:29 AM

Corrct;  any AO in the meterials should be disconected, they explode rendering times.

Poser 1, 2, 3, 4, 5, 7, P8 and PPro2010, P9 and PP2012, P10 and PP2014 Game Dev
"Do not drive faster then your angel can fly"!


carodan ( ) posted Wed, 09 September 2009 at 8:50 AM · edited Wed, 09 September 2009 at 8:51 AM

Sounds like cspear's advice for the IC has made your render times more acceptible until SR1 is released. No surprise there really as with IC =100 there is no interpolation of the shading points being calculated. A couple of hours is much better for now than 14 plus with only a partially completed render.
I wouldn't worry too much about experimenting with the alternative render dialogue. If the IDL improvements are as good as bb is reporting then it's not worth the time experimenting.

 

PoserPro2014(Sr4), Win7 x64, display units set to inches.

                                      www.danielroseartnew.weebly.com



Honey_ZA ( ) posted Wed, 09 September 2009 at 8:52 AM · edited Wed, 09 September 2009 at 8:55 AM

Content Advisory! This message contains nudity

file_439063.jpg

Ok so here is the result. Precalc = 32min50s render = 2hr13min10s Total = 2hr 46min

The hair looks shocking but for comparisons I will keep it in.

As far as I can tell (!) there are no AO nodes in anything.

HoNeY
http://www.HoneyB.co.za


Honey_ZA ( ) posted Wed, 09 September 2009 at 8:54 AM

carodan:  I agree.  Only thing is if my settings (or lack thereof) is not right then surely even with the release of SR1 I will still be stuck.
Also - not sure how long till that release so until then I would like to find a work around.

But yes.....a huge improvement indeed.  So Thanx!!

HoNeY
http://www.HoneyB.co.za


carodan ( ) posted Wed, 09 September 2009 at 8:56 AM · edited Wed, 09 September 2009 at 8:59 AM

I think SR1 is going to change some of how we approach settings for IDL (at least that is what's been indicated by bb).

You'll notice that with the current release of P8 you tend to get lots of blocky looking artifacts when rendering with most IDL related settings - I think this is one of the major improvements that's been worked on for SR1, so in theory we should be able to use lower settings and still get nice smooth results.

 

PoserPro2014(Sr4), Win7 x64, display units set to inches.

                                      www.danielroseartnew.weebly.com



Honey_ZA ( ) posted Wed, 09 September 2009 at 9:16 AM

At the same speed?

HoNeY
http://www.HoneyB.co.za


carodan ( ) posted Wed, 09 September 2009 at 9:25 AM · edited Wed, 09 September 2009 at 9:29 AM

From what I understand reading the threads here it should be much faster, and better quality.

Of course, I expect there will still be scene elements that will continue to slow things down (transparency?). But there is always the option to exclude certain objcts from raytracing at render time - while not ideal it offers a workaround.
Also, a lot depends on scene complexity and render dimensions.

 

PoserPro2014(Sr4), Win7 x64, display units set to inches.

                                      www.danielroseartnew.weebly.com



Honey_ZA ( ) posted Wed, 09 September 2009 at 9:34 AM

That sounds fantastic.  If only it was released today.  BUT  - for that improvement I think I can wait as long as it takes. 

I was just confused as how some people were getting render times of under 10 minutes and mine was taking hours.....long...boring...lonely hours....

HoNeY
http://www.HoneyB.co.za


carodan ( ) posted Wed, 09 September 2009 at 9:46 AM

When SR1 is released we'll have to try and come up with an IDL info/troubleshooting reference chart to help get to grips with this new feature. Even with quite limited controls it's easy to get confused at times. When it all comes together good you can get fabulous results though.

 

PoserPro2014(Sr4), Win7 x64, display units set to inches.

                                      www.danielroseartnew.weebly.com



kobaltkween ( ) posted Wed, 09 September 2009 at 10:07 AM

just to say, in general, i've had long render times with raytraced shadows and large transparent cloth.  i'm not sure there is a way to use a transparent object that large with modern lighting features and not take a serious time hit.  maybe Poser 8 is much faster in that respect, but i think there's only so much you can do. 



Honey_ZA ( ) posted Wed, 09 September 2009 at 10:12 AM

Cobaltdreams:  If it was just this image that I was having the long render times with I would understand that but I've had just the figure sitting on the floor with hair - no clothes - and it was also a 24hr + render.  I am pretty sure that there is something seriously off with my settings but I am going to try to go through them and see what I can figure out. 

If only I could get my mind to grab hold of all this information and process it while I sleep. 
I am doing a few render "tests" on something different to see if I can pick up anything.  I might post them too.

HoNeY
http://www.HoneyB.co.za


kobaltkween ( ) posted Wed, 09 September 2009 at 10:33 AM

oh, i'm not saying there's not other issues.  i'm just saying that there might not be a magic bullet for that particular scene. 



pjz99 ( ) posted Wed, 09 September 2009 at 10:34 AM

Check the hair (and individual body parts of the hair, if it is a conforming piece) - change Min Shading Rate to 0.2 or even a bit higher, and see if it renders faster but looks the same.  Some hair models are set to 0.0 when you load them - when not using raytracing or indirect lighting, they merely take "a long time" but when you enable all the rest then render times become really long.

My Freebies


Honey_ZA ( ) posted Wed, 09 September 2009 at 10:45 AM

cobaltdream:  I understand and agree.  thanx

pjz99:  Thanx I will try.  Although this was the first scene I had actually included the hair with the IDL but I will give it a shot.  Thanx

HoNeY
http://www.HoneyB.co.za


Honey_ZA ( ) posted Wed, 09 September 2009 at 11:10 AM · edited Wed, 09 September 2009 at 11:11 AM

Content Advisory! This message contains nudity

file_439071.jpg

OK.  So here is the one from before that took 24+ hrs without the hair.

This one took 22min02s!!!!  HUGE improvement.  Thank you very much!!!

It does have a few artifacts etc but at least I am pretty sure now that my settings are semi correct. 

btw - If I add the hair it takes 31min29s but the hair doesn't look too great.  

HoNeY
http://www.HoneyB.co.za


Honey_ZA ( ) posted Wed, 09 September 2009 at 11:13 AM

Content Advisory! This message contains nudity

file_439072.jpg

This one looks horrid.

Same scene but in a room and not just the wall behind her and the floor.

It looks really bad but I think that has more to do with light and prop placement than settings.  This one took 18 mins 13 sec.

:D

HoNeY
http://www.HoneyB.co.za


bagginsbill ( ) posted Wed, 09 September 2009 at 11:15 AM

IDL with transmapped hair is a lot of calculation.

When a ray is sent to sample the luminance on a particular spot, hundreds of other rays are sent out from there to find what other objects are lighting that spot.

Those in turn send out hundreds of more samples, for each of those original hundreds.

Now when a semi-transparent polygon is sampled, it not only does that for that point, but it shoots an extra ray through the point to see what should be added for what is seen behind that spot. This in turn starts the process all over again. Worse, the second set will bounce back and hit the first set, but from behind resulting in calculations for back-facing polygons. The inintial release had some issues with IDL on back-facing polygons, so the problem is exacerbated.

The amount of work necessary to calculate IDL for a small patch of hair can equal or exceed the work necessary for the rest of the room!


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Wed, 09 September 2009 at 11:17 AM

file_439073.jpg

SR1 is a lot better at this. You can drop the render settings to levels way below what you're using now, and still get good results.

This render was just over 5 minutes. There is reflective glass in the cabinet. There is reflective metal on the lamp. There is transmapped hair. There are two spotlights with super-soft shadows, using extra shadow sampling available as a knob in SR1!

Those of you who are familiar with the render settings will be surprised at what I"m using here.

IC = 20.
ILQ = 4 <=== !!!


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Wed, 09 September 2009 at 11:22 AM

file_439074.jpg

Rendering without the figure, hair, and clothes, this is 1 minute 50 seconds.

There are some artifacts at corners, but SM is working on that.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


Honey_ZA ( ) posted Wed, 09 September 2009 at 11:22 AM

BB:  That looks super good.  Compared to what I am getting at higher settings.

Let me ask you this then:  Based on the settings I am using NOW - am I getting the best I can at the best time I can?  In other words if I wait till SR1 will i get better results by just changing some settings or do you think there is more to my "problem" than just the current way Poser handles IDL.

I hope that makes sense.

In short.  I don't want SR1 to come along and I still battle because there is something else  I am doing wrong.

HoNeY
http://www.HoneyB.co.za


bagginsbill ( ) posted Wed, 09 September 2009 at 11:35 AM · edited Wed, 09 September 2009 at 11:36 AM

The best you can get isn't going to happen with the best time you can get. You showed that on the previous page. Using the released version, not SR1, In a room with lower settings, the splotches overwhelm the render, and its just not usable. We have pages of tweak experiments showing that you can only get rid of them with very specialized render settings.

Your comment, "It looks really bad but I think that has more to do with light and prop placement than settings.  This one took 18 mins 13 sec." is not correct. It has everything to do with the initial implementation being very difficult to use, whereas I'm finding no problem doing room/box type renders with the same settings over and over, regardless of light placement or prop placement.

There is some artistry/technique to getting the shaders right, but it isn't hard. The important thing to understand, and I demonstrated it above with the vilters box, is that shaders participate in lighting, so you can't do stuff that is mathematically unsound, like having Diffuse_Value be 1 or having Reflection participate in the diffuse calculation.
 


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


ice-boy ( ) posted Wed, 09 September 2009 at 11:37 AM

Quote - Rendering without the figure, hair, and clothes, this is 1 minute 50 seconds.

There are some artifacts at corners, but SM is working on that.

can you render out only  the light that is bouncing around? its in the D script.


bagginsbill ( ) posted Wed, 09 September 2009 at 11:40 AM

file_439077.jpg

> Quote - > Quote - Rendering without the figure, hair, and clothes, this is 1 minute 50 seconds. > > > > There are some artifacts at corners, but SM is working on that. > > can you render out only  the light that is bouncing around? its in the D script.

Here ya go.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Wed, 09 September 2009 at 11:43 AM · edited Wed, 09 September 2009 at 11:43 AM

file_439079.jpg

Same thing here, but I doubled the IDL intensity.

Interestingly, the reflections in the glass are showing the room behind the camera. Apparently, the IDL-only pass also includes reflections of the IDL.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Wed, 09 September 2009 at 11:47 AM

file_439082.jpg

This is also IDL only, double intensity, with the camera next to the lamp, looking away from the front wall.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


ice-boy ( ) posted Wed, 09 September 2009 at 11:48 AM

aha thanks. looks good.

nice to read that SM is still working on  on the edges with IDL.


bagginsbill ( ) posted Wed, 09 September 2009 at 11:49 AM

file_439084.jpg

Rendered again as a normal render. The bright spots are because my light sources back there are close to those surfaces, and they produce strong specular reflections.

34 seconds.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Wed, 09 September 2009 at 11:52 AM

Oooh - another beta build was just released, specifically addressing some IDL issues. Woot!

Unfortunately, I have to travel now. Too bad.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


jdcooke ( ) posted Wed, 09 September 2009 at 12:03 PM

LOL,  you big tease.....

This is great stuff,  thanks for the renders

 


Honey_ZA ( ) posted Wed, 09 September 2009 at 12:25 PM

BB:  Thanx.  Basicly I am going to have to wrap my head around all the technical stuff to get anywhere near a good render.  sigh seems like lots of studying for me. 

I understand about the best time / best quality.  I think what I meant was the best quality at the best time for that quality.  I don't mind waiting hours if it at the right quality with all the right settings but hours for sub standard just doesn't make sense to me. 

What I would like to do is play with each setting and see what they do - as my biggest problem is that I don't know what the different settings do and what will change.  I am not very good with technical stuff. - but having to wait hours for a test render means I am going to be busy with that for weeks. 

Thank you for all the help.  I will start at the top of the thread and see how much I can take in and actually understand.  If all else fails it is back to std P8 renders for me.

Thanks everyone for the help.

HoNeY
http://www.HoneyB.co.za


bagginsbill ( ) posted Wed, 09 September 2009 at 12:42 PM

As with all Poser testing, I advise not testing with a figure and hair.

Place a few scaled boxes around to form a 2 or 3-sided room,. Add a roof. Place a sphere and/or an unsaled box in the middle. Use one spotlight. Render small, like 300 by 300. You will iterate 20 times faster with this approach.

Be sure to set the materials on the props so that Diffuse_Value = 75 to 80%. Try white materials, first. Then try making a wall red, or the ball red. See what happens

Experiment with number of bounces = 0, 1, 2, 3, 4

Experiment with IC = 0, 10, 20, 40, 80, 100

Experiment with ILQ = 0, 4, 7, 10, 20, 40, 80, 100

Save each image, label it, and record the render time with it.

You will get many more bad results than with SR1, but you will be learning how things work, and what render settings you're simply not willing to go to because of speed.

Then, add a semi-transparent one-sided square somewhere and do it all again.

I've been doing stuff like this for weeks. I'm still not fully aware of all the implications to quality of lighting, shadows, and render times. But I gave up on studying much more than I did, because SR1 is changing the quality factor so much. I didn't worry too much about getting quality with the first version. I just wanted to understand the parameters.

After you get to know the basics, use D3Ds Render Firefly dialog to get access to more parameters, like Sample Size, Num Samples, etc.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


vilters ( ) posted Wed, 09 September 2009 at 4:27 PM

file_439113.jpg

Tonights update on the balls&walls scene. Same scene, same materials and nodes. (click) JPG, to get in in here.

Poser 1, 2, 3, 4, 5, 7, P8 and PPro2010, P9 and PP2012, P10 and PP2014 Game Dev
"Do not drive faster then your angel can fly"!


GeneralNutt ( ) posted Wed, 09 September 2009 at 11:47 PM

I don't have the knowledge or experience,But,  I would have thought this statement  "There is some artistry/technique to getting the shaders right, but it isn't hard." is bunk if it didn't come from BB. So I guess I'm more dense then I thought.  



Believable3D ( ) posted Thu, 10 September 2009 at 2:02 AM

Hm, popped back into this thread and notice BB talking about Diffuse Value properly being 75-80%, which is something I didn't know. I'm sure Bagginsbill has posted at length on this somewhere... can someone point me to a good discussion of the principles involved?

______________

Hardware: AMD Ryzen 9 3900X/MSI MAG570 Tomahawk X570/Zotac Geforce GTX 1650 Super 4GB/32GB OLOy RAM

Software: Windows 10 Professional/Poser Pro 11/Photoshop/Postworkshop 3


Honey_ZA ( ) posted Thu, 10 September 2009 at 2:05 AM

I am SO confused.  I just rerendered the first image (with the red cloth) at exactly the same settings as my 2hr 46min render.  The ONLY change is that I removed the hair.

This render took 12hrs 02min 45 sec.

I guess I should pack away IDL until I know what I am doing.

HoNeY
http://www.HoneyB.co.za


ice-boy ( ) posted Thu, 10 September 2009 at 2:21 AM

or you should whait for SP1.


Honey_ZA ( ) posted Thu, 10 September 2009 at 2:24 AM

Yeah that too.  :)

HoNeY
http://www.HoneyB.co.za


pjz99 ( ) posted Thu, 10 September 2009 at 3:34 AM

Quote - As with all Poser testing, I advise not testing with a figure and hair. ...

I think you're talking about a specific application of testing, right?  Practically all ordinary users are going to be working with figures and hair or other items that have transparency, which I assume is what you're getting at although hair tends to have much more complex geometry.

My Freebies


Believable3D ( ) posted Thu, 10 September 2009 at 4:05 AM

I think he's just talking about when you're figuring out what each render setting does, don't bog your machine down with stuff that's gonna take a long time to render.

______________

Hardware: AMD Ryzen 9 3900X/MSI MAG570 Tomahawk X570/Zotac Geforce GTX 1650 Super 4GB/32GB OLOy RAM

Software: Windows 10 Professional/Poser Pro 11/Photoshop/Postworkshop 3


bagginsbill ( ) posted Thu, 10 September 2009 at 6:27 AM

Yes, Believable3D has it right.

You don't need to toss a car through the air to work out how parabolic arcs look when you throw things higher/lower faster/slower. A baseball works about as well.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


kobaltkween ( ) posted Thu, 10 September 2009 at 9:48 AM

Quote - Hm, popped back into this thread and notice BB talking about Diffuse Value properly being 75-80%, which is something I didn't know. I'm sure Bagginsbill has posted at length on this somewhere... can someone point me to a good discussion of the principles involved?

i can't seem to find it now, but there's a thread on CGTalk about the basic principles of textures and materials.  i could have sworn it was a sticky.  anyway, it gets into how nothing is purely diffuse or purely reflective.  there's a range.  basically, if i understand it right, your total should be about 1 when combining your lighting effects.  because your object isn't creating light unless it's glowing.

i remember the CGTalk thread saying skin was between .7 something and .8 something diffuse value.  personally, one of the first things i discovered with shaders (before VSS and before GC discussions) was that they became much more realistic when you let your diffuse and specular values have a sum with in a decent range of 1.  i suppose this also means that if you have a specular map controlling your specular amount, you should probably use an inverted version controlling your diffuse amount.

iirc, default materials have 1.0 diffuse value and 1.0 specular value.  one reason that looks so fake is that relationship is way off.  and the closer your lighting gets to reality, the more realistic you need to be about conservation of energy with your materials.



carodan ( ) posted Thu, 10 September 2009 at 1:17 PM

Here's something that I get confused about with diffuse values - if I have a diffuse texture plugged into my diffuse channel and the value is set to 1, is the reflected light actually 1 or is it  lower due to the effect of the texture? (I suspect I should already know the answer to this)

 

PoserPro2014(Sr4), Win7 x64, display units set to inches.

                                      www.danielroseartnew.weebly.com



kobaltkween ( ) posted Thu, 10 September 2009 at 1:37 PM · edited Thu, 10 September 2009 at 1:40 PM

bagginsbill will have a fully correct and educated answer, but i think diffuse in the Poser root node is diffuse texture times diffuse value times the internal diffuse shader. 

edited to add: even with textures, i still find setting the values increases realism.  because the effect happens regardless of the color of the object.  a highly diffuse white plastic and a highly reflective white plastic would still be on either ends of the extreme.



bagginsbill ( ) posted Thu, 10 September 2009 at 1:57 PM

Back to basics. This is one of those explanations that involves simple addition and multiplication, but I'm going to lose a lot of people, even though balancing a checkbook is harder than this. So be it. You asked, I will answer.

Color arithmetic is just 3 copies of ordinary arithmetic, done independently for each of the R, G, and B components of a color.

We also need to clarify the numerical value of these components. While it is commonly accepted that each component is an integer from 0 to 255, this is not how the math proceeds inside the render. Instead, these 0 to 255 values are mapped into fractional values from 0 to 1.

So if you specify the luminance of a color component in an RGB value as 200, the fractional or unit-range representation is 200/255 = approximately .7843.

As a final step to produce an image, unit-range color components are converted back to 0 to 255 by multiplying the final pixel values with 255 and then rounding to the nearest integer.

Note also that color components are not limited to the range 0 to 1. Color components can be less than 0 (what I call hypocolors) and greater than 1 (what I call hypercolors, also known as High Dynamic Range, or HDR.)

Then we also have the added complication that most images are encoded as sRGB values, not linear values. This means, for example, that in a JPEG, 200 is not exactly twice as bright as 100. Nor is 100 twice the brightness of 50. Instead, one must convert these to linear unit-range values. This means, for example, that the true luminance of 200 is not 200/255, but 200/255 to the power 2.2, or about .58597.

Having said all that, I'll now just assume we're talking about linear unit-range color components. The arithmetic is straightforward.

I will use capital letters like A or B to represent colors. Each is actually 3 numbers, one for each value of R, G, or B. To refer to the individual red component of A, I'll say A.red. The green is A.green. The blue component of B is B.blue. With me? (Don't run - it's easy.)

I'll also use square brackets to denote a color as an individual tuple or vector. That is to say:

A is the same as [A.red, A.green, A.blue]

Adding two colors A and B to get a new color, C, is simple.

C = A + B

which proceeds like this

[C.red, C.green, C.blue] = [A.red + B.red, A.blue + B.blue, A.green + B.green]

Or, to put it another way:

C.red = A.red + B.red
C.green = A.green + B.green
C.blue = A.blue + B.blue

It should be obvious clear, then that the operator, +, is distributed over the components. Using the same principle, subtracting colors we get:

C = A - B

[C.red, C.green, C.blue] = [A.red - B.red, A.blue - B.blue, A.green - B.green]

or

C.red = A.red - B.red
etc.

Multiplication is the same, just change the operator from + to *.

C = A * B

[C.red, C.green, C.blue] = [A.red * B.red, A.blue * B.blue, A.green * B.green]

Now how do we do arithmetic where we mixing individual numbers with colors? Consider some numerical value, v, which is not a color, but just a single number. The rule is simply this: convert the individual number into an equivalent color by duplicating v for each of R, G, and B.

Consider the color A = [.2, .5, .7]. What happens if we use v = .5, and we multiply A * v?

A * v = [.2, .5, .7] * .5

Promote .5 to the equivalent color, [.5, .5, .5]
A * v = [.2, .5, .7] * [.5, .5, .5]

And now use the color multiply rule.

A * v = [.2 * .5, .5, * .5, .7 * .5] = [.1, .25, .35]

Nothing to it.

Now we can finally consider your question. How does Diffuse_Color and Diffuse_Value and lighting all come together?

Assume the light color is L. For diffuse lighting, the angle between the surface normal and the direction to the source of the light determines a fraction that is used to decrease the light density arriving at any given location. This is a simple consequence of the geometry of light, or a garden hose, for that matter. Spray a hose vertically straight down at the ground, and a lot of water arrives in a small area. Spray horizontally away from you, and the water spray spreads out, which means any given spot is receiving less water than when shooting it straight down.

So let's just reduce the angular decreasing effective illumination to a simple number. Let's call it k.

The diffuse lighting equation is simple:

k * L * Diffuse_Color * Diffuse_Value

In this equation we are just multiplying two colors and two numbers. The numbers get promoted to an equivalent RGB color and then the whole thing is a simple 4-term multiplication.

For each component then, independently you can see that the outcome is

k * l * dc * dv

Set any of those to 0, and the whole thing is 0.

Set any of those to 1, and the whole thing is unaffected by that individual value.

The color WHITE is [1, 1, 1], so multiplying with WHITE makes no change.

The color BLACK is [0, 0, 0], so multiplying with BLACK always results in BLACK.

So the effective illumination where the Diffuse_Color is WHITE, and the Diffuse_Value is 1, and the angle of incidence is 90 degrees causes k to also be 1, you get:

k * L * dc * dv = 1 * L * 1 * 1 = L

In other words, if you set things up that way, then all the light from the light source bounces off the surface. That is impossible.

Decreasing any of the components (angle, DC, or DV) will result in some less-than-all fraction bouncing off instead.

Consider dv = .8, but still WHITE and 90 degrees.

k * L * dc * .8 = .8 * L

80% of the light bounces off.

But what if the Diffuse_Color is itself only 60% red, 50% green, and 40% blue?

k * L * [.6, .5, .4] * .8 = k * L * [.48, .40, .32]

So in that case at 90 degrees, 48% of the red reflects, 40% of the green reflects, and 32% of the blue reflects.

Any factor you apply to DC or DV alters the outcome. You can switch the factor between the two and it doesn't change anything. This is because multiplication is associative, i.e. it is always true that

(P * Q) * R = P * (Q * R)

Assume some initial state of the shader. Suppose you perform two test renders. In the first you decrease Diffuse_Color by half. In the second you decrease Diffuse_Value by half. Will they render any differently? The answer is no. What about instead of half, you use 80%? No difference.

As long as each component of DC * DV results in a number near 1, you will have trouble with IDL. If the product is less than .8 in each component, you will have no trouble with IDL.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Thu, 10 September 2009 at 2:09 PM

Forgot to mention how a color map impacts this.

The color map plugged into the DIffuse_Color just adds one more term to the multiplication.

Assuming C is the color at any given point on the map, the final output color is:

k * L * Diffuse_Color * Diffuse_Value * C


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


Whichway ( ) posted Thu, 10 September 2009 at 4:02 PM

BB - Do you think it likely that SP1 will be out by Sunday? I have a contest entry I'd prefer to use it on, but if SP1 is going to be later than that, I'll give up waiting. Thanks.

Whichway


bagginsbill ( ) posted Thu, 10 September 2009 at 4:17 PM

I don't have a clue. I only had one bug, and I fixed it weeks ago, so I haven't interacted with SM much lately. I'm pretty much a beta tester now, nothing more.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.