Monkey Frog Studio Posted November 27 Posted November 27 I've run into an issue where the box light shows up in the 3D viewport, but doesn't in a test game. This often occurs after the box light has been placed and then, later, moved or rotated. So, if I create a box light and position initially, then run a test game, it shows up fine. But if I then move or rotate the box light, it fails to work in test game even though it continues to show correctly in the 3D viewport (see screen shot). 1 Quote Creating professional 2D and 3D content is my passion! Monkey Frog Studio
Monkey Frog Studio Posted November 27 Author Posted November 27 This appears to be happening when you tick Cast Shadows to False. Works fine if Cast Shadows is active. 1 1 Quote Creating professional 2D and 3D content is my passion! Monkey Frog Studio
Josh Posted December 2 Posted December 2 I can produce this error with this scene. You are right, it only happens when shadows are disabled... boxlighterror.zip 1 Quote Let's build cool stuff and have fun.
Monkey Frog Studio Posted December 2 Author Posted December 2 Glad this was helpful. 1 Quote Creating professional 2D and 3D content is my passion! Monkey Frog Studio
Josh Posted Monday at 09:49 PM Posted Monday at 09:49 PM This also happens if you just open the map in the editor. The cause is around line 145 of Shaders/PBR/Lighting.glsl: if (shadowCoord.x < 0.0f || shadowCoord.y < 0.0f || shadowCoord.x > 1.0f || shadowCoord.y > 1.0f || shadowCoord.z < shadowrange.x || shadowCoord.z > shadowrange.y) return lighttype; Ah, okay, it is due to the lack of any shadow range value I think... || shadowCoord.z < shadowrange.x || shadowCoord.z > shadowrange.y Something like that...I will continue to look for the exact cause... 1 1 Quote Let's build cool stuff and have fun.
Solution Josh Posted Monday at 10:18 PM Solution Posted Monday at 10:18 PM Fixed in next build. 1 Quote Let's build cool stuff and have fun.
Monkey Frog Studio Posted Monday at 10:40 PM Author Posted Monday at 10:40 PM Seems there's another issue, possibly related. I created a lightbox, unticked Cast Shadows (so it's False). That one works fine. Can move it, rotate it, etc., and it updates in the viewport. However, if I use the move tool and drag out a copy (holding SHIFT) the new one does not cast any light at all. If I then go to the Scene panel and tick Cast Shadow on then off again, it works. I have to do this for each duplicate I create. This does not happen when creating a new lightbox since they come in automatically with Cast Shadows ticked. To emphasize - if a shadowbox has Cast Shadow unticked (False) and you duplicate it, it will not show any light. You have to tick then untick Cast Shadow if you want the lightbox to create a light but not cast a shadow. Quote Creating professional 2D and 3D content is my passion! Monkey Frog Studio
Josh Posted Monday at 10:42 PM Posted Monday at 10:42 PM I am pretty sure that won't happen in the next build that goes up. 1 Quote Let's build cool stuff and have fun.
Monkey Frog Studio Posted Tuesday at 01:48 AM Author Posted Tuesday at 01:48 AM I can confirm that it all seems to be working correctly now. Thanks for the update! 1 Quote Creating professional 2D and 3D content is my passion! Monkey Frog Studio
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.