![]() |
Показать все 8 сообщений этой темы на одной странице |
HLFX.Ru Forum (https://hlfx.ru/forum/index.php)
- Half-Life SDK (https://hlfx.ru/forum/forumdisplay.php?forumid=8)
-- Questions about Shadows (https://hlfx.ru/forum/showthread.php?threadid=2629)
Questions about Shadows
Hello everyone, I'm a italian developer of a horror mod called The Whisper, some of you might have seen me in the Arrangement community. I found your forum long time ago and I learned from your tutorials and useful advices. Now I want to ask something that bothers me a lot. I am in need of help with shadows.
From what I learned, there are 2 type of shadow. Stencil Shadows and Shadowmaps. Those 2 techniques are different, the first creates Hard shadows while the second creates the nice looking Soft shadows.
I tried many of them, the Stencil Shadows from Raven City, but I couldnt implement them into my mod because I was using Paranoia's renderer. Then I used Buzzer's Stencil Shadows from Paranoia 1.3, and I'm stuck with them for now.
I recently played HLFX 0.5b, and I saw the shadow maps demo. That was fantastic, the most realistic shadows I ever saw for HL and I thought that would be very useful into my mod.
Now I have a questoin. Is that kind of shadow from HLFX 0.5 open-source? And if it isnt and the author wont share it with me, can anyone tell me at least how it is done, what should I learn to create those awesome shadows?
Thank you in advance. Btw here's my mod, tell me if you like it http://www.moddb.com/mods/the-whisper
HLFX never was an open source project.
As for shadow maps, they were the simplest ones. You just needed to create a shadow entity (env_shadowlight), assign a field of view, then on client you render the world into depth texture from light's position (this is easy especially if you are familiar with Paranoia's renderer that is custom). After you got a depth texture, you may use it to render a shadowed part of world, using a special depth texture comparison (google for ARB_shadow OpenGL extension). And of course you may use fragment program to antialias shadows and make them smoother.
There is a lot of demos in the Internet.
Your mod's screenshots look very nice. Are you sure you want to use these buggy shadows along with legacy engine?
__________________
Your mod is just awesome, i mean you kill every single HL1 mod with level design skills and graphics effects. After i've seen your modification (two weeks ago) i actually lost my motivation to do my horror mod which is unofficial continuation of They Hunger
Well you should think about rendering framebuffer object from light point of view, then create sth like fragment program which will actually send depth of the current fragment to the frame buffer and apply two or three passes so we can have them softy. In the fragment program read the shadow map, if current fragment have depth lower than set value do not drop shadow on the surface, if not compute the variance from lightmap and it's opposite and scale light intensity .
HLFX shadows are buggy sometimes, i mean if monster is near wall the shadow is beign rendered behind wall too, that's what i noticed few times.
If someone will get it with shadow maps then it will be pure awesomness of awesomness * awesomness / awesomness sqrt(awesomness) * 666.
Well i know that this technique has been used in HLFX already but HLFX is closed source and if someone will get this thing to work maybe he will share teh codez ?
Cheers.
__________________
настоящий мужчина не нуждается в подписи.
__________________
Well idk, it was long time ago
__________________
настоящий мужчина не нуждается в подписи.
__________________
Временная зона GMT. Текущее время 07:46. | Показать все 8 сообщений этой темы на одной странице |
На основе vBulletin версии 2.3.0
Авторское право © Jelsoft Enterprises Limited 2000 - 2002.
Дизайн и программирование: Crystice Softworks © 2005 - 2024