Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
Old 09-Apr-2003, 21:06   #1
cybamerc
Senior Member
 
Join Date: Feb 2002
Posts: 1,252
Default Interesting Soft Shadows Demo

I just stumbled upen this demo which shows how to get soft shadows with stencil volumes like seen in SH3 and Axel Impact (:P). It's a rather interesting technique which gives a much more pleasing result than than regular hard edged volumes. Only problem in this case is significant ghosting. I wonder if there is any way to deal with that? Fafalada?

http://tfpsly.planet-d.net/english/3d/SoftShadows.html
cybamerc is offline   Reply With Quote
Old 10-Apr-2003, 02:29   #2
marconelly!
Senior Member
 
Join Date: Aug 2002
Posts: 2,742
Default

Quote:
Only problem in this case is significant ghosting. I wonder if there is any way to deal with that? Fafalada?
I have noticed that in some of the SH3 videos, but only in *some* scenes. I have no idea when it appears and when it doesn't. Definitely looks much better and more natural than hard edged shadows, though, even with occasional ghosting.

*Edit* Now that I've seen what is going on in this demo, I'm almost 100% sure it's not the same thing that is used in SH3. This is not the kind of 'ghosting' I had in mind.
marconelly! is offline   Reply With Quote
Old 10-Apr-2003, 06:20   #3
V3
Senior Member
 
Join Date: Feb 2002
Posts: 3,266
Default

I think the best hack for soft shadow volumes is using a cluster of 12 lights like NV had shown. Though not so good for performance, but the hardware will only get faster.
V3 is offline   Reply With Quote
Old 10-Apr-2003, 07:04   #4
marconelly!
Senior Member
 
Join Date: Aug 2002
Posts: 2,742
Default

Quote:
I think the best hack for soft shadow volumes is using a cluster of 12 lights like NV had shown.
Even then, you get only 12 shades of softness, no? That wouldn't be so great if the shadow has to project far away. The best method might be the shadow buffers, like the renderman is doing for offline render. Obviously, for such shadows to look really good no matter the circumstances, hardware again has to get better.
marconelly! is offline   Reply With Quote
Old 10-Apr-2003, 07:40   #5
V3
Senior Member
 
Join Date: Feb 2002
Posts: 3,266
Default

Quote:
Even then, you get only 12 shades of softness, no?
That's pretty good IMO. You can always use more.

Quote:
That wouldn't be so great if the shadow has to project far away.
why is that ?
V3 is offline   Reply With Quote
Old 10-Apr-2003, 10:28   #6
PC-Engine
Naughty Boy!
 
Join Date: Feb 2002
Posts: 6,802
Default

12 shades is pretty good, you only need it to soften the edges of the shadow. The body of the shadow is normaly one shade anyway.
__________________
I've got a working quantum computer prototype in my backyard. The only problem is, it crashes at temperatures above absolute zero therefore is not very overclocker friendly.
PC-Engine is offline   Reply With Quote
Old 10-Apr-2003, 10:38   #7
andypski
Member
 
Join Date: May 2002
Location: Santa Clara
Posts: 584
Default

Quote:
Originally Posted by V3
Quote:
Even then, you get only 12 shades of softness, no?
That's pretty good IMO. You can always use more.

Quote:
That wouldn't be so great if the shadow has to project far away.
why is that ?
As the shadow is projected the edges of the different shadow regions caused by the jittering will diverge along its length. If it is projected over a long distance then the edges will diverge noticeably and you won't get a soft-edged shadow, you will instead get a mess of hard shadow edges.
andypski is offline   Reply With Quote
Old 10-Apr-2003, 11:18   #8
cybamerc
Senior Member
 
Join Date: Feb 2002
Posts: 1,252
Default

V3:

> I think the best hack for soft shadow volumes is using a cluster of 12
> lights like NV had shown.

I disagree. It's a rather crude hack and a real performance killer. PowerVR has a demo of said technique (only goes up to 8 volumes though) and the quality of the shadows is far below what is achieved by the other one.
cybamerc is offline   Reply With Quote
Old 10-Apr-2003, 11:42   #9
london-boy
Me me me
 
Join Date: Apr 2002
Posts: 15,348
Default

