Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Lights and Shadows blinking in an out - Lights not working in shadow

Author
Message
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 27th Jul 2019 23:34
In the video you can see the light circle around the player. As the player moves into the shadow the shadows begin to flicker on and off. Also, the light is no longer being drawn. Each torch has a light. You can see it works for some, but the ones in the shadow seem to have a problem. Its like the shadow is overwriting the light calculation. I am not using any custom shaders.

Any tips on the shadow flickering? And why the shadows are preventing the lights from being drawn?



Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 28th Jul 2019 00:07
If I break up my walls/floors into multiple pieces the lighting works properly. My walls were 1 large piece, and the floor was one large piece.


I am not sure what that is? Is there a vertex limit?

It doesn't help with the shadow flickering in and out, though.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 28th Jul 2019 03:12
Definitely some sort of confusion with the lights and shadows
Could it be that your trying to cast shadows on the same objects that create them

Breaking up the objects might be the only solution
by the way this project looks like its coming along nicely
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 29th Jul 2019 12:37 Edited at: 29th Jul 2019 12:38
Objects can shadow themselves.

I got these issues, in my case it was the clipping......AGK will clip vertices behind the camera which means a wall, for example, casting a shadow can suddenly vanish, so then so does the shadow.

Try turning of fulstrum culling for the object.

EDIT: though I should say, that didnt fix it for me either. I think it's to do with how far behind the camera the rendering occurs.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 30th Jul 2019 01:21
Ah, now that makes sense. Because it always seems like its the shadows from objects that are either just out of camera range or close to it.
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 3rd Aug 2019 21:19
So.. was there a solution for this?
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 6th Aug 2019 02:53
For the lighting I had to break up the objects. Not sure why that needed to be done.

For the shadows I had to turn off the walls casting the shadow. Again, not sure why, but that seemed to be the culprit for some reason.

Login to post a reply

Server time is: 2024-04-25 18:36:10
Your offset time is: 2024-04-25 18:36:10