PDA

View Full Version : Soft shadows - demo



tfpsly
12-03-2002, 07:05 AM
Hello coders.
I' uploaded a small demo (1.4mo) of soft shadows at: http://tfpsly.planet-d.net/Files/demo.zip
It includes start.bsp from Q1.

Tested ok on a Geforce 2mx under Linux and W98.

Can some people test it?

There's a hack I don't like much: when the camera moves, the blurred volume aren't corretly placed anymore, so I switch back to "hard" shadows. Maybe on faster hardware the volumes would fade out fast enought not to be visible. You can test it by pressing the "n" key and move the view with the mouse.
Maybe I should instead reduce the number of displayed volume...

Thx for feedback on this forum or at sylvain@vignaud.org

kingping
12-03-2002, 07:22 AM
The window appears completely black when it tries to render the soft shadows. Works fine with the hard shadows though.

Also I had to create a symbolic link from by libstdc++.so to libstdc++.so.5 seeing as I don't have libstdc++.so.5 installed :]

Asgard
12-03-2002, 07:26 AM
I have the same problem on WinXP. The window stays black when rendering soft shadows.

bakery2k
12-03-2002, 07:46 AM
Same problem.
GF3 Ti200, Win98 SE.

Adrian
12-03-2002, 07:53 AM
With hard shadows I see the scene but only when I move the mouse while holding the mouse button down. The scene flickers.

With soft shadows I see a black screen.

I have WinXP + Geforce 4600 Det. 41.09

gaby
12-03-2002, 08:05 AM
Hi,

I haven't test your demo (because I haven't yet a good graphic card - i'm working on SGI), but I think that you'd beter try to simulate real soft shadow procesing : in software rendering, soft shadows are based on multi sample per light. This samples are based on the radius, the segment or the surface of the light.

IMHO, with your method, you will have a linear soft whadow because it's more a motion blur (based on a direction vector) than a real multi sample method. So, you should try the same thing by moving the light on a sphere. By processing 8, 16 or more samples, you should be able to do soft shadows in static scenes.

Gaby

Old GLman
12-03-2002, 08:19 AM
Hi,

Can you put a Linux version up please? http://www.opengl.org/discussion_boards/ubb/biggrin.gif

Thanks,

Old GLman

davepermen
12-03-2002, 08:22 AM
hardshadows working as the others report: no shadows if no move, else normal sharp stencil shadows.
softshadows not visible at all, unimportant if moving or not, i see the unshadowed scene.

specs:
radeon9700pro,celeron2gig,256mddr333,60gbhd+20gbhd ,512kbitsdown128kbitsupadslmodem. you need anything else? http://www.opengl.org/discussion_boards/ubb/biggrin.gif
oh, win2000professional,latest service patches and releases, dx9beta and appropriate drivers for radeon installed.
and i do have a soundcard, too. never forget that! http://www.opengl.org/discussion_boards/ubb/biggrin.gif
and a dvd rom, and a cd burner. says it can do 48x, but does only 40x. could that be the problem? http://www.opengl.org/discussion_boards/ubb/biggrin.gif
sorry.. couldn't resist..

kingping
12-03-2002, 08:39 AM
Originally posted by Old GLman:

Can you put a Linux version up please? http://www.opengl.org/discussion_boards/ubb/biggrin.gif


That is a Linux version, but you have to "chmod u+x yac3De" before you run it with "sh runme1st". You might have to symbolically link your libstdc++.so to libstdc++.so.5 aswell.

Ysaneya
12-03-2002, 09:24 AM
Worked for me. Athlon 1.4 Ghz, Radeon 8500, 512 Mb RAM. Nice technic. But isn't it a bit slow ? 30 fps for a 1500 polys scene in 640x480.. ough..

Y.

davepermen
12-03-2002, 10:30 AM
works for me now, too. i had fsaa8x enabled, somehow that made problems..

