RedcrowProd
Member
|
Stronger Shadow Only ?
Hey, just wondering, when running multiple light source, a problem that i ran into, was that ALL light draw shadows, and doesnt take in count which one is the stronger ( and then it should erase shadow from previous light that are weaker )
exemple : you have a sun, producing shadow on your character, but then there's a lamp next to you in that shadow area, that will produce a second and very distinct shadow.
is that an engine limitation or is there something that can be done that is fairly straight forward ?
thanks
|
|
07-21-2017 12:56 AM |
|
Esenthel
Administrator
|
RE: Stronger Shadow Only ?
Hi,
You can control which lights cast shadows in the Light*.add(Bool shadow) methods
To get higher range for light Render Target (0..HALF_MAX) instead of (0..1) you have to use D.highPrecLumRT(true)
Does that solve the problem?
|
|
07-21-2017 04:17 AM |
|
RedcrowProd
Member
|
RE: Stronger Shadow Only ?
i want to run all light with shadow, to avoid light going thru objects,
i already had D.highPrecLumRT(true) set
here is an image that might show a little better what i mean by that,
https://www.hostingpics.net/viewer.php?i...shadow.jpg
as you can see, there's the sun shadow of the 2 characters, and then the character light that cast a shadow, but this shadow should be totaly hidden by the sun light.
this happens as well even with smaller light, so its not a sun light issue, but more a global shadow issue
thanks
(This post was last modified: 07-22-2017 01:35 AM by RedcrowProd.)
|
|
07-22-2017 01:33 AM |
|
Esenthel
Administrator
|
RE: Stronger Shadow Only ?
Quote:as you can see, there's the sun shadow of the 2 characters, and then the character light that cast a shadow, but this shadow should be totaly hidden by the sun light.
I don't understand this.
Light #1 does not affect the shadow of Light #2 in any way.
Lights are separate, and they are accumulated to total light intensity.
light_total=light0_intensity + light1_intensity + ..
light0_intensity is affected by light0_shadow
and
light1_intensity is affected by light1_shadow
|
|
07-22-2017 04:43 AM |
|
RedcrowProd
Member
|
RE: Stronger Shadow Only ?
yes but each shadow should be affected by all the light. no ?
the shadow made by the small light should not be, as the sun light would get ride of all shadow. instead you can see in the screen, that the 2 stronger shadows of characters are made by the sun, and then the weaker shadow made by the small light, should be totaly transparent ( or not there ) because of the sun, that would totaly brighten that area.
Shadow is created by absence of light, and in that case, it is brightly enlighten by the sun
at the contrary as on my screen, because shadows are created from any light hitting a surface
(This post was last modified: 07-22-2017 06:05 AM by RedcrowProd.)
|
|
07-22-2017 05:48 AM |
|
Zervox
Member
|
RE: Stronger Shadow Only ?
multiple lights does not obliterate each other though.
as you can also see the contrast difference between the further away light and the one closer, the light which is closer(left casts a harder contrast compared right)
this of course depends on how accurate a calculation of the total light is, if you consider diffusion, each lights' intensities, distance and wavelengths of the light emitted.
(This post was last modified: 07-22-2017 07:05 AM by Zervox.)
|
|
07-22-2017 07:02 AM |
|
RedcrowProd
Member
|
RE: Stronger Shadow Only ?
i guess you are right, it would really depends on the power of the light itself, it still looks really weird to me tho, looking at my screenshot i cant help but think something is not right ? i feel like the power of influancing shadow with other light is not strong enough ?
(This post was last modified: 07-22-2017 07:36 AM by RedcrowProd.)
|
|
07-22-2017 07:24 AM |
|
Zervox
Member
|
RE: Stronger Shadow Only ?
(07-22-2017 07:24 AM)RedcrowProd Wrote: i guess you are right, it would really depends on the power of the light itself, it still looks really weird to me tho, looking at my screenshot i cant help but think something is not right ? i feel like the power of influancing shadow with other light is not strong enough ?
I am not 100% sure about shadow rendering and how it is done in EE or other engines for that matter, so I am not sure if it is just finding the correct values to feed the approximation formula used or there being a more suitable approximation formula to use.
Edit: if I understand Greg correctly, all shadows are created separately then added/blended together.
I've never looked really deep into shadow map calculations.
(This post was last modified: 07-22-2017 08:42 AM by Zervox.)
|
|
07-22-2017 08:39 AM |
|
Esenthel
Administrator
|
RE: Stronger Shadow Only ?
You can also take a look at D.eyeAdaptation
|
|
07-23-2017 12:49 AM |
|