Simple shadows

Community Forums/Showcase/Simple shadows

Kalisme(Posted 2006) [#1]

Hey everybody....
This was really put together thanks to me losing my medication for a few days... I can't find my antidepressants and felt really useless... so I put this together...

It's nothing mindblowing... but I'm gonna release the code for free... I dunno if it will have any intrest considering how we're now accesing volumetric shadows and stuff... but I'd like to think this could at least help beginners.
I have the basics working... but I can't get the shadows to fade using its vertexalpha... I'll probably ask alot of questions in the blitz3d forum... but I hope I get it done soon...
I hope there is some intrest... but I guess it's pretty dated stuff
-Kev


Genexi2(Posted 2006) [#2]
Reminds me of the way many PS2 games do it....do the shadows actually cast onto the walls as well, or do they stretch beyond comprehension on them?


John Pickford(Posted 2006) [#3]
That model is ace.


puki(Posted 2006) [#4]
Mmm, Cobra will have shadows built-in. Can't wait - ready to burst.


Kalisme(Posted 2006) [#5]
Puki: Yeah... I know the feeling... I want Cobra now!!!

John Pickford: Thanx alot :D I wanna get more into 3d modeling, this was a quick one I shoved together to test coding

Genexi2: Ooops... I should of posted a differant screenshot...
They do cast onto walls and sit on meshes... I'm going to do a little decal system some time soon... so bullet holes and blood wraps around walls... (will also be free of course)
Here's a better screenshot:

that wierd lil green thingy was my light source


t3K|Mac(Posted 2006) [#6]
looks good so far. go on!


Pete Carter(Posted 2006) [#7]
very good i am very interested to see how this is done

hope you code is easy to read, im rubbish when it comes to this stuff.

Pete


puki(Posted 2006) [#8]
Ah, they do cast on walls - even better.

Well, if you release the code then others may be able to improve it.


jfk EO-11110(Posted 2006) [#9]
That's looking great so far! Now you only need to lower the opaqueness (see my answer in the blitz3d section) and probably blur the contour (eg. by using 2 layers with small offset, or multitexturing and a small offset in one of the textures position)


bytecode77(Posted 2006) [#10]
nice work!
ps: http://www.blitzbasic.com/logs/userlog.php?user=8270&log=660


Kalisme(Posted 2006) [#11]
YAY!!!! I figured it out :D
hehehe... I got fraustrated and just started playing with the textureblends and entityblends... I tried entityblend 2 and textureblend 3... and I noticed that the mesh just went invisable... at first I was like "wow... that's useless..."
but it turn out that's the right one... lol... the reason it was invisible was because the entitycolor (in this case vertexcolor) must at default be set at like 255,255,255 or something... but it's visable below that... pretty nifty :D
I'll update ASAP


Pete Carter(Posted 2006) [#12]
great i look forward to it!

Pete


Kalisme(Posted 2006) [#13]

Here is that quick demo Scene I've been using, but with two light sources... (you can have more of course!... but two active ones seems like a good test)
I just made the shadows transparent...
Still more glitches to work through... but it should be released soon...
all free open source of course :D


Kalisme(Posted 2006) [#14]
Devils child: That's exaclty what I was talking about... infact I was thinking of your work... amazing stuff!
Definatley bringing blitz3d fowards in the world :D


jfk EO-11110(Posted 2006) [#15]
great progress! can't wait :) I wonder how you determine the texel positions on a texture that is applied to a shadow mesh that needs to use underlying vertices.


Regular K(Posted 2006) [#16]
Thats actually pretty good for a game that doesn't demand complex shadows.

But can you please get a new model to test with? PLEASE! I know its just for testing but it makes my eyes bleed!


Liberator(Posted 2006) [#17]
No way man, those models own! Reminds me of the good ol' days when UVW maps were non existant. I'd take a complex object textured with a single planar map over any of this 'unreal' stuff any day! :]


WendellM(Posted 2006) [#18]
I like the model, too, in a "so bad it's good" way. If I were trapped in a doorless, gray courtyard with harsh lights shining down on me, I'd feel like that model looks. Everything is consistently, wonderfully bleak. :) And the shadows look pretty spiffy, too (a bit blocky, but that's for speed no doubt).


HNPhan(Posted 2006) [#19]
nice, you know what? because you're doing this for free, I'll let you use my old 'balchak' model, which has full animation and stuff. I'll send you the animation sequence code if you need it too.
http://hnphan.com/downloads/balchak.zip


OrcSlayer(Posted 2006) [#20]
Eww, it has...a winky!

Just kidding, that's an awesome model and animation job there...


HNPhan(Posted 2006) [#21]
you sound like someone who never saw one!

eheh, just kidding man


Neuro(Posted 2006) [#22]
heh, you stared at it!!


OrcSlayer(Posted 2006) [#23]
Never seen one on a bull-demon-evil-thing before, at least...

I'm used to seeing gender-neutral demons in Doom 3...


jfk EO-11110(Posted 2006) [#24]
any news about the shadow system?


Kalisme(Posted 2006) [#25]
Oh hey there people...
Erm... My computer sorta died <_<
>_>
so my work is sort of halted for a while...
sorry peoples... I'm using a tafe computer right now


OrcSlayer(Posted 2006) [#26]
Hey man, sorry to hear about your computer! That sucks...hope you get back up and running soon!


jfk EO-11110(Posted 2006) [#27]
arrgh - happened to me too some time ago. Feels as if a part of you is dieing +_+ - but take it easy, there's reincarnation. And make sure to backup your files (I hope your harddrive is not damaged).

BTW: Attention: don't install a new windows with your old harddrive plugged in, even when it's a secondary non master drive, even when it's a hidden partition. Windows will productively format everything and not only the boot drive! So you should completely unplug it during installation.


Nexus6(Posted 2006) [#28]
Hey Kalisme, how you getting on rebuilding your shadow engine, of all the atempts I've seen over the past 12 months yours was IMHO the most promising.

Hope your still working on it.


Weetbix(Posted 2006) [#29]
Yes this looks very promising, I hope its not dead.


Kalisme(Posted 2006) [#30]
Oh hey there people!
I was pretty happy to see people actually commented about this... sorry about the big halt... my computer died and I was computerless for months!!! :(
but I got a new pc a week ago, and I stayed up late yesterday and got alot of work done on the engine...
I hope you guys find it useful :)
Thanks for the kind words, and thank you TONS to Tigerz...
the new shadow demo uses your model...
it helped bring some big flaws in my engine to my attention.
here's a screenshot: (well... 2 screenshots cropped)


so here are the links:
my shadow library: (all code included... but still needs work)
http://www.filelodge.com/files/room17/427152/showcase%20shadows.zip

and a look at the wrapping decal system I'm also currently working on:
http://www.filelodge.com/files/room17/427152/deKAL%20demo.zip

I hope you like :D


Nexus6(Posted 2006) [#31]
Downloading now.

8.9 kb/sec, this is painfully slow to download.


Nexus6(Posted 2006) [#32]
That ran smoothly and looked great, not sure what framerate i was getting though. Keep up the good work Kalisme, although this looked complete as it is.


jfk EO-11110(Posted 2006) [#33]
Lots of popup spam there, but the screenie looks great. Downloaded, will watch the code later. Thanks a lot for sharing!


bytecode77(Posted 2006) [#34]
hey great work man!!
i admire your shadow system :)
since i never get textured shadows to work(only stencils) :D

hey, i got a few ideas for you:
for example this
http://www.blitzbasic.com/codearcs/codearcs.php?code=754
blurs a texture very fast!

maybee you can take use of it :)


bytecode77(Posted 2006) [#35]
I haven't started a "known bugs" log yet...
There are many many many problems with this early code...
I hope to fix as many as I can...
But if anyone wants to use this code and/or improve it.
I'd be happy for the attention.

One thing I REALLY want help with is blurring...
if someone could add a blurring option...
well... YAY!!!


hey, we could make a shadow system together!!
how about some sort of team?? i made a team with daredevil for our shadow system, too. so why don't we make one and improve it? agree?


BlitzSupport(Posted 2006) [#36]
The downloads don't work here... just keeps going back to the start page when you click the links.


Kalisme(Posted 2006) [#37]
Devils child: that sounds great! but I have to warn you, I'm currently working at home, but using the TAFEs computers internet... (none at home for now :( )
so it might be sorta wierd waiting for responces.

BlitzSupport: I just downloaded "showcase shadows.zip"... the link should take you to an annoying "pop-up" looking page with adds and a link to the download...
you click that and it should show a page with ANOTHER add on it... click on the link to my file and it should download.
hmm... yeah, that sounds really annoying... but it's not as bad as I make it out.
Hopefully that works :)


bytecode77(Posted 2006) [#38]
well, we'll see, but first i have to check out the code.



makes strange things...


Naughty Alien(Posted 2006) [#39]
..when I tried to run source sample SCENE.BB, I got 'Function Tribox not found' error..is there some decls file missing??


bytecode77(Posted 2006) [#40]
yes, you must download the tribox dll and put it into your userlibs folder :)


Naughty Alien(Posted 2006) [#41]
tribox.dll is in userlibs folder but error message is still same...so?


bytecode77(Posted 2006) [#42]
[quote]put it into your userlibs folder[/qoute] including the decls file...


Mikele(Posted 2006) [#43]
Not work for me too but You can delete line:

If triBox(bank) = 1
(+ EndIf too)

then run program.

What is tribox.dll and how can i make decls file?

I tried:

.lib "tribox.dll"
TriBox%(bank):"_triBox@4"

Not work.

[EDIT]
Ok. I have the link :) http://www.blitzbasic.com/codearcs/codearcs.php?code=1191


Naughty Alien(Posted 2006) [#44]
Link you post doesnt work nothing except opening new window each time I click on it..anyone can post link for this DECLS file as well as corresponding DLL?


mindstorms(Posted 2006) [#45]
In the code archives one, copy and past into your browser directly and it will work...not quite sure why.


bytecode77(Posted 2006) [#46]
i have enough webspace. soon, i will upload all his broken links!


Mikele(Posted 2006) [#47]
Copy tribox.dll from showcase shadows.zip to userlib folder, make new decls file: tribox.decls
and paste:

.lib "tribox.dll"

triBox%(bank*):"triBox@4"


Save. :)


bytecode77(Posted 2006) [#48]
kalisme:

i guess you speak english very good, so please get skype on www.skype.com and lets talk about the shadow system. because maybee it is better if we work togehter...


jfk EO-11110(Posted 2006) [#49]
Maybe some of you have problems downloading the zipfile cause your browsers suppress referrer information? I often seen this with free webspace providers.

BTW putting a copy of a dDLL to the userlibs folder is not such a good idea since you won't be able to release your program together with the userlibs folder (that is inside the blitz install folder!).
Copying the DLL to the folder of your main sourcecode file should work too.


Kalisme(Posted 2006) [#50]
Devils Child:
i guess you speak english very good, so please get skype on www.skype.com and lets talk about the shadow system. because maybee it is better if we work togehter...


erm.. I'd love to, but like I said, I'm using the Tafe computers for all my net browsing... So I don't get much time to upload, download and chat... currently I'm looking for a new house... so I don't get much time... hopefully no offence taken, I'd love to work with you.

I sent you an Email with an attachment of the newest download of my library. Hopefully it helps explain how it works.

Thankyou for everyone who has been showing intrest.
I'm going to be working on some better code demos for the system this weekend.
I've fixed the blurring...
Im pretty happy with the progress so far...
but it still needs work...
I REALLY need to learn about culling the faces that have normals pointing in the wrong direction...
hehe... I'm simple I guess


Naughty Alien(Posted 2006) [#51]
this is nice and easy to use lib Kalisme..I'll keep my eye on you :))

MD2 support will be nice.. :))


bytecode77(Posted 2006) [#52]
of course i dont take offense :)
well...as soon is i'm home, i will check out your code.

#btw: you are creating clipplanes NOT using clip planes.can you make it work with clip planes?
i remember that sswift was showing off his frustrum culling library in the forums...
maybee it is worth taking a look on it:)

cya!


Kalisme(Posted 2006) [#53]
I just posted a new entry to my worklog and my website...
a four part tutorial on placing my library into a scene.
here is the link:
http://www.filelodge.com/files/room17/427152/demonstration.zip

it uses that viking dwarf model that you find in most blitz tech demos....
hope that my tutorial helps.

Devils child:
I just wrote a note down to look into clip planes...
I hope I can get my head around it.


bytecode77(Posted 2006) [#54]
i hope so, too. because i didn't.

btw: i have been talking about that one:
http://blitzbasic.com/Community/posts.php?topic=52079

cu