Quote:
Originally Posted by cybamerc
V3:

> I think the best hack for soft shadow volumes is using a cluster of 12
> lights like NV had shown.

I disagree. It's a rather crude hack and a real performance killer. PowerVR has a demo of said technique (only goes up to 8 volumes though) and the quality of the shadows is far below what is achieved by the other one.


agreed. even thinking about using 12 lights to have one shadow is just plain ridiculous, unless your chip was a REAL monster... in which case people would still employ much more efficient techniques...
london-boy is offline   Reply With Quote
Old 10-Apr-2003, 12:29   #10
Fafalada
Senior Member
 
Join Date: Feb 2002
Posts: 2,767
Default

Quote:
It's a rather crude hack and a real performance killer. PowerVR has a demo of said technique (only goes up to 8 volumes though) and the quality of the shadows is far below what is achieved by the other one.
Actually, unless I'm misreading something badly, the method described here is essentially the same thing, just distributing the load across multiple frames to maintain performance, while relying on temporal coherency to avoid major artifacts.
In other words, in static pictures, it should generate results identical to the plain multi-volume approach. It's a rather cunning approach to the problem though, I have to say.

That PVR demo wasn't casting on any kind of textured scene, which made all the banding between mutliple volumes far more apparent then these pics.

And Marc is right, it's not really the same thing as what we use either.
Fafalada is offline   Reply With Quote
Old 10-Apr-2003, 17:24   #11
ERP
Moderator
 
Join Date: Feb 2002
Location: Redmond, WA
Posts: 3,149
Default

I agree with Faf,
this is just a hack, basically it distributes the load accross multiple frames. In a static scene it should look pretty similar to the NVidia demo, and in moving scenes I would expect ghosting artifacts which there is just no way to address.

I have a scribble on a piece of paper in my office that tends to imply that you can do soft shadows in a single pass with a stencil buffer, but it needs to be >8 bits deep when occluder density gets high. It's sort of similar in approach to MS's volumetric fog demo in the DX9 SDK. After E3 when I get a little breather I might try and get it working.
ERP is offline   Reply With Quote
Old 10-Apr-2003, 17:38   #12
psurge
Member
 
Join Date: Feb 2002
Location: LA, California
Posts: 825
Default

a paper which may be of interest:

http://www.ce.chalmers.se/staff/toma...t_egwr2002.pdf

Regards,
Serge
psurge is offline   Reply With Quote
Old 10-Apr-2003, 17:40   #13
Fafalada
Senior Member
 
Join Date: Feb 2002
Posts: 2,767
Default

Quote:
I have a scribble on a piece of paper in my office that tends to imply that you can do soft shadows in a single pass with a stencil buffer, but it needs to be >8 bits deep when occluder density gets high.
Well that wouldn't really be a problem for DX9 hw and beyond anyhow :P

But, just curious, since you mentioned occluder density - shouldn't drawing stencil counting geometry in single pass (switching inc/dec flag per poly) help alleviate this need for higher precision?
Fafalada is offline   Reply With Quote
Old 10-Apr-2003, 18:29   #14
ERP
Moderator
 
Join Date: Feb 2002
Location: Redmond, WA
Posts: 3,149
Default

In my case I need to be able to count fractional entry into the volume, aswell as total entries.

I might be able to do it with a combination of dest alpha and stencil, but I don't really have access to both of them in the same place which makes it a bit tricky. I might also be able to do it with render to a texture and rereading it for a final pass, I still need to think through the implementation a little.

It should be pretty easy to do on a DX9 class card, but I don't have a machine with one in and I'm a sucker for a challenge.
ERP is offline   Reply With Quote
Old 10-Apr-2003, 20:59   #15
BoddoZerg
Member
 
Join Date: Jul 2002
Posts: 481
Default

Quote:
Originally Posted by psurge
a paper which may be of interest:

http://www.ce.chalmers.se/staff/toma...t_egwr2002.pdf

Regards,
Serge
Cool. I wonder how "Unreal Next" is doing the soft shadows we saw in the GeForceFX launch?
BoddoZerg is offline   Reply With Quote
Old 10-Apr-2003, 21:17   #16
ERP
Moderator
 
