PDA

View Full Version : Bug? Lighting Shadow Color



fxnut
09-02-2003, 03:08 PM
I just wanted to flag this up to other users (and Newtek), to confirm whether this is actually a bug, or a desirable feature. In my view it's a bug, but see what you think.

In case you're interested, the whole thing was brought up by Lasco in this thread:
Why does the light go through the wall? (http://vbulletin.newtek.com/showthread.php?s=&threadid=10402)

Basically the problem is that when a spotlight has a shadow color that isn't black, the shadow color only gets applied where the spotlight cone 'exists'. If you're not sure what I mean by this, have a look at the image below.

The question is; is this a bug?

Regards

Andy

fxnut
09-02-2003, 03:11 PM
Here's a zip file containing the above scene should you want to have a play to see for yourself.

trick
09-02-2003, 05:01 PM
Basically when you remove the plate with the square hole, you have a white light spot. Putting the plate in front of it, results in a shadow with the shadow color you specified...in your case red: so that is def.no bug !!

Try this: make the light cone bigger then the shadow cone !!

fxnut
09-02-2003, 05:39 PM
Hey Trick, I'm not so sure it's as clear cut as you seem to think.

According to the Lightwave 7.5 Update documentation on shadow colors...

Using [shadow] colors lets you tint shadows without having to adjust ambient lighting
...suggesting that the shadow color should be applied everywhere that the light doesn't shine, and where the ambient light does.

To look at it another way, in the real world a spotlight is only a spotlight because there's something in the way to make it cast the conical beam, i.e. the light's physical housing. This housing is making the light cast a shadow (otherwise it'd just be like a point light). So the shadow color should be cast everywhere that the light beam doesn't shine including outside the cone, since this is just an extension of the shadow.

Having said all that... I just tried it in 3D Studio Max and it has the same (IMHO dubious!) behaviour!

Can anyone give a good reason why this behaviour is desirable? Or even why having the shadow color appear everywhere (in a similar way to ambient light) is undesirable? Has anyone used shadow color effectively in a scene where other methods wouldn't have worked?

Regards

Andy

mrunion
09-02-2003, 06:04 PM
Being a non-professional in the graphics business, I can only assume it is this way because you can make spot lights "shadow only", thus casting "only" the shadow color you want. If the spotlight with the colored shadow were to affect everything not lit by it, I think we'd have a great many more problems!

fxnut
09-03-2003, 02:58 AM
Originally posted by mrunion
...because you can make spot lights "shadow only", thus casting "only" the shadow color you want.
Although that's no different to just turning off shadow casting is it?


If the spotlight with the colored shadow were to affect everything not lit by it, I think we'd have a great many more problems!
IMHO I think that the spotlight shadow color should behave in a similar way to point lights. They light objects with the shadow color based on it's direction to the object. I just see a spotlight being a special case of point light, that has a gobo in front of it to produce a conical beam.

Oh well, I've always seen shadow color as being a bit of a hack anyway.:D

Regards

Andy

lasco
09-03-2003, 09:07 AM
Nice to see you again here fxnuts :)

Well you should have launch a poll about it hehe…

acutally I'm not surprised you find the same thing
in 3DS.
What is sure is that there's no bug here, only perhaps an undesirable effect…

I believe that developpers might just not have think about this trouble,
maybe because it only happens with spot lights…
For logical reasons (and also maybe optimization ones) the
parts of the scenes that are not included in the cone of the spot
are not even considered by it…

In practise I guess getting one or the other result can be good or not
according to the scene you have…

Eventually we SHOULD have an option for this in the Light properties panel :
extend and mix or not the color of the shadow to all the scene ?

OK I'm gonna post some request in the dedicated forum about it,
and will link to this thread ;)

hunter
09-03-2003, 10:33 AM
Would someone explain to me how to make a spot light "shadow only" Please? I always thout that to have a shadow It had to affect diffuse, right.
THanks

fxnut
09-03-2003, 11:19 AM
Originally posted by hunter
Would someone explain to me how to make a spot light "shadow only" Please? I always thout that to have a shadow It had to affect diffuse, right.

Well logically you're right - you can't have shadow without light. A shadow afterall is just an absence of light.

