|
2 registered members (Quad, TipmyPip),
6,316
guests, and 3
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Darkness of stencil shadow
[Re: Aku_Aku]
#391406
01/11/12 19:13
01/11/12 19:13
|
Joined: Apr 2005
Posts: 4,506 Germany
fogman
Expert
|
Expert
Joined: Apr 2005
Posts: 4,506
Germany
|
mat_shadow.alpha = 10; // brighter mat_shadow.alpha = 90; // darker Default is 50.
no science involved
|
|
|
Re: Darkness of stencil shadow
[Re: Aku_Aku]
#391407
01/11/12 19:14
01/11/12 19:14
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
The transparency of stencil shadows can be set through mtl_shadow.alpha (default = 50), and their color can be set through mtl_shadow.diffuse_blue, mtl_shadow.diffuse_green, and mtl_shadow.diffuse_red (default = 0,0,0 = black). @fogman: 
Last edited by Uhrwerk; 01/11/12 19:15. Reason: Fogman was faster
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Darkness of stencil shadow
[Re: fogman]
#391408
01/11/12 19:20
01/11/12 19:20
|
Joined: Sep 2009
Posts: 1,033 Budapest
Aku_Aku
OP
Serious User
|
OP
Serious User
Joined: Sep 2009
Posts: 1,033
Budapest
|
mat_shadow.alpha = 10; // brighter mat_shadow.alpha = 90; // darker Default is 50. Thanks fogman, i'll try out that.
|
|
|
Re: Darkness of stencil shadow
[Re: fogman]
#391412
01/11/12 19:32
01/11/12 19:32
|
Joined: Sep 2009
Posts: 1,033 Budapest
Aku_Aku
OP
Serious User
|
OP
Serious User
Joined: Sep 2009
Posts: 1,033
Budapest
|
Hey fogman, it works well, thanks!  I have another problem. If i move the object that blocks the light between the lamp and an other object, the size of the shadow doesn't change. When the blocking object is closer to the lamp, the size of the area covered by the shadow should grow, but it remains the same. What is the reason? How could to resolve this problem, to get an shadow thats size varying depending on the distance between the lamp and the object?
|
|
|
Re: Darkness of stencil shadow
[Re: Aku_Aku]
#391434
01/12/12 01:04
01/12/12 01:04
|
Joined: Apr 2005
Posts: 4,506 Germany
fogman
Expert
|
Expert
Joined: Apr 2005
Posts: 4,506
Germany
|
Z-pass stencil shadows are faster than z-fail shadows, but don't allow to move the camera into a shadow volume. They are the best method for elevated 3rd person cameras, like in an isometric game. In first person mode the player's shadow is automatically switched off when z-pass stencil shadows are activated. Z-fail stencil shadows are a little slower than z-pass shadows, but more robust. They are independent of the camera position and allow LOD models to differ greatly from the original model, which would otherwise cause shadow faults with the z-pass algorithm. Z-fail shadow volumes are columns rather than cones, although the difference is only visible with close lights, and can lead to disconnected shadows of connected meshes in such a case . A script can be used for tracing a ray from a light source to the camera, and automatically switching to z-fail shadows when the ray hits an obstacle.
http://www.conitec.net/beta/shadow_stencil.htmTry "shadow_stencil = 1"
Last edited by fogman; 01/12/12 01:05.
no science involved
|
|
|
|