looks sweet once you stand, but while moving it feels like you got too much drugs.. (you aka player http://www.opengl.org/discussion_boards/ubb/biggrin.gif)

specs you know from above..

Old GLman
12-03-2002, 10:58 AM
Ah, thanks Kingpin, theres still allot I don't know about linux...!

Bit of trouble, I'm not sure where to place the symlink?

libstdc++.so exists in /usr/lib/gcc-lib/i386-redhat-linux/2.96. But it is already linked to another file in /usr/lib.

Old GLman

[This message has been edited by Old GLman (edited 12-03-2002).]

Sundy
12-03-2002, 11:08 AM
C:\Games\softshadow\softShadow>viewer -m demo.3ds -q -t -a
Gizmo3D Notice::License START : 1999-01-01
Gizmo3D Notice::License STOP : 2002-11-01
Gizmo3D Notice::Licensed features has expired !! (Sorry!)
Gizmo3D::No graphics license activated !
Gizmo3D Warning::gzMutex deleted with unbalanced Lock/unLock

I cant run http://www.opengl.org/discussion_boards/ubb/frown.gif

kingping
12-03-2002, 12:13 PM
Originally posted by Old GLman:
Ah, thanks Kingpin, theres still allot I don't know about linux...!

Bit of trouble, I'm not sure where to place the symlink?

libstdc++.so exists in /usr/lib/gcc-lib/i386-redhat-linux/2.96. But it is already linked to another file in /usr/lib.


I linked the libstdc++.so in /usr/lib with the largest number after it (3.0.2). Not sure how things are arranged with RH though :]

ToolTech
12-03-2002, 12:24 PM
What does Gizmo3D has to do with this thread ?? Just a bit puzzled ??

Anyway SUNDY you can find a updated demo on www.tooltech-software.com (http://www.tooltech-software.com) but it is still not related to this thread..

/Anders

Old GLman
12-03-2002, 01:56 PM
Originally posted by kingping:
I linked the libstdc++.so in /usr/lib with the largest number after it (3.0.2). Not sure how things are arranged with RH though :]


Ok, makes sense now, thanks.

Old GLman

satan
12-03-2002, 03:01 PM
Works for me with hard and soft shadows at about 15fps. But when I move the player the shadows move with the camera and then vanish to get redrawn were they belong.

specs:

AMD K6-II 450MHz
Geforce 2MX
RedHat 8.0

tfpsly
12-03-2002, 10:54 PM
Originally posted by gaby:
...you'd beter try to simulate real soft shadow procesing : in software rendering, soft shadows are based on multi sample per light. This samples are based on the radius, the segment or the surface of the light.

IMHO, with your method, you will have a linear soft whadow because it's more a motion blur (based on a direction vector) than a real multi sample method. So, you should try the same thing by moving the light on a sphere. By processing 8, 16 or more samples, you should be able to do soft shadows in static scenes.

Gaby

Hem, that's what I'm doing when the light does not move =)

tfpsly
12-03-2002, 10:59 PM
So if I resume,
* worked for a few guy
* worked for a few guy after disable fsaa
* did not work at all for most guy.

=(

30fps on a Radeon sounds quite strange, I get faster results on a GF2MX (with VAR).

[This message has been edited by tfpsly (edited 12-04-2002).]

Michael Steinberg
12-04-2002, 12:31 AM
damn, cant you guys include the glut files in your archives?

Ysaneya
12-04-2002, 12:34 AM
Don't think VAR has anything to do with it.. not for 1500 polys.

The technic you are using makes zooming into the penumbra extremely ugly. When you move, i don't see any soft shadows, just standard shadow volumes. I guess it's normal ?

Y.

Michael Steinberg
12-04-2002, 12:38 AM
Hmmm, okay, it works here as it is supposed to do i guess, with about 25 fps (geforce2gts).
What good for is the technuiqe when soft shadows turned on while camera movement are ugly, and when it takes several seconds for the soft shadows to reappear when you stopped movement?

Michael Steinberg
12-04-2002, 12:49 AM
Hmmm, okay, it works here as it is supposed to do i guess, with about 25 fps (geforce2gts).
What good for is the technuiqe when soft shadows turned on while camera movement are ugly, and when it takes several seconds for the soft shadows to reappear when you stopped movement?

tfpsly
12-04-2002, 01:45 AM
Originally posted by Michael Steinberg:
damn, cant you guys include the glut files in your archives?
Nop =p


Originally posted by Michael Steinberg:
What good for is the technuiqe when soft shadows turned on while camera movement are ugly, and when it takes several seconds for the soft shadows to reappear when you stopped movement?
Nothing. Just testing. I were hopping a high framerate (like 60fps) would fade out fast enough the old volumes.


I forgot to mention that you can test this demo against Q3 levels:
* unzip pak0.pak in a subdirectory called "demoq3"
* launch "yac3de shadow fic demoq3/maps/q3dm1.bsp" for example
Q3 levels are just too big to be included in a small demo.

tfpsly
12-04-2002, 01:52 AM
Originally posted by davepermen:
looks sweet once you stand, but while moving it feels like you got too much drugs.. (you aka player http://www.opengl.org/discussion_boards/ubb/biggrin.gif)

That was a nice pill, wasn't it ;-)

tfpsly
12-04-2002, 06:24 AM
I uploaded a new release of the demo. Might fix some bugs, might still have others... http://tfpsly.planet-d.net/Files/demo.zip

Sorry davepermen, you might not be able to take drug anymore while looking the demo.

Adrian
12-04-2002, 06:57 AM
With the new version the Dos box flashes up and disappears, the app doesnt even start http://www.opengl.org/discussion_boards/ubb/frown.gif

Asgard
12-04-2002, 07:44 AM
Remove the ./ from the runme1st.bat.

The new version still doesn't work on my machine with the soft shadows. The window just stays black. GF4 TI4200 with 41.09 WinXP drivers, no FSAA turned on.

jabe
12-04-2002, 07:56 AM
the same here, geforce2mx, amd 800mhz.
but i got around 22 fps displaying a black screen and a red colored text, not bad http://www.opengl.org/discussion_boards/ubb/smile.gif

MZ
12-04-2002, 08:03 AM
GF3, win2K, updated demo:

With shadows enabled (either in soft or hard mode) screen is totally black, no matter i move or stand still. To see anything i must disable shadows at all.

IMHO whole scene is much too dark, i suggest you add some ambient, or brighten textures.

[This message has been edited by MZ (edited 12-04-2002).]

tfpsly
12-04-2002, 09:05 AM
Originally posted by jabe:
but i got around 22 fps displaying a black screen and a red colored text, not bad http://www.opengl.org/discussion_boards/ubb/smile.gif
Arg!

I think I'll need access to other computer to see what's wrong. Or maybe I could upload 2 or 3 progs, some disabling here and there some code in the soft shading system...
At least the rest of the code seems to work quite ok.

davepermen
12-04-2002, 09:42 AM
looks much bether now. i bet you could just do the softshadows without frame reusage, but by drawing multiple volumes for me, it would look as good (bether, still, the pills are still working, while not that strong anymore http://www.opengl.org/discussion_boards/ubb/biggrin.gif), and the shadows would always be soft.. at least on a radeon9700pro i excpect this to work..

tfpsly
12-04-2002, 10:09 AM
Originally posted by davepermen:
looks much bether now.

Great.


looks much bether now. i bet you could just do the softshadows without frame reusage, but by drawing multiple volumes for me, it would look as good (bether, still, the pills are still working, while not that strong anymore http://www.opengl.org/discussion_boards/ubb/biggrin.gif), and the shadows would always be soft.. at least on a radeon9700pro i excpect this to work..
Yeah, but I think I might expect 1 or 2 fps on my GF2MX =) Still I'll implement such shadowing for guys that have fast enough card.


I uploaded new binaries: http://tfpsly.planet-d.net/Files/bins.zip
Now if you had problems, you can press the spacebar to switch off some part of the soft shadowing. In the text window, a message tells what should be expected. So just give me the results you get instead for each mode and that would help me guess what's wrong.

Asgard
12-04-2002, 10:19 AM
Might not really help, but only with testing = 4 I see the level on my machine. With all the others I only see a black window with one line of red text running at ~40 fps.
What detonator driver version are you using yourself under Windows, tfpsly?

Adrian
12-04-2002, 11:03 AM
I get the same as Asgard.

tfpsly
12-04-2002, 11:02 PM
I'm using 29.42_win9x.exe.
But if even people under Linux cannot see anything, this might not be a problem of drivers.

tfpsly
12-05-2002, 12:50 AM
Ok, I managed to recreate on my computer the same bug you got (black screen) by switching to 16 bits. Which made me think something was wrong in the way I create the window (in the way I set up the alpha size)... which was true.

New bins here, might fix everything: http://tfpsly.planet-d.net/Files/bins.zip

Thx to these who are still fighting.

Humus
12-05-2002, 01:02 AM
Nice. Works fine now on Radeon 9700.

nystep
12-05-2002, 01:18 AM
doesn't starts here.

radeon 7500 + winxp.

Asgard
12-05-2002, 02:13 AM
The new binaries still don't work here, and now I know why, because no matter which display mode I choose, the application output always says 0 alpha bits.

knackered
12-05-2002, 03:00 AM
doesn't work here.
geforce4ti4600 (latest detonators)
Same problem as other people - your console output says alpha 0. Only the last test works (no shadows).

tfpsly
12-05-2002, 03:09 AM
Originally posted by Asgard:
The new binaries still don't work here, and now I know why, because no matter which display mode I choose, the application output always says 0 alpha bits.

Yeah I saw that. It seems to be a bug in GLUT, but it still works under Linux and Windows for me and some other. Grrr, I want to have a PC where it does NOT work to be able to fix that ****.
Or I'll try to compile for SDL under Windows.

Adrian
12-05-2002, 05:03 AM
Your app is highly dependent on detonator driver version.

On Win98 and GF2 GTS

12.0x - Kind of worked, lighting very bright + shadows were very flickery.

29.42 - Works fine in 32 bit colour.

40.72 - Didn't work got black screen.

tfpsly
12-05-2002, 06:57 AM
Originally posted by Adrian:
Your app is highly dependent on detonator driver version.

On Win98 and GF2 GTS

12.0x - Kind of worked, lighting very bright + shadows were very flickery.

29.42 - Works fine in 32 bit colour.

40.72 - Didn't work got black screen.

Damn it, so the code seems to be quite ok.
Indeed, I'm using lots of bit masking on stencil, and lots of masking on color/alpha buffer, plus some not so commonly used blending mode. So maybe some detonators do not implement it correctly. After all, guys with ATI cards do not seem to have problem.

Thx a lot for this info.

EDIT: I'm gonna download latest detonator to see what's wrong more in detail

[This message has been edited by tfpsly (edited 12-05-2002).]

tfpsly
12-05-2002, 06:59 AM
Originally posted by nystep:
doesn't starts here.

radeon 7500 + winxp.


Can you check in runme1st.bat if there is "./" before "yac3de"? In which case it should be removed, as the "./yac3de" style is for unix, not windows.

Julien Cayzac
12-05-2002, 12:03 PM
Originally posted by tfpsly:
I'm using lots of bit masking on stencil, and lots of masking on color/alpha buffer,

Maybe it's a pixel format issue... Did you double-check the size and offset for each RGBA component?

Julien.

yakuza
12-05-2002, 03:36 PM
Works fine on my Radeon 8500, 2.4 Catalyst drivers, seems to sit pinned at exactly 50 fps when idle.

I agree with Dave about the "drug" effect when moving, leaves ghosting images kinda like "trails", hehe.

Oh, and I had tried your first posted bits last night, and got the black screen except when dragging. I was in 16 bit mode, which you've already found out was the problem (don't ask why I was in 16 bit, troubleshooting, hehe).

tfpsly
12-06-2002, 12:09 AM
Originally posted by deepmind:
Maybe it's a pixel format issue... Did you double-check the size and offset for each RGBA component?
glutInitDisplayMode( GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA | GLUT_STENCIL ); =)

I'll put a new binary using the SDL instead, which gives me more control.

bakery2k
12-06-2002, 12:18 AM
Don't forget that to get alpha, you need to use GLUT_ALPHA in that list of flags.
GLUT_RGBA == GLUT_RGB.

tfpsly
12-06-2002, 07:06 AM
Originally posted by bakery2k:
Don't forget that to get alpha, you need to use GLUT_ALPHA in that list of flags.
GLUT_RGBA == GLUT_RGB.
True.
I fixed that, and am uploading a new bin while writing this. Same http://tfpsly.planet-d.net/Files/bins.zip

Asgard
12-06-2002, 07:19 AM
That did the trick. And I must say it looks kinda cool, but makes me feel dizzy after a while ;-)

bakery2k
12-06-2002, 08:07 AM
That fixed it for me too.

nystep
12-06-2002, 08:47 AM
Originally posted by tfpsly:

Originally posted by nystep:
doesn't starts here.

radeon 7500 + winxp.


Can you check in runme1st.bat if there is "./" before "yac3de"? In which case it should be removed, as the "./yac3de" style is for unix, not windows.


yep. now it works, and even with a rather good framerate, 33-40 FPS for the test scene.
nice work http://www.opengl.org/discussion_boards/ubb/smile.gif

tfpsly
12-06-2002, 01:52 PM
Pfffweeee!
Finally done! Seems to work fine everywhere.
Thanx to you guys, who had the courage of testing so many time this piece of crappy cod..., hem this nice & cool stuff!

There's only one (big) drawback to this method: it works really well only when the camera does not move (or move very slowly). That's fine for cinematics, not for in game =/
Gonna see what I can do...

EDIT By the way, I implemented the "real" soft shadows, using many volumes -> fps dropped to 2 or 3fps on a GF2MX (after debugging) =(
Uploaded and available at the same urls as above.
Just press 'p' many times (default: fast soft shadows, then real soft, no shadow, hard shadow and so on)

[This message has been edited by tfpsly (edited 12-09-2002).]