Stencil Shadow Test (Blitz3D)

Community Forums/Showcase/Stencil Shadow Test (Blitz3D)

fredborg(Posted 2005) [#1]
Hi,

I'm hoping some of you people are willing to give this a whirl, and let me know if it works on your machine.

Thanks to Tom for doing the directx dll, that allows for stuff like this :)

And thanks in advance for letting me know the 'Render Time' shown in the top right hand corner.

Download here:
http://www.frecle.net/misc/StencilShadow_CompatabilityTest.zip

What it should look like:



EOF(Posted 2005) [#2]
Works fautlessly here. (P4 3.6Ghz, Dx9c, ATI X600 Pro)

Render times:

0 no shadows
4 / 5 with shadows


Barnabius(Posted 2005) [#3]
Render time between 3 and 4

P4 @ 3.0 GHz, ATI X800XT PE

Barney


ErikT(Posted 2005) [#4]
Render time 7-9 on ATI Mobility 7500. Looks fine.


RifRaf(Posted 2005) [#5]
No shadows here. ATI Radeon 9600 Pro. Shading.. that looks like normal DX lights.. but no shadows like seen in the pic above.. However render time goes from 5-7 with shadow mode on.


big10p(Posted 2005) [#6]
Looks great, even on my old-ish PC.

Render time: 12-17

Athlon 1Ghz, GeForce 2 GTS 32MB, win98SE


Jeremy Alessi(Posted 2005) [#7]
Works great, RenderTime of 6-7.


Difference(Posted 2005) [#8]
Works great, RenderTime of 5.
Radeon 9600XT


ratking(Posted 2005) [#9]
rendertime 5-6 on my p4 2.66ghz and gf4ti


John Blackledge(Posted 2005) [#10]
Fredborg. It works perfectly. Very nice.
Can we all have a go?
Is there a decls file?


puki(Posted 2005) [#11]
I seemed to be getting 3-5 and 0 with no shadows

AMD 64 3200 - Radeon 9800 Pro


Secondary question - what's with the "Beethoven" head? "sswifty" uses it in his demos - I just wondered if it is some kind of Blitz thing?


BlackJumper(Posted 2005) [#12]
Nice. Renders ~6fps with odd jumps to 27ish for a single pass ?

2.2GHz P4Mobile; Radeon M9000


Braincell(Posted 2005) [#13]
Hi. Nice work indeed. Works ok on 6800gt.

BTW: If you dont make this free, i'll get really angry and finish my own code for which i may only need 1 or 2 days, and release it for free. Hope that doesn't ruin your plans.

And did you see this thread? I'm sure you did.

http://www.blitzbasic.com/Community/posts.php?topic=40097


daaan(Posted 2005) [#14]
Worked perfect, render time 11-12

ATI Radeon 9000, P4 2.6, 512mb


BlitzSupport(Posted 2005) [#15]
Fine here -- 10 ms -- Radeon 9800.


Naughty Alien(Posted 2005) [#16]
working fine here..render time switching between 5 and 6

P4, 2.8GHz, 4 Gigz RAM, nVidia A310, 256MB VRAM, WinXP Pro


JoeRetro(Posted 2005) [#17]
fine here too - 4-5 render

Geforce GT6600, Athlon 64, 1024mb


sswift(Posted 2005) [#18]
Puki:
"Secondary question - what's with the "Beethoven" head? "sswifty" uses it in his demos - I just wondered if it is some kind of Blitz thing?"

He probably swiped it outta one of my demos, but it's a free 3D studio model that's been floating around for years. :-)

I used it because I thought it would be amusing and it had a lot of polygons to really push the system.

[edit]
Yup, file date matches date I began my shadow system project. He swiped it. :-)
[/edit]


MadJack(Posted 2005) [#19]
Works fine here

5-6 render time

2ghz pentium, GeForce6800, W2000.


Red(Posted 2005) [#20]
works fine ... render time - 5


xlsior(Posted 2005) [#21]
Works OK, rendertime -5/6


Mustang(Posted 2005) [#22]
Very buggy shadows and render time ~40-45... but that's my laptop (Intel Extreme Graphics for mobile / GM/GME 82852/82855 integrated) so that was expected... :)


JustLuke(Posted 2005) [#23]
Works without a hitch. Good job!

Render time: 7/8

PC Setup: An AMD Athlon 2400+, 256 Mb of RAM, an ATI 9600 (using v 2.6.53 Omega Drivers) video card, DX9c and WinXP.

Any chance of letting us play with this, fredborg?


Ziltch(Posted 2005) [#24]
Works for me. I get 3-4 render time


Big&(Posted 2005) [#25]
Works fine here. 3-4 render time.


Robert Cummings(Posted 2005) [#26]
Render time is 5. Radeon 9800 PRO, athlon64.

What I don't get is, why is it that the stencil shadow is never rendered to a texture, and the texture drawn back on screen in slightly offset positions?

I would have thought this would be a nice way to get soft shadows.


fredborg(Posted 2005) [#27]
rifraf: Maybe your driver needs an update? Everybody else with ATI cards seem to be doing fine.

lenn: Yes, I saw that thread. Feel free to make your own version, why would I be upset about that? The more the merrier.

sswift: Argh, really? I thought I had it from Terabit, from when I was doing a lightwave importer for gile[s], but I'm sorry if I stepped on your toes. I can replace the model if that would make you comfortable.

rob: Because it wouldn't work :) It's better to do multi sampled stencil shadows to get soft shadows, but that's pretty slow... A better way is: http://download.nvidia.com/developer/presentations/2005/SIGGRAPH/PCSS.pdf but that obviously requires shaders, so it's not possible in blitz3d.

And here's the shadow renderworld function, it's pretty simple:

You will need the latest version of tom's directx dll to make it work. I'm not sure where he keeps it though :)

It's based on 'Paper Storm' from here: http://www.pvrdev.com/pub/PC/eg/index.htm
And this explanation of Stencil Shadows: http://www.gamasutra.com/features/20021011/lengyel_05.htm

You'll also have to construct your own shadow volumes :)


sswift(Posted 2005) [#28]
fred:
If you stepped on my toes, you'd know it. :-) It's a free model anyway. I think I reduced the polygon count a little from the original, but I don't care if you use it.


Robert Cummings(Posted 2005) [#29]
Interesting.

What I don't understand is why isn't this built into Blitz3D? It's just totally possible cos DBPRO does it with and without shaders. A CPU and GPU version is available and has no penalty on the programmer.

The above code looks hacky and quite scary really.

I think having a single casting light is just fine. Weird why it isn't in Blitz3D.

You would use EntityFX to enable it as a caster object. You could even use alpha 0 objects as proxy meshes for lower poly casters.

And you would go...

ShadowLight = CreateShadowLight() and all would be automatically taken care of.


puki(Posted 2005) [#30]
Anybody know what "fredborg" is planning with this?


mongia2(Posted 2005) [#31]
Works fine here. 5-6 render time.

AMD 2800+
GeForce 5700

512 ram


sswift(Posted 2005) [#32]
Puki:
Yes. On putting me out of business. ;-)

OEJ:
"What I don't understand is why isn't this built into Blitz3D?"

Because when Mark wrote Blitz, pixel shaders didn't exist, or weren't fast enough to be useful. And he hasn't upgraded Blitz3D, because he created BlitzMax, which is a better language in some ways and he will be supporting it with that.

Blitz3D still uses an old version of DirectX, and this allows it to work with old video cards. That's good if you are making shareware games which you want to run on as many PC's as possible, rather than high end PC games.


Steve Elliott(Posted 2005) [#33]
Impressive.

3-4 render time with shadows
0-1 without

Pentium 4, 3.2Ghz 1024 RAM ATI Radeon 9800Pro 128Mb


jfk EO-11110(Posted 2005) [#34]
works on radeon 9200se, 7-9 ms. Tho is see some white dots blinking in the shadow for some reason, probably nonwelded vertices. Selfshadowing is extremly cool!


Grisu(Posted 2005) [#35]
2-4 here


Dock(Posted 2005) [#36]
It renders the shadow, but is super slow! I'm on an Intel Extreme graphics (on my laptop)

Render time between 888-942!!


Braincell(Posted 2005) [#37]
Yes. On putting me out of business. ;-)

LoL. I stopped working on shadows before for two reasons, because i didnt understand how to move vertices efficiently using vectors (which i have now learned) and because i didnt feel like making you my enemy :P but fredborg doesnt mind! You must have sold the most copies of your shadow system by now sswift, more than any other blitz tool me thinks.


Robert Cummings(Posted 2005) [#38]
Yeah I want sswift out of business and this integrated into Blitz.

When Mark made blitz, cubemapping wasn't available. And stencil shadows is available on WAY MORE hardware than cube mapping is.

Therefore sswift is just in a panic that he won't sell any more :)


John Blackledge(Posted 2005) [#39]
I can see that the pros and cons and whys and why nots are going to bounce back and forth for a while.

Fredborg, can I just say - this would be great if you gave it away.
But if you sell it, I'll buy it, particularly if it will support a number of meshes without too great a hit.


AdrianT(Posted 2005) [#40]
The shadows don't show up on my geforce 3 :(


trb(Posted 2005) [#41]
Render time 15-17. shadows look great, except for little white sparkling dots in the shadow as JFK mentions above.

p3 1ghz, radeon 64 mb


Braincell(Posted 2005) [#42]
But if you sell it, I'll buy it, particularly if it will support a number of meshes without too great a hit.


If he sells it, i'll release it for free. Like i said, dont you read posts?


John Blackledge(Posted 2005) [#43]
Do I detect a little competition here?


Dock(Posted 2005) [#44]
Render Time = 6
on my Radeon 9600 Pro. :)

If Fredborg sells this code, I'd probably buy it, and use it in addition to SSwift's code. SSwift's stuff is more compatible - it works nicely on my laptop, but this doesn't work properly at all.

It would be awesome if this is used as some sort of real-time shadow preview in gile[s], just so you can see where the lights will cast.


Beaker(Posted 2005) [#45]
I get 20ms (ish) on my AMD1300 + GF4mx440 (or whatever it is).

Nice work Ferbdrog.


sswift(Posted 2005) [#46]
"You must have sold the most copies of your shadow system by now sswift, more than any other blitz tool me thinks. "


Maybe. I've sold around 125 copies since it first came out July 2002, which is an average of around 3 per month.

So I'm not exactly getting rich off it. :-)

Seamless Texture Generator sells much better than that!


Robert Cummings(Posted 2005) [#47]
Ah-ha! sswift is feeling threatened and cornered: moved to reply with offhand comments like "Maybe. I've sold around 125 copies since it first came out July 2002, which is an average of around 3 per month."

HAHAHA :)


LarsG(Posted 2005) [#48]
nice... render time 4

note: not the computer in my sig, but this one (it's nice to have more isn't it?!?! ;)):
IBM T42 Lappy, intel Pent. M 1.8GHz, ATI mobility radeon 9600, winXP Pro 2002 SP2, 1GB RAM


Stevie G(Posted 2005) [#49]
This is superb mate! Render time 5 with gfx4.


Mikele(Posted 2005) [#50]
Nice. Render time: 5-6.


Dirk Krause(Posted 2005) [#51]
render time 8, Dell Lattitude D800 with NVidia 4200 go.


Panno(Posted 2005) [#52]
10-11 rendertime

iam a hardware lamer ;)


RifRaf(Posted 2005) [#53]
Yes my drivers are pretty old. im sure thats it


Gabriel(Posted 2005) [#54]
Impressive.

Render Time : 4

P4 D 3.0, Geforce 6600GT


WendellM(Posted 2005) [#55]
Works fine on my Athlon XP 3000+, Radeon 9600 Pro with a render time of 5.


Wiebo(Posted 2005) [#56]
Beautiful, rendertime 5 on my amd3000+, radion9800 pro 256


L_Draven(Posted 2005) [#57]
rendertime - 11

Athlon XP 1800+
ATI Radeon 9550 256Mg


Matty(Posted 2005) [#58]
rendertime 60 (2 without shadows - although upon switching back to 'with shadows' it went back up to only about 50 instead of 60)

500 Mhz AMD K6
Geforce 2 MX 32 MB Ram


Binary_Moon(Posted 2005) [#59]
Hey Mikkel - that's really cool. I get a render time of 5 - 6


Shodan(Posted 2005) [#60]
really cool. Rendertime stable at 4ms.
did you offer this as Userlib for us?

Please. :-)


angel martinez(Posted 2005) [#61]
Works well in my system: AMD 64,Geforce 6800GT,1Gb RAM, WXP, DirectX 9.0c. Rendertime is 5 ms.


jfk EO-11110(Posted 2005) [#62]
L_Draven
rendertime - 11
Athlon XP 1800+
ATI Radeon 9550 256Mg


So your 9550 is slower than my 9200se? I guess your speed options settings are more on the quality side. I have set it to max speed btw.


L_Draven(Posted 2005) [#63]
Hi

When i change High Quality to High Perfomance options i get RenderTime- 10.

I dont know why is more slow that the 9200 :-).

i have 6.14.10.6542 driver version of ATI.

Greetings.


SoggyP(Posted 2005) [#64]
Hello.

Very nice. Render time 4-5.

Goodbye.


WildStorm(Posted 2005) [#65]
Very very nice!

ATI Raedon 9600 ALL-IN-WONDER

Driver: 6.14.10.0347

Rendertime: 4-5


Raitsun(Posted 2005) [#66]
Wow....
Give us the code, Great Shadow Lord!!!!

Radeon 9600 XT

Rendertime 5 with shadows, 0 without


Braincell(Posted 2005) [#67]
Yea give us the code already... freddy...


Red Ocktober(Posted 2005) [#68]
render time 10-11 radeon 9200...

i did notice Ludwig start to blur a lil when he was moved in any direction... like he was being refreshed out of sync, or something... and there is a significant performance hit on my old equipment, but considering what is going on, quite accpetable...

self shadowing stencils... great job!!!


--Mike


Raitsun(Posted 2005) [#69]
You just prevented me from buying sswifts shadow sys ;]


WildStorm(Posted 2005) [#70]
doesn't work any more on my system, since i've updated my drivers:
ATI Raedon 9600 ALL-IN-WONDER

Newest catalyst


Braincell(Posted 2005) [#71]
Come on fredborg, reply to us, when is the code coming?

If you dont reply in 15 days i'll continue work on my own free lib.


BlitzSupport(Posted 2005) [#72]
Why not just make your own anyway, instead of trying to force someone into releasing their work for free?


sswift(Posted 2005) [#73]
"You just prevented me from buying sswifts shadow sys"

You know, it's a long way from displaying some stencil shadows, and having a system that works in general game steups and which can handle detailed game environments. :-)


fredborg(Posted 2005) [#74]
Hi,

It will be not released, neither for free or for a fee, so please go ahead and make your own system instead. It's not exceptionally hard to do, it took about two days to make this system.

It is a full system which works in a game environment with 50+ shadow casters at once, at a relatively small framerate cost. It can however not do transparent/colored shadows like sswifts system.


Grey Alien(Posted 2005) [#75]
Neat: render = 3-4 on P4 3.2GHZ, Redeon 9800XT, DX9.0c, XP SP2


John Blackledge(Posted 2005) [#76]
@Raitsun: That was nasty - there was no need to say that about sswift's excellent work (how many times has that guy helped me out directly of indirectly during the last 3 years???)

@fredborg: This is the ultimate disappointment at the end of a 75 post thread. I've already said I'd be happy to buy this code in whatever state - it's that impressive, and there's no way I could write anything like this. You don't even want to do that?

@Lenn: Oh well, over to you, Lenn. Time to put up....


WildStorm(Posted 2005) [#77]
yep, thats really disapointing..
i didn't get through this stuff, even after 2 hours of searching, reading and stuff like this..
well, very sad that this big theme has such an endign...

bye


Braincell(Posted 2005) [#78]
Why not just make your own anyway, instead of trying to force someone into releasing their work for free?


Because this month i have very little time.

Now that freddy isnt going to release it i will try and make it asap. You CAN have coloured shadows but you may need 1 render for each colour, and you can have complex scenes.

I'll post a new thread when i have something (2-4 weeks)...


John Blackledge(Posted 2005) [#79]
I'm just going to bump this in the hope that there's a reply from Lenn.

Or maybe we should just keep bumping this to irritate fredborg into rethinking his policy.

Sorry fredborg, but trying to put myself in your place, I can't imagine offering a technique like this for perusal by my peers, then saying that it won't be available in any form to them.


Ross C(Posted 2005) [#80]
Hmmm, i hope certain people haven't put you off releasing this. I'd certainly buy this code... Whats the point in showcasing it? It's beyond me to create that kind of code anyway.


Braincell(Posted 2005) [#81]
@John,
i just replied 2 minutes before you posted :) maybe you didnt see, i guess.

Dont worry, i just had another look at the 9 month old code, and i'm sure i can make something useful out of it. I have everything in place i just need to make the vertex update function and check inverted faces and caps, etc. Then i will probably add the z-pass and z-fail technique together and make it so it uses z-pass only when camera is colided with the mesh (and is inside) when z-pass will be needed. This means it will be more robust and faster.

If i had more experience with blitz 9 months ago, it would already be finished.

Sorry fredborg, if i put you off :-(

If i cannot finish it in 4 weeks max, i will say so.

Seems "Nebulae" is really cursed now :P heh too bad


Stevie G(Posted 2005) [#82]

Hi,

It will be not released, neither for free or for a fee, so please go ahead and make your own system instead. It's not exceptionally hard to do, it took about two days to make this system.

It is a full system which works in a game environment with 50+ shadow casters at once, at a relatively small framerate cost. It can however not do transparent/colored shadows like sswifts system.



You dangle your carrot and then deliver a swift kick in the family jewels :(

I think you should have made this clear at the start! I was more than willing to pay for this as I'm sure alot of others would have been.

I guess you have your reasons.


John Blackledge(Posted 2005) [#83]
Fredborg, you're a well respected member of this community - I shudder to think how many bits of code of yours I've used in the past 3 years, which as Ross C says are completely beyond me to create.
I just hope you can understand the disappointment of people on this thread.

Lenn, in your own time mate, we wouldn't want you to feel under pressure (we all have other lives - usually family). But I'm sure from this thread you will appreciate how much this would mean to us all.
Just a thought - I know you're probably tempted to make your code all-singing all-dancing (_I_ always am!) but if you can save a few fps by not having coloured shadows (?) or by making it optional then I'd recommend that.


Braincell(Posted 2005) [#84]
Thanks John. Yes i'm always thinking ahead and i intend to allow everything to be made optional, so you can switch and optimise it yourself but it should still be easy to code. Perhaps not the very first release, but in time it will be optimised even further.

Just bare in mind that i cannot make boned meshes to work, and im not sure about some animated ones. Until Mark either releases the source that we need, or implements VertexX() (also Y and Z) command to return vertex positions on boned animated meshes, it seems it wont be possible. I'm sure the data can also be hacked but honestly i wouldnt want to go there.

I mentioned a few months ago to a few people that i could continue with this but to me it didnt appear many were so enthusiastic, or it just so happened i talked to the wrong people - those who left Blitz3D behind.


fredborg(Posted 2005) [#85]
Hi,

The point of posting it was to find out how well supported stencil shadows are on various graphics hardware, and indeed if it was done correctly. As the system is being used for a project I'm involved in, this was a good way to test it on a lot of different hardware.

Once this project is done, it is possible that the system will be released. But this won't be for another few months, so don't let that stop you from doing your own experiments/systems/shadows/whatever.

It was never stated that it would be released, and if some of you expected that, then you must have misunderstood.


Ross C(Posted 2005) [#86]
Well, that's cool. Good luck with your project, i hope it's successful and you release the shadow code ;o)


Robert Cummings(Posted 2005) [#87]
Lenn, you sound like an idiot, can you just back off or try and be constructive? Try not to be offended or make excuses, just be sensible.

Fredborg: Keep up the good work. I enjoy seeing demos like this and if you wished to sell it then fine by me.

I actually think this would be a fantastic addition to gile[s] if at all possible, especially in the case of previewing.

Regardless, I would like to see more constructive thinking from people on this form, particularly you, Lenn. How dare you allow yourself to speak out of turn like that.


Robert Cummings(Posted 2005) [#88]
And as for the rest of you, if someone doesn't release it, please refrain from begging.

Its cheap and nasty. Have some dignity.


Braincell(Posted 2005) [#89]
You ran out of tampons Jack?

How can i be constructive? Tell fredborg to continue working? What makes you think i was offended, and/or making excuses?

What did i say, that i dont think this should be released for sale? Well if thats what you mean then i told him to stop him wasting time because i am planning to release it for free.

Put some ice on your head.


Who was John Galt?(Posted 2005) [#90]
It amazes me how much realism the self shadows add.


John Blackledge(Posted 2005) [#91]
@One Eyed Jack: "Lenn, you sound like an idiot"
Careful boyo, it's comments like that that come to the attention of Blitz Support - need I say more.

As for Lenn backing off, it's us who have asked him to step forward!
Don't let this put you off Lenn.

Sorry, I forgot that fredborg wrote giles. It's easy to see that he would want his new shadow system to be part of that masterplan. I would if I'd written giles!

Oh, and Jack, don't ask me to stop begging. I lose no self-respect by admitting that I can't do what fredborg and Lenn can do.
On the contrary, if you get a gist of the sort of person Lenn is, then you'll see that he'll be flattered by that; as any of us would be.


Stevie G(Posted 2005) [#92]
Yeah One Eyed ... take a chill pill I don't think he's said anything out of turn ........ unless it's be edited!


Sunteam Software(Posted 2005) [#93]
4-5

AMD Athlon 3200+,2Gb Dual-400Mhz RAM, GeForce 6800 GT 256MB

Nice work!


Svenart(Posted 2005) [#94]
Looks great to me... selfshadow is great and itīs fast too. Itīs amazing to see what you can do with b3d, gratulations!