Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Luis Dias on March 14, 2011, 11:06:23 am

Title: Stencil Shadows
Post by: Luis Dias on March 14, 2011, 11:06:23 am
Recurring theme, but still, I wonder what are the current drawbacks to the implementation of basic stencil shadowing techniques?

Even a simple self-shadowing effect only affecting capital ships would massively improve Freespace graphics, and *then* we could say that the graphics were up to date. With no shadows, however, the game is getting dated and dated, albeit the impressiveness of the new colossus, sathanas, typhoon...

So I ask ye, what is holding back the development of this feature, and whether if it will ever be possible to overcome it?
Title: Re: Stencil Shadows
Post by: pecenipicek on March 14, 2011, 11:14:05 am
So I ask ye, what is holding back the development of this feature,
Time.
Quote
and whether if it will ever be possible to overcome it?
In due time.




Spoiler:
i am not a coder, nor do i work on this at all, so this is just my opinion
Title: Re: Stencil Shadows
Post by: The E on March 14, 2011, 01:49:54 pm
What is holding it back? Coder time and ability, mostly. We have, at this time, no dedicated graphics coder.

However, I have been reading articles on the web about it (this one, especially (http://http.developer.nvidia.com/GPUGems3/gpugems3_ch11.html)) and once I understand that, and find a way to integrate it into FSO's rendering architecture, it will be done.

BTW, stencil shadowing? Why use that? Shadow volumes are a much better approach for FSO IMHO.
Title: Re: Stencil Shadows
Post by: Luis Dias on March 14, 2011, 03:46:38 pm
What is holding it back? Coder time and ability, mostly. We have, at this time, no dedicated graphics coder.

Aw. I wished I could help, but I am an illiterate at code. I do understand geometry *very* well, but without the grammar, I feel an imbecile.

Quote
However, I have been reading articles on the web about it (this one, especially (http://http.developer.nvidia.com/GPUGems3/gpugems3_ch11.html)) and once I understand that, and find a way to integrate it into FSO's rendering architecture, it will be done.

BTW, stencil shadowing? Why use that? Shadow volumes are a much better approach for FSO IMHO.

I thought that stencil shadowing used shadow volumes' technique, but I might have confused the terminology. I appreciate your effort, btw. Now that we are entering full speed in the second decade of the century, I think that computers are beggining to be able to take the performance hit of these things, even if they aren't properly streamlined...

Title: Re: Stencil Shadows
Post by: Luis Dias on March 14, 2011, 04:02:37 pm
Btw, thanks for the link, it was a good read (I like to read these articles, while skimming the code parts). I can confirm that I was confused about the terminology, for I had in mind precisely the whole shenanigans about Z-pass and Z-fail in my head.
Title: Re: Stencil Shadows
Post by: The E on March 14, 2011, 04:05:37 pm
I am sorry, you are right. Stencil shadowing is a different term for the shadow volume technique.

Now, I would like to ask one thing of you. Do not bring this up again*. We've answered your questions regarding shadows back when you brought it up earlier, and nothing has changed since then. If it had, you'd have noticed it. If there's one thing I have an aversion to, it's answering the same questions over and over again, especially if it's the same person asking the questions.
It's a bit like kids in the backseat asking "Are we there yet?" over and over again.


*unless you can provide code that does do all the shadow magic, of course.
Title: Re: Stencil Shadows
Post by: Luis Dias on March 14, 2011, 04:23:37 pm
Sorry, I don't want to spam you. I'll shut up about this. I tried to find the relevant thread, but my searching abilities failed me.
Title: Re: Stencil Shadows
Post by: Dragon on March 14, 2011, 04:30:26 pm
No problem, "necroing" old threads isn't prefered here.
Title: Re: Stencil Shadows
Post by: Bobboau on March 16, 2011, 06:21:11 am
*unless you can provide code that does do all the shadow magic, of course.

I believe I posted code that does this ages ago, not that it was really usable, but it could serve as a guide.
Title: Re: Stencil Shadows
Post by: The E on March 16, 2011, 06:38:34 am
I see you posted builds, but I can't seem to find any code.

Ah, never mind, found it
Title: Re: Stencil Shadows
Post by: Nuke on March 16, 2011, 09:49:16 am
*unless you can provide code that does do all the shadow magic, of course.

I believe I posted code that does this ages ago, not that it was really usable, but it could serve as a guide.

wasnt that a d3d implementation though?
Title: Re: Stencil Shadows
Post by: Bobboau on March 17, 2011, 12:40:44 am
yes, but most of the important stuff was not D3D specific, and the parts that were would be trivial to convert to OGL. not that any of it is directly usable, even at the time I knew it was a hack proof of concept implementation.