• Welcome to Dark Bit Factory & Gravity.
 

soft shadows

Started by hellfire, August 21, 2008

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

hellfire

Hey everyone,
made some tries with direct3d lately but have some doubts of the compatibility, so I would really appreciate if some of you could give it a try (might require vc redist).

I use a 32bit-float (single component) cube-map render target and I'm not sure if those are commonly supported.
The pixel-program should compile on shader-model 2, but if it doesn't please post the error-message from the console window.
If it does anything strange, please run the CapsViewer, use "file"->"print whole tree to file" and attach the resulting "dxview.log".

The white box is the light source (and its' approximated area) - not a bug ;)

Many thanks in advance!


- Added some more debug-infos (see console window)
- DirectX-Update (including d3dx9_xy.dlls) can be found here.
Challenge Trophies Won:

benny!

Ok,

on my first run your program requested the library
d3dx9_35.dll - after I installed that and tried
to ran it again, I got the following exception from the
just-in-time-debugger:

"Unhandled Win32-exception in shadow.exe[5372]"

Unfortunately I am at work right now and I do not want
to install loadz of M$ packages. Will try it again at home
and report.

Screeny looks promising though ;-)

German text from debugger:
Quote
Unbehandelte Ausnahme bei 0x00401fb7 in shadow.exe: 0xC0000005: Zugriffsverletzung beim Lesen an Position 0x00000000.
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Shockwave

Good news for you is that it works on my fairly humble little computer.

My Specs:
Latest DirectX, radeon X1650 256mb card, Windows XP SP2, P4 3.0Ghz and 1gb ram.

It gave a very solid 32 fps, I really love the shadows they look excellent, as do the gnarled formations inside the tunnel.

Hope that helps :)

And I hope even more that you are making something new with Haujobb? It's been a long time since I saw something released by you.. All these partys, you  could win something surely and people would love to see Haujobb back with something new.
Shockwave ^ Codigos
Challenge Trophies Won:

benny!

Don't know what you changed - but now it works and it looks
great. I love that tunnel and the shadows are fantastic.

FPS is between 21-26fps.

I noticed that the cube is black in my version whereas it seems
to be white in your version (screenshot). I am running WinXP
with a NVIDIA GeForce 7600GT here at work.
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

hellfire

#4
Thanks Shockwave, it's good to hear it works on ATI as well (which was usually thrilling with OpenGL).
I would like to keep some compatibility and avoid shader3 if not absolutely necessary (most older cards will lack some general horse-power though ), maybe I can somehow sort out the issue with benny's machine, too.
I have some serious plans with this one and it's already quite a bit more advanced as you can see here, but I wanted to keep a bit of suspense :)
Haven't yet decided whether it's going out under the "haujobb" label.

edit:
Benny, I silently changed the shadow-buffer from 16bit-floats (which saved some bandwidth but seems to be rather uncommon) to 32bit. Thank you very much for trying once again.
Challenge Trophies Won:

benny!

@hellfire:
np. keep us updated with the progress you make, please.

/me too wants to see another haujobb! release - are you still active btw?
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

mind

looks nice, but the fps is horrible on my system.. dualcore 2.4, gf9500 something, i get like 8 fps :(
Challenge Trophies Won:

AnimalMother

Runs fine & smooth here. Athlon X2 6000, 4GB Ram, 8800GTX 768MB, Vista Home Premium 64 @ 62 FPS  8)

Clyde

I have an Nvidia FX5500 w/128 Ram, Windows Vista 32-Bit w/ Service Pack 1, P4 2.66ghz with 512mb memory. And it runs at 1fps; so dont get the full benefit of the effect. the screen shot looks amazing.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

Shockwave

Quote from: Clyde on August 21, 2008
I have an Nvidia FX5500 w/128 Ram, Windows Vista 32-Bit w/ Service Pack 1, P4 2.66ghz with 512mb memory. And it runs at 1fps; so dont get the full benefit of the effect. the screen shot looks amazing.

Ouch! Someone with an even worse gfx card than me :D  :clap:
Shockwave ^ Codigos
Challenge Trophies Won:

AnimalMother

Yes it´s a real harware killer  ;)
And it reminds me of Microcosm for CD32  ;D

I made a short capture with kkapture... -> http://zeros.ath.cx/Downloads/Tools/shadow.avi

hellfire

#11
Quotegf9500 [..] i get like 8 fps
I somehow lost track of all the gpu mishmash.
I have a geforce 8600 (passive cooled) at work which gives stable 60fps.
Why is the 9500 that slow?

QuoteFX5500 [..] runs at 1fps
Sorry pal, it just hasn't the fillrate power (I'm doing 25 texture lookups for a single pixel), but I'm glad to hear that it *does* "run" :)

Quoteit´s a real harware killer
...it will become much worse ;)
Big thanks for the video!
Challenge Trophies Won:

Clyde

@Avi Capture: Wow the effect is awesome.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

zawran

No problem running on my computer, it was maxed at the screen update of 60fps. (intel quad core 2.4ghz, 2x 8800GT SLI). The shadows looks ace, really a nice effect you made there.

Jim

100% my-pc compatible ;D.  About 35fps.  Looks good, though if you want constructive criticism there's still a lot of fairly obvious texture aliasing on the walls.

Jim
Challenge Trophies Won:

Rbz

Works fine on my Geforce 6600GT, but it runs at 17 fps, no surprise for an old 6600GT :)
Challenge Trophies Won:

hellfire

Quoteif you want constructive criticism
I certainly do :)

Quotethere's still a lot of fairly obvious texture aliasing on the walls.
I'm not quite sure which "aliasing" you mean.
First of all there's a rather edgy (and ugly) per-vertex-lighting resulting from the grid-quantization of the mesh.
The shadows on the other hand show some colour-banding. That's because the number of samples is limited and because the distance of the samples grows with distance from the light-source (thus making the colour-bands larger).
But this is barely noticable when additional texturing is enabled.
Finally there's a case where the shadow-map can't really decide if a point is shadowed or not (eg if a ray hits the outer edge of an object); a common problem with shadowmaps producing flickering pixels.

I agree there's quite some potential for improvement on all of these.
Challenge Trophies Won:

mind

well i ran it without a bunch of shit running in the background this time(like lineageII on max settings and stuff) and got a stable 30 fps which was much prettier :D
Challenge Trophies Won:

Jim

I thought it was texture staircasing I was seeing, but I suspect it's actually the per-vertex lighting.  Not a lot you can do about that mach banding 'til we all get 12 or 16bit pixels.  Even if there are 16.7million colours in the palette there are still only 256 levels of grey ;)  Is that where you were trying to use floating point textures?

Jim
Challenge Trophies Won:

hellfire

Hi Jim,
I'm rendering a cubemap at the position of the lightsource and for each pixel store the distance from the lightsource (the standard depth-buffer-shadow approach).
When doing the actual rendering I can check whether the light reaches the pixel or if there's something in between (pixel's distance > distance store in cubemap).
But this only tells if the light for this pixel is on or off, so I repeat the test for the pixel's surrounding and use the median as shadow-intensity.
Of course using 8bit of precision for the depth-information doesn't work very well.
Here 16bit (integer) works quite okay, but floating point represents the values better (smaller steps near 0).
Challenge Trophies Won: