Author Topic: ShadowHelper problems  (Read 4578 times)

Offline Gatobot14

  • int
  • **
  • Posts: 64
    • View Profile
ShadowHelper problems
« 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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: ShadowHelper problems
« Reply #1 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"?

Offline Gatobot14

  • int
  • **
  • Posts: 64
    • View Profile
Re: ShadowHelper problems
« Reply #2 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: ShadowHelper problems
« Reply #3 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.

Offline Gatobot14

  • int
  • **
  • Posts: 64
    • View Profile
Re: ShadowHelper problems
« Reply #4 on: February 05, 2017, 02:57:37 am »
another issue(?) with shadowhelper, the shadow repeats at the bottom, the light its in the center

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: ShadowHelper problems
« Reply #5 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.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: ShadowHelper problems
« Reply #6 on: February 06, 2017, 09:22:37 pm »
I'd love to see a shader application of this. Has anyone ever made one?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: ShadowHelper problems
« Reply #7 on: February 07, 2017, 08:36:42 am »
Not for desktop jPCT as far as I know.

Offline Gatobot14

  • int
  • **
  • Posts: 64
    • View Profile
Re: ShadowHelper problems
« Reply #8 on: February 13, 2017, 05:39:56 pm »
Thankyou very much i understand now.