www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Gatobot14 on January 29, 2017, 04:52:58 am

Title: ShadowHelper problems
Post by: Gatobot14 on January 29, 2017, 04:52:58 am
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
Title: Re: ShadowHelper problems
Post by: EgonOlsen on January 29, 2017, 02:53:08 pm
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"?
Title: Re: ShadowHelper problems
Post by: Gatobot14 on January 30, 2017, 09:12:12 pm
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.
Title: Re: ShadowHelper problems
Post by: EgonOlsen on February 01, 2017, 10:58:13 pm
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.
Title: Re: ShadowHelper problems
Post by: Gatobot14 on February 05, 2017, 02:57:37 am
another issue(?) with shadowhelper, the shadow repeats at the bottom, the light its in the center
Title: Re: ShadowHelper problems
Post by: EgonOlsen on February 05, 2017, 08:18:08 pm
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.
Title: Re: ShadowHelper problems
Post by: AGP on February 06, 2017, 09:22:37 pm
I'd love to see a shader application of this. Has anyone ever made one?
Title: Re: ShadowHelper problems
Post by: EgonOlsen on February 07, 2017, 08:36:42 am
Not for desktop jPCT as far as I know.
Title: Re: ShadowHelper problems
Post by: Gatobot14 on February 13, 2017, 05:39:56 pm
Thankyou very much i understand now.