HLFX.Ru Forum
профиль •  правила •  регистрация •  календарь •  народ •  FAQ •  поиск •  новое •  сутки •  главная •  выход  
HLFX.Ru Forum HLFX.Ru Forum > Теория и практика > Half-Life SDK > Questions about Shadows
  Предыдущая тема   Следующая тема
Автор
Тема Новая тема    Ответить
RavenPest
Новичок

Дата регистрации: Feb 2011
Проживает: (void)
Сообщений: 5

Рейтинг



Question 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

Сообщить модератору | IP: Записан
Сообщение: 72359

Старое сообщение 20-02-2011 00:46
- За что?
 XaeroX
Crystice Softworks

Дата регистрации: Oct 2005
Проживает: Торонто
Сообщений: 35071
Нанёс повреждений: 514 ед.
Возраст: 39

Рейтинг



Награды
 
[1 награда]


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?

__________________

Сообщить модератору | IP: Записан
Сообщение: 72362

Старое сообщение 20-02-2011 02:34
-
RavenPest
Новичок

Дата регистрации: Feb 2011
Проживает: (void)
Сообщений: 5

Рейтинг



Цитата:
XaeroX писал:
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?


Oh, I'm sorry I didnt know that it wasnt open-source.

Thank you for your info, I really hope to get them into the game, I'll need to start from the very beginning but with some effort, maybe I can make it.

Цитата:
XaeroX писал:

Your mod's screenshots look very nice. Are you sure you want to use these buggy shadows along with legacy engine?


Oh thanks! Well I hope I can stay with Paranoia's renderer, my problem is that Buzer's shadows have fixed direction, they're not affected by light sources. And dont even cast on models. Thats why I wanted to use your shadows, they look nice and the whole world is affected by them not only models.

BUT! If you have a better solution \ suggestion I'm open to listen carefully to your words, since I dont know basically anything about graphics programming.

Сообщить модератору | IP: Записан
Сообщение: 72367

Старое сообщение 20-02-2011 03:23
- За что?
supra36
Мышление должно быть творческим

Дата регистрации: Aug 2010
Проживает: Польша, Быдгощ
Сообщений: 118
Возраст: 29

Рейтинг



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.

__________________
настоящий мужчина не нуждается в подписи.

Отредактировано supra36 20-02-2011 в 08:58

Сообщить модератору | IP: Записан
Сообщение: 72372

Старое сообщение 20-02-2011 08:49
- За что?
 XaeroX
Crystice Softworks

Дата регистрации: Oct 2005
Проживает: Торонто
Сообщений: 35071
Нанёс повреждений: 514 ед.
Возраст: 39

Рейтинг



Награды
 
[1 награда]


Цитата:
supra36 писал:
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.

It refers to HLFX 0.6 shadows, not 0.5 ones, doesn't it?

__________________

Сообщить модератору | IP: Записан
Сообщение: 72376

Старое сообщение 20-02-2011 09:49
-
supra36
Мышление должно быть творческим

Дата регистрации: Aug 2010
Проживает: Польша, Быдгощ
Сообщений: 118
Возраст: 29

Рейтинг



Well idk, it was long time ago

__________________
настоящий мужчина не нуждается в подписи.

Сообщить модератору | IP: Записан
Сообщение: 72379

Старое сообщение 20-02-2011 10:07
- За что?
RavenPest
Новичок

Дата регистрации: Feb 2011
Проживает: (void)
Сообщений: 5

Рейтинг



Цитата:
supra36 писал:
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 this is something I really dont want. Dont lose your motivation. I'm mapping for Goldsource since 1998 when I was like 11, so its natural that I've improved over the years. Practice makes perfect just believe in what you're doing.

Цитата:
supra36 писал:
[B]
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.


If I succeed I'm willing to share the code with the whole community, but keeping it my mod's exclusive for some time after its release, lets say 3-6 months.
I'd also like to work on this with someone else more expert than me that can actually teach me some parts that I dont understand.

Цитата:
XaeroX писал:
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).


Ok let me know if I got this correctly.

The env_shadowlight must have a field of view. Is it the same field of view a monster has? And about the world rendered from lights position, you suggest I should look into Paranoia's renderer. I'm thinking about cubemaps that are rendered where there's a light source. Is that a correct starting point?

Сообщить модератору | IP: Записан
Сообщение: 72402

Старое сообщение 20-02-2011 14:13
- За что?
 XaeroX
Crystice Softworks

Дата регистрации: Oct 2005
Проживает: Торонто
Сообщений: 35071
Нанёс повреждений: 514 ед.
Возраст: 39

Рейтинг



Награды
 
[1 награда]


Цитата:
RavenPest писал:
I'm thinking about cubemaps that are rendered where there's a light source. Is that a correct starting point?

Almost. Cubemaps cover all possible directions, but you are limited with 2D texture using shadowmaps (uh, in its normal implementation; you may use shadowcubemaps with shaders, but I never did) therefore you declare a field of "view" of the lightsource - and of course a direction of view.

__________________

Сообщить модератору | IP: Записан
Сообщение: 72407

Старое сообщение 20-02-2011 14:42
-
Тема: (Опционально)
Ваш ответ:



Переводчик транслита


[проверить длину сообщения]
Опции: Автоматическое формирование ссылок: автоматически добавлять [url] и [/url] вокруг интернет адресов.
Уведомление по E-Mail: отправить вам уведомление, если кто-то ответил в тему (только для зарегистрированных пользователей).
Отключить смайлики в сообщении: не преобразовывать текстовые смайлики в картинки.
Показать подпись: добавить вашу подпись в конец сообщения (только зарегистрированные пользователи могут иметь подписи).

Временная зона GMT. Текущее время 17:55. Новая тема    Ответить
  Предыдущая тема   Следующая тема
HLFX.Ru Forum HLFX.Ru Forum > Теория и практика > Half-Life SDK > Questions about Shadows
Версия для печати | Отправить тему по E-Mail | Подписаться на эту тему

Быстрый переход:
Оцените эту тему:

Правила Форума:
Вы not можете создавать новые темы
Вы not можете отвечать в темы
Вы not можете прикреплять вложения
Вы not можете редактировать ваши сообщения
HTML Код ВЫКЛ
vB Код ВКЛ
Смайлики ВКЛ
[IMG] Код ВКЛ
 

< Обратная связь - HLFX.ru >

На основе vBulletin
Авторское право © 2000 - 2002, Jelsoft Enterprises Limited.
Дизайн и программирование: Crystice Softworks © 2005 - 2024