Shadow for poor people
Posted By: Ralph
Shadow for poor people - 08/28/07 09:55
Hi everybody,
i work on a Script wich use the entity´s as shadow.
And now i finished it.
Here a little Screenshot...
Im not really a scripter and this is my first script contribut.

You can use it for free!!
If you find a bug or something like that post it!
The description is in the rar file.
Click here for download Sorry for my bad english.
Ralph
Posted By: badapple
Re: Shadow for poor people - 08/28/07 10:17
screen shot looks cool but i cant find the download from your link
i think you should make a little easier to find
Posted By: Ralph
Re: Shadow for poor people - 08/28/07 10:39
Here a new download link
Download here Ralph
Posted By: Ralph
Re: Shadow for poor people - 08/28/07 18:43
No criticsm or comments?
Posted By: sPlKe
Re: Shadow for poor people - 08/28/07 19:04
the idea is good, but the execution could be better. like softening the whole thing with blur...
Posted By: Ralph
Re: Shadow for poor people - 08/28/07 19:50
With A6 standart you can make a blur?? Thats new for me.... Okay next time i should write that i only have the standart version of A6.....
Ralph
Posted By: Matt_Coles
Re: Shadow for poor people - 08/29/07 09:32
nice contribution for standard users, a fake blur would be nice
Posted By: frazzle
Re: Shadow for poor people - 08/29/07 10:58
Indeed a nice and relative simple way to create shadows

Great effort !!
Cheers
Frazzle
Posted By: Ralph
Re: Shadow for poor people - 08/29/07 11:49
How can i make a fake blur??
Any ideas??
Ralph
Posted By: sPlKe
Re: Shadow for poor people - 08/29/07 12:15
i reccomend four or five layers of models, each a bit smalelr than the other one.. each with its own transparency setting. this will give an impression of a fake blur... but its a lot of testing to get it right, in sizes and transparencies i mean...
Posted By: Ralph
Re: Shadow for poor people - 08/29/07 13:14
Okay i have the same idea tomorrow but i thought it lagg to much with 4-5 entitys with shadows.
But i can try it...
Ralph
Posted By: Ralph
Re: Shadow for poor people - 08/29/07 13:42
Here the new Version.. and now with a little blur effect.
Download new Shadow Script here!! (29.8.2007) Ralph
Posted By: TSG_Torsten
Re: Shadow for poor people - 08/29/07 14:35
Sieht ja ganz nice aus, aber funktioniert es mit jedem Objekt gut und "biegt" sich der Schatten auch um Ecken? Weil dann würde selbst ich als Pro-User das verwenden

Gruß
TSGames
Posted By: Ralph
Re: Shadow for poor people - 08/29/07 14:57
Nein der Schatten verbiegt sich nicht diese Funktion soll nur für Anwender der Standart Version sein.
Aber es geht mit jedem Objekt egal wie komplex es ist, zumindest hab ich noch keins gefunden wo es nicht funktionierte.
MFG Ralph
Posted By: mpdeveloper_B
Re: Shadow for poor people - 08/29/07 15:00
getting better, does it also stretch the shadow according to the light?
Posted By: Ralph
Re: Shadow for poor people - 08/29/07 15:45
No the shadow doesnt stretch ...
This is only for people who has the standart version and doesnt like sprites.
So nothing for Com or Pro Users.
Ralph
Posted By: JetpackMonkey
Re: Shadow for poor people - 08/29/07 18:08
Aside from sprite shadows, is this the only other way to cast shadows on mdl geometry? Or is that possible now with stencil shadows?
Posted By: sPlKe
Re: Shadow for poor people - 08/29/07 21:27
thats possible with stencil shadows.. however, the A7 shadows are as ugly as the A6 shadows and as frame eatign as ever, so you might want to wait till the new rendering system?
anyway, i like the way it looks.. cool stuff^^
Posted By: mpdeveloper_B
Re: Shadow for poor people - 08/30/07 04:09
actually ralph, this is a great contribution for all editions, it is still better than a low framerate stencil shadow, which looks about the same as this, so, i think i'll use this alternative (A6.5 Com)
Posted By: Ralph
Re: Shadow for poor people - 08/30/07 15:27
Thanks for comments.
I work at a new dynamic Shadow at this moment... but this should cost much more time. I hope i can show first screens in 2 or 3 days....
Ralph
Posted By: Error014
Re: Shadow for poor people - 08/30/07 16:19
EDIT: Whoops. Sorry Ralph, I didn't expect that you'd do exactly
that. Well, I've removed the code for now. Rest assured though that deleting your code would be a great mistake, even with the code in this post

- I'm sure that your code is more than the quick solution I threw together. I'm looking forward to your code, then.
Posted By: Ralph
Re: Shadow for poor people - 08/30/07 17:06
Thank you i try the same at this moment and now i can delet it because you post the code....
Ralph
Posted By: JazzDude
Re: Shadow for poor people - 08/30/07 19:07
Nice contribution, thank you.
I would like to test it but I get an empty pointer error on "you" that I can't seem to solve.
Posted By: Ralph
Re: Shadow for poor people - 09/12/07 22:31
Soo da ich Heute keine Schule hatte, hab ich mich mal wieder rangesetzt und versucht den Schatten dynamischer zu machen und das Verhalten des Schattens echter zu machen also nicht nur als wenn die Lichtquelle über der Entity sitzt.
Ich hab aber noch ein paar kleine Probleme mit dem Winkel mal gucken vielleicht bekomm ich das ja bis zum Sonntag hin.

Hier mal ein Pic:
Wie gesagt der Winkel ist noch falsch und auch das Updaten des Schattens inGame funktioniert noch nicht so wie beim ersten Script genauso wie das das angleichen der Animation.

EDIT:
Achja das ganze läuft bis jetzt ohne Trace das wird wohl auch so bleiben außer bei der höhe später dann.

MFG Ralph
Posted By: Ralph
Re: Shadow for poor people - 09/13/07 20:47
So das mit dem Winkel hab ich hinbekommen.
Auch das animations abgleichen und refreshen.
Nur beim langziehen des Schattens wenn die Lichtquelle weiter weg ist will noch nicht so recht, aber hier erstmal ein neuer Screen.
Schreibt mal bitte ein paar Comments wie ihr ihn im mom so findet.

EDIT: Achja wenn der soweit fertig ist werd ich wohl mal ein Video uppen damit ihr den Schatten mal in Aktion sehen könnt...
MFG Ralph
Posted By: Anonymous
Re: Shadow for poor people - 09/13/07 22:14
Sieht auf den Screens nicht schlecht aus.
Kann man evtl. die Schattentransparenz anpassen - so wirkt er wie ein harter Schlagschatten. Mit Transparenz kann man ihn evtl. etwas weicher machen?
mercuryus
Posted By: sPlKe
Re: Shadow for poor people - 09/13/07 23:56
sagmal, die lichtquelle, ist die statisch????
Posted By: mpdeveloper_B
Re: Shadow for poor people - 09/14/07 04:26
wow ralph, really pro, actually, i'd like this one, how many lights does it support?
Posted By: Ralph
Re: Shadow for poor people - 09/14/07 05:34
@ mercuryus
ja das kommt daher das die Lichquelle sehr nahe an der Entity ist wenn ich sie InGame weiter weg bewege wird der Schatten transparenter
die lightrange hat auch sehr viel damit zu tun...

@sPIKE
Da ich als Lichtquelle ein Model verwende und das refreshen auch so ziemlich funtktioniert ist sie wohl nicht statisch... oder was meinst du?
Also ich kann sie InGame verschieben und die Schatten werden dem entsprechend angepasst.
@ Manslayer101
Okay really pro..