Join Date: Feb 2002
Location: Redmond, WA
Posts: 3,149
Default

Quote:
Originally Posted by psurge
a paper which may be of interest:

http://www.ce.chalmers.se/staff/toma...t_egwr2002.pdf

Regards,
Serge
Yes this is very similar to the system I have sketched out on a piece of paper.
ERP is offline   Reply With Quote
Old 11-Apr-2003, 02:53   #17
V3
Senior Member
 
Join Date: Feb 2002
Posts: 3,266
Default

Quote:
I disagree. It's a rather crude hack and a real performance killer. PowerVR has a demo of said technique (only goes up to 8 volumes though) and the quality of the shadows is far below what is achieved by the other one.
I haven't seen PVR demo myself, but this hack is similar to PVR demo you described, PVR demo should be superior since it is doing all 8 compare to this one.
V3 is offline   Reply With Quote
Old 11-Apr-2003, 12:28   #18
Simon F
Tea maker
 
Join Date: Feb 2002
Location: In the Island of Sodor, where the steam trains lie
Posts: 4,379
Default

Quote:
Originally Posted by V3
Quote:
I disagree. It's a rather crude hack and a real performance killer. PowerVR has a demo of said technique (only goes up to 8 volumes though) and the quality of the shadows is far below what is achieved by the other one.
I haven't seen PVR demo myself, but this hack is similar to PVR demo you described, PVR demo should be superior since it is doing all 8 compare to this one.
IIRC, one limitation with that demo is the limited precision of the Framebuffer, i.e. only 8bits per channel. While accumulating the results of the various shadows it really needs higher precision and so would look a lot better with, say, DX9. The final result only needs a 16/24 bit framebuffer though.
__________________
"Your work is both good and original. Unfortunately the part that is good is not original and the part that is original is not good." -(attributed to) Samuel Johnson

"I invented the term Object-Oriented, and I can tell you I did not have C++ in mind." Alan Kay
Simon F is offline   Reply With Quote
Old 15-Nov-2004, 03:16   #19
codemonkey
Registered
 
Join Date: Nov 2004
Posts: 1
Default

aargh this is horrible. how much fillrate do you have to burn?

image-based techniques reign supreme again.


basically, the method i'm using is:

- render your volumes as usual.
- switch render target to a clean white surface.
- render a single big black quad over the entire surface, using the stencil you made previously. NO Z-WRITE.
(actually, its more complex, what you draw into the surface than this, but big and black will work OK)
- very aggressively oversample that buffer
- switch back to your main render target
- render the big black quad using subtractive with saturation.

sound ok? it sounds a bit crazy to me, but it works nice. 200fps+ on my r9600pro with a bunch of lights.

if subtractive is costly on your particular GPU, do a white-on-back multiplicative. still playing with this, but it does look nice.

you can do better if sampling your framebuffer isnt gonna cost you the entire world in performance. things like applying a sobel filter with edge detection onto your z-buffer, do you can do hacked-aniso on the oversampling.

email me and ill hook you up with some screens and hopefully a demo, but it needs a dx9 card at the mo. codemonkey@dont-spam-me@orcon.net.nz

-codemonkey
codemonkey is offline   Reply With Quote
Old 16-Nov-2004, 05:50   #20
Jov
Member
 
Join Date: Dec 2002
Posts: 503
Default

Quote:
Originally Posted by codemonkey
email me and ill hook you up with some screens and hopefully a demo, but it needs a dx9 card at the mo. codemonkey@dont-spam-me@orcon.net.nz

-codemonkey
If possible, please post links to some screens?
__________________
Jov
Jov is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New raytraced shadows demo Humus 3D Architectures & Chips 33 31-Aug-2004 23:26
Pixels.. nwatts 3D Architectures & Chips 148 03-Feb-2004 12:15
Soft shadows in real time using penumbra... Reverend 3D Architectures & Chips 7 23-Dec-2003 15:34
AnandTech meets image quality Tim Murray 3D & Semiconductor Industry 51 14-Dec-2003 12:12
Mark Rein comments on the 'UT2K3' "leaked" demo Aurra_Sing 3D Architectures & Chips 0 11-Jun-2002 22:25


All times are GMT +1. The time now is 05:45.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.