Now in LW Layout, shadow color only affects stuff if you have some value of intensity set for the light. BUT, if you set the light color to black and set the shadow color to say red for example, then the spotlight will cast the red in the areas where shadow should be present, and it won't effect the areas that should be lit. (See the attached picture below).

This is why I'm not a fan of shadow color - it's too unreal a parameter for my liking (that's the physicist in me talking ;) ). I guess it's convenient for those complex lighting setups where it gives you that extra edge in tweakability, but IMHO it's a nasty hack and should be avoided unless really necessary.

Regards

Andy

lasco
09-03-2003, 11:40 AM
This is why I'm not a fan of shadow color - it's too unreal a parameter for my liking (that's the physicist in me talking ;) ).



wow !!! :eek:
fortunately NT's team don't think only as physicists !!

Man, except from that bad thing we have with spoth lights
it's a chance we have these colored shadows that work very well,
for example with distant lights in exterior scenes…

It may be an unreal parameter in theory but in real life
really black shadows almost does'nt exist…

Colored shadow are THE very first and quickest way to start
faking radiosity without spending hours for rendering…

render just one any exterior scene without radiosity and
with only black shadows and you'll see the difference;)

hunter
09-03-2003, 11:54 AM
Thanks for the reply. That explains it.:) Actually shadow color was a request I put in the feature requests after seeing monsters inc. In outdoor scenes I usally set the color to be slightly blue and it works pretty well if not acurate. Many of the crits people give in these forums comes from what hollywood has made us believe how something should look and not in fact how it should look IMHO.

fxnut
09-03-2003, 12:22 PM
Hmm, I guess I could see how that would be useful. But personally I'd find it more intuitive to use two lights at the same position and rotation: one that casts shadows (the main light) and one that doesn't (i.e. the shadow color). It's effectively the same thing except you have more control (as the shadow color isn't influenced by the other light's intensity), and the color of the shadow is factored into the illumination of the other light - but it just means you have to compensate slightly.

It also means that you don't end up with wierd difficult to find lighting issues like Lasco had in the thread that started all this.

I just find this easier to get my head round. If I even attempt to think about the consequences of being able to set the color of a shadow, my brain just goes into "can't compute... can't compute... overload... overload..." :D

Regards

Andy

lasco
09-03-2003, 01:37 PM
we definitely don't have the same brain fxnut.

I could'nt use your tip even once, besides I'd be curious
to know if you did yourself, because :

1/ the 2d light you're talking about (the one which does'nt cas shadows)
not only affects the shadows of the first one but also the lighted areas !!
which means that for these areas you have always 2 lights to set correctly
instead of only one. You increase the intensity of the 2d to get correct shadows
and oops ! you have to decrease the intensity of the 1st one as the general
lightning is too strong…

2/ what will you do in such a case :
You have a ground and 2 cubes quite near one of the other.
eer… well no too difficult to explain huh,
and to be honnest I'm not sure enough of what I was to say to you :D

OK let me few minutes and I'll probably post you some guessing…
(you say "guessing" in this case ? what's the correct way to say it ?)

lasco
09-03-2003, 01:50 PM
…OK forget it I mistaked (shameonme:rolleyes: )

your tip may work but iit stays that
your 2d light influes on all the scene and not
only shadows, which may be even more difficult
to control if precisely you color a bit this light instead
of letting it white…

fxnut
09-03-2003, 02:08 PM
Hey Lasco :)
The first point point you raised, is exactly what I mentioned in my last post (although probably not clearly enough): the bit where I said "the color of the shadow is factored into the illumination of the other light ", and it is a problem. However, I think it's perfectly valid for the 2d light (as you called it) to affect the main light, as it's kinda like setting the underlying color temperature of the scene, for want of a better way of explaining it.

It would be possible (although probably not worth the effort), to create some sliders and expressions so that the two could be manipulated independantly of each other. But in my eyes, this just goes back to the old problem of having to conceptually set a shadow color!

Having said all that, it is at least a work around for the problem you stated in the original thread. Simply use a point light with shadow casting off, in conjunction with a spotlight with shadow casting on.

Regards

Andy