no not really actually. At the moment it work only with one light, but i try it with more after i finished the shadow code.
MFG Ralph
Posted By: Anonymous
Re: Shadow for poor people - 09/14/07 05:51
Ist auf jeden Fall besser als der non-stencil-Schatten der Engine und eine sehr schöne Arbeit!
mercuryus
Posted By: mpdeveloper_B
Re: Shadow for poor people - 09/14/07 06:08
Quote:
@ Manslayer101
Okay really pro..
no not really actually. At the moment it work only with one light, but i try it with more after i finished the shadow code.
MFG Ralph
i was simply complementing you
it is a nice code though, and actually i have a suggestion for it, rather than setting one shadow to work with multiple lights, make it create another shadow model when you come within lighting distance of a light, and it'll work just fine in theory
Posted By: Ralph
Re: Shadow for poor people - 09/14/07 06:40
Hier ein kleines filmchen.
Leider sind beim converten die blau und rot farben vertauscht worden.
Im moment musste ich den code für das langziehen des Schattens rausmachen da es ein paar probleme gab und ich gleich zur schule muss.
Der Download ist 36MB groß (sorry).
Download hereAbspielen kann man den Film irgendwie nur mit VLC Player auch dafür sorry werd nachher nach der Schule noch ein neuen machen.
MFG Ralph
Posted By: rvL_eXile
Re: Shadow for poor people - 09/14/07 07:48
Hi Ralph ,
sieht richtig gut aus was du da bist jetzt gemacht hast!
Probiere aber mal wie Mercuryus schon sagte die Schatten etwas Transparenter zu machen. Wie siehts eigentlich mit FPS aus? Was für eine haste auf deinem System?
cYa Sebastian
Posted By: Shadow969
Re: Shadow for poor people - 09/14/07 10:28
Wow Ralph, nice work. i have been doing similar stuff, but i haven't overcome the problem that vec_to_vertex deforms all entities using same model. Gonna look into your code. Good luck with finishing it!
Posted By: Ralph
Re: Shadow for poor people - 09/14/07 13:01
@ Shadow969
Use the Filecopy function like me:
str_cpy(modell_name," "); // clear string
str_cpy(modell_name2," "); // clear string2
str_for_entfile(modell_name,you); // get the name of the model
str_cat(modell_name2,modell_name); // copy the name to string2
str_trunc(modell_name2,4); // cut the last 4 letters (.mdl)
str_cat(modell_name2,"_schatten.mdl"); // add _schatten.mdl to string2
file_cpy(modell_name2,modell_name); // copy the model and give the new filename model_schatten.mdl
ent_create(model_name2,my.x,null);
@rvL_exile
In dem Video siehst du doch das der Schatten transparent wird sobald die Lichtquelle weiter weg ist. Probier das mal zuhause mit einer Lampe aus...
Wirst sehen um so näher es an der Quelle ist desto dunkler ist der Schatten auch.
MFG Ralph
Posted By: sPlKe
Re: Shadow for poor people - 09/14/07 13:01
okay dynamischer schatten... (dynamic light)
jetzt schon besser als conitecs dynamic shadow lösung für A6... definitiv ein hingucker wert...
edit: nevermind^^
Posted By: Ralph
Re: Shadow for poor people - 09/14/07 13:06
@ Spike
ob das so stimmt... bis jetzt geht das ganze aber nicht bei Mauern oder so also der Schatten bleibt bis jetzt nur auf dem Boden.

Aber dafür lass ich mich auch noch was einfallen.

MFG Ralph
Posted By: sPlKe
Re: Shadow for poor people - 09/14/07 13:39
Quote:
@ Spike
ob das so stimmt... bis jetzt geht das ganze aber nicht bei Mauern oder so also der Schatten bleibt bis jetzt nur auf dem Boden. 
Aber dafür lass ich mich auch noch was einfallen. 
MFG Ralph
wie der conitec dynamic schatten;-) nur dass sichd er NICHT mit den dynamsichen lichtern ändernt, und die schattenstärke ändert sicha uch nicht.. somit hast du schon die nase vorn... was du noch tun musst ist aber dafür zu sorgen, dass der schatten nicht dünkler wird wenn er sich selebr überlagert...
Posted By: Anonymous
Re: Shadow for poor people - 09/14/07 14:12
sieht schon sehr gut aus.Wie viel fps hast du?und was für ein system?
Posted By: Ralph
Re: Shadow for poor people - 09/14/07 17:18
AMD Athlon 64 Xs 3800+ (Dual Core)
1,5 GB RAM
Radeon X16000 (256mb)
Joah hoffe das Prog belügt mich jetzt nicht....
FPS laut fraps lag bei 250 (nicht bei der Video aufnahme)..
EDIT: jetzt gerade hab ich ein FPS von ~60 O_o ist der höher besser oder niedriger?
@sPIKE
Das mit dem überlagern macht mir schon lage sorgen ...

aber vll. hab ich da eine idee werd mich da gleich mal drann setze.
Ralph
Posted By: Helghast
Re: Shadow for poor people - 09/14/07 21:34
wow, looking great!
here's an idea though, maybe with a material, you could add a new alpha map that fades the shadow out at the end?
maybe, write it so that the whole thing fades the further away you get from a lamp...
would be a nice contribution.
regards,
Posted By: Ralph
Re: Shadow for poor people - 09/14/07 23:00
Sorry i had only the standart version, i think that cant work like i want with the material....
Ralph
Posted By: Helghast
Re: Shadow for poor people - 09/15/07 10:09
Quote:
Sorry i had only the standart version, i think that cant work like i want with the material....
Ralph
ah yeah, right XD sorry 'bout that.
but could you fade the whole mesh, depending on how far its away from a lightsource?
regards,
Posted By: Ralph
Re: Shadow for poor people - 09/15/07 10:36
Yes the shadow fade if the lightsource is far away.
If you download the video you can see it.
Posted By: Ralph
Re: Shadow for poor people - 09/15/07 17:25
Schlechte Nachrichten...
Durch einen Wurm auf meinem PC musste ich vorhin leider notgedrungen Formatieren, da ich aber nichts mehr machen konnte und kein 2ten Computer habe habe ich keine Back-Ups auch nicht von dem Schatten Script.. naja zumindest keins von Heute hab eins von vorgestern Mittag... das ich dann wieder auf aktuellen stand bringen muss.
Ich würde es gut finden wenn es jemand übersetzen könnte ins englische...
Ich bin nicht so Sprachbegabt..
MFG Ralph
Posted By: Xarthor
Re: Shadow for poor people - 09/15/07 17:35
Translation of Ralph's last post:
Quote:
Bad news...
Due to a virus I had to format my computer's hard-disc.
Because I wasn't able to do anything (virus) and I don't have a second computer, I also have no up-to-date backups of that shadow script.
However I have a backup from yesterday that I have to update.
Posted By: broozar
Re: Shadow for poor people - 09/16/07 00:26
ha... you're tellin us that you had a worm on your system, after we all downloaded your video o_0 now i know why i use Linux
shadows look good! it seems as if the blackness of the shadows is distance-based... is that right? it seems to be more transparent when the light source is far away.
what happens if you add a 2nd light source?
keep up the good work!
Posted By: Ralph
Re: Shadow for poor people - 09/16/07 20:29
Befor i have to format, this Script work only with one lightsource but i know how to add a second or third lightsource...
Yes the blackness of the shadow is distance based and lightrange.

INFO:
I start to work on the script, but it isnt easy to become the same result.
Actually i have a trace problem the shadow... but im tired so i cant find the mistake in the script...

MFG Ralph
Posted By: Ralph
Neues von der Front - 09/18/07 09:00
Klick here to view. Ein neues Video was die Animations übertragungs Probleme zeigt....
Posted By: Anonymous
Re: Neues von der Front - 09/18/07 13:39
wirkt noch ein bischen abgehackt aber sonst gute arbeit!!
Hey,
sieht echt klasse aus! Ich werd das ganze erstmal in mein Spiel einbauen, denn es is bis jetzt bereits besser als der .... der A6.
Also erst mal vielen vielen dank!
Em, BTW:
Kannst du das aktuelle Script nochmal auf deinen Webspace laden?
THX