ShadowHelper problems

Started by Gatobot14, January 29, 2017, 04:52:58 AM

Previous topic - Next topic

Gatobot14

I run the advance example and works fine, but when a bring closer the light to plane and the model,
the shadow disappear like it gets cut, then when the model get far away from the light, shadows appear again.

its there a way to display shadow close to the light? its an issue with my super intel card and cant be fixed???

hope you could help thanks

EgonOlsen

Might be caused by clipping. After all, the shadow map calculation is just a simple render of the scene when viewed from the light source that casts the shadows. The same rules that apply to "normal" camera view apply here as well. How close is "closer"?

Gatobot14

im trying to make a lamp, so the player can pass near the ligth,in the advance example i put the light source a few units above the ground.

EgonOlsen

Might be a clipping or accuracy issue then. I don't see much that you can do except for not doing it in the first place. Can't you just move the projector away some units? It doesn't have to be exactly where the light source is.

Gatobot14

another issue(?) with shadowhelper, the shadow repeats at the bottom, the light its in the center

EgonOlsen

I'm not sure if that's the problem here, but the shadows will repeat on the other side of the light source. That's how shadow mapping basically works. You can get rid of it by using shaders instead of the ShadowHelper, but the ShadowHelper for dektop jPCT itself can't handle this case.

AGP

I'd love to see a shader application of this. Has anyone ever made one?

EgonOlsen

Not for desktop jPCT as far as I know.

Gatobot14

Thankyou very much i understand now.