Point Light with Shadow Casting - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Point Light with Shadow Casting (/thread-19227.html) |
Point Light with Shadow Casting - Alex Ros - 11-15-2012 A question just for a check. Is there a possibility to rescript (or whatever is the right term) Point Light in a way it could cast dynamic shadows similar to Spot Light? I am not sure if it's possible. If this feature (dynamic shadows) is hard-coded in some of engine .dll's surely it would be nearly impossible to make anything or extremely hard because it would require reassembling. But at the same time there a shader file ...core\shaders\deferred_light_frag.glsl and maybe it's possible to make new strings for some kinda new type of light Point Shadow Light. Here's a copypast of some strings from deferred_light_frag.glsl shader file: Code: @ifdef LightType_Spot and here's another part which I presume is code of shadows themselves: Code: ///////////////////////////////// I am not a scripter and that's why I am asking for help or just an advice. I do have some knowledge of scripts, at least I can understand what is what and what for. But... anyway if anybody can help or advice something, thanks in advance! At the same time I am sure if such an "upgrade" of HPL2 Lights is possible and could be done by someone, than it would be very useful for everybody. I mean everybody could be thankful, not just me. RE: Point Light with Shadow Casting - MyRedNeptune - 11-15-2012 Well, technically, you can create a similar effect by combining 6 spotlights 90 degrees each into a cube shape. You will need to create a new gobo for it, though. RE: Point Light with Shadow Casting - Alex Ros - 11-15-2012 (11-15-2012, 11:27 AM)MyRedNeptune Wrote: Well, technically, you can create a similar effect by combining 6 spotlights 90 degrees each into a cube shape. You will need to create a new gobo for it, though.I tried that in the first place. And it doesn't work out well. There were glitches and flickering. And by the way for that Point Light with Shadows I don't need gobo. RE: Point Light with Shadow Casting - MyRedNeptune - 11-15-2012 (11-15-2012, 01:15 PM)Alex Ros Wrote:Hm, you're right. I just tested it more thoroughly and it does create strange glitches.(11-15-2012, 11:27 AM)MyRedNeptune Wrote: Well, technically, you can create a similar effect by combining 6 spotlights 90 degrees each into a cube shape. You will need to create a new gobo for it, though.I tried that in the first place. And it doesn't work out well. There were glitches and flickering. I'm quite interested in this topic as well so count me in. RE: Point Light with Shadow Casting - The chaser - 11-15-2012 If you wanted to make a Point Light that casts shadows you should modify the lighting code core. It's a good idea, but if FG did this this way, they will have a reason. RE: Point Light with Shadow Casting - Statyk - 11-15-2012 I was playing Penumbra: Requiem and some areas seemed to have pointlights that gave off shadows. I'm not sure if they removed it or they just did an amazing job placing spotlights... RE: Point Light with Shadow Casting - Hardarm - 11-15-2012 (11-15-2012, 05:21 PM)Statyk Wrote: I was playing Penumbra: Requiem and some areas seemed to have pointlights that gave off shadows. I'm not sure if they removed it or they just did an amazing job placing spotlights...It's quite easy to make such spotlights. make 4, all with 90-120 as FOV facing 4 different directions. It worked out well for me. Fov mustn't be too large or the shadows will become scretched RE: Point Light with Shadow Casting - Alex Ros - 11-15-2012 (11-15-2012, 05:21 PM)Statyk Wrote: I was playing Penumbra: Requiem and some areas seemed to have pointlights that gave off shadows. I'm not sure if they removed it or they just did an amazing job placing spotlights...Seems like you are absolutely right. HPL1 Point Lights did have an ability to cast shadows... http://wiki.frictionalgames.com/hpl1/documentation/content.creation.document.chap3 Look for 3.3 Lights chapter and then for 3.3.2 Point Lights... Thanks for aiming! |