Archiv verlassen und diese Seite im Standarddesign anzeigen : Crysis wave water tool
Majorpane
22.02.2008, 18:02
sind euch noch die vorabvideos von crysis bekannt? dort werden wellen auf dem ocean gezeigt, die zielgerichtet ihren lauf nahmen, große eindrucksvolle wellen, die man bei unserem aktuellen crysis nicht beobachten kann, zwar sind im editor wellenlinien angedeutet, jedoch ohne funktion. mich wuerde interessieren ob ihr euch schonmal mit dem thema auseinandergesetzt habt, bzw ob ihr auch zu einer lösung des fehlers gekommen seid. ich fuer meinen teil denke dass es ein fehlendes material ist dass man dann nur noch den wellen zuzuordnen muesse.
naja aber meine meinung zaehlt ja erstmal nicht jetzt seid ihr gefragt^^
MFG Julez
bl4ckhawk5
22.02.2008, 18:05
sind euch noch die vorabvideos von crysis bekannt? dort werden wellen auf dem ocean gezeigt, die zielgerichtet ihren lauf nahmen, große eindrucksvolle wellen, die man bei unserem aktuellen crysis nicht beobachten kann, zwar sind im editor wellenlinien angedeutet, jedoch ohne funktion. mich wuerde interessieren ob ihr euch schonmal mit dem thema auseinandergesetzt habt, bzw ob ihr auch zu einer lösung des fehlers gekommen seid. ich fuer meinen teil denke dass es ein fehlendes material ist dass man dann nur noch den wellen zuzuordnen muesse.
naja aber meine meinung zaehlt ja erstmal nicht jetzt seid ihr gefragt^^
MFG Julez
also ich hab auch schon mal ewig getestet wellen zu machen aber da passiert nix
also einfach nur ein fehlendes material denk ich nicht
MfG
bl4ckhawk5
Majorpane
23.02.2008, 12:31
vllt kann man sich ja die maps für die wellen auf irgendeinem anderen spiel laden, oder selbst erstellen, aber ich glaube die wellentexturen muessten soweit noch vorhanden sein, die wellen linien sind ja ebenso noch im editor vorhanden.
MFG Julez
Mykill_Myers
23.02.2008, 13:11
da passiert schon was ,du kannst die Größe ändern,die Form etc,aber es fehlt der richtige Shader um es auch ansehnlich zu machen.
Majorpane
23.02.2008, 16:52
ja man kann die "rauheit" der see aendern, jedoch aber nicht die wellen ansich. :( sooo schade, und ich hab mich immer gefragt was an crysis gefehlt hat^^ die wellen :P
ich habe auch schon viel rumprobiert, aber wirklich tolle Wellen bekommt man leider nicht hin. Der Ocean-Shader ist ansich eigentlich sehr gut, aber warum wurden so wichtige Sachen wie Schaumkronen und Brandung weggelassen.
Schonmal jemand das Wasser in Far Cry Preditor gesehen? Warum hat man das bei Crysis nicht auch so, oder so ähnlich gemacht.
Majorpane
23.02.2008, 17:05
genau das meine ich, das schäumen, und branden der wellen sah in den trailern immer BEEINDRUCKEND aus, und jetzt sieht das wenn man von oben auf den ocean guggt einfach nur wie eine einöde aus. also was das angeht haben die entwickler keinen großen sprung in der wassersimulation gemacht.
ich finde auch dass es irgendwie ein sehr krasser Kontrast zum Rest der Grafik ist. Ich laufe beispielsweise am Strand entlang und sehe super detailierte Palmen, gestochen scharfe, zum teil dreidimensional wirkende Sandtexturen in verschiednen nässe-graden und wenn ich dann aufs Meer blicke, wabert da nur die blaue Masse vor sich hin. Die Brandung fehlt wirklich.
bl4ckhawk5
23.02.2008, 17:35
vllt. kommt ja irgendwann mal ein wellenmod oder so raus.
aber WÄRE cool wenn richtige Wellen und so mim Patch 1.3 dazukommen
MfG
also für die brandung habe ich einen partikeleffekt genommen, um die gischt oder wellen bei felsen oder klippen zu realisieren.
sind zwar auch keine richtige wellen, aber immerhin besser als nix.
http://www.abload.de/thumb/screenshot0014gpn.jpg (http://www.abload.de/image.php?img=screenshot0014gpn.jpg)http://www.abload.de/thumb/screenshot00478sj.jpg (http://www.abload.de/image.php?img=screenshot00478sj.jpg)
Majorpane
24.02.2008, 21:11
wisst ihr denn an wen man sich wenden koennte um irgendsowas mal in die wege zu leiten? n persönlicher brief an cevat waer ja laecherlich aber an die company, vllt gibts ja sowas wie "persönliche verbesserungsvorschlage", wär cool wenn ihr mir weiterhelfen koenntet. ich bin auch schon immer fast den ganzen tag am searchen. bin mir aber nicht immer sicher, ob das wirklich quellen sind, die meine anfragen auch weiterleiten.
MFG julez
ich find das Game zwar sch***** aber das Wasser ist meiner Meinung nach besser als bei Crysis.
So, nur noch einen Tick besser hatte ich es damals für Crysis erhofft. Naja leider fehlanzeige.
http://www.gametrailers.com/player/usermovies/19846.html
Majorpane
25.02.2008, 13:52
alta das wasser sieht 20.000 mal besser aus als bei crysis, obwohl dieses auch wiederum nur eine normale wasserbumpmap ist glaub ich. trotzdem sieht in der xbox fassung der rest kacke aus^^
MFG julez
Majorpane
17.03.2008, 17:03
okay ich habe mal einen von crysis abgeordneten befragt per e-mail. meine fragen waren ob diese wellen implementiert werden, bzw ob sie ueberhaupt noch vorhanden sind. die e-mail ging an martin mittring, er wiederum stellte meine fragen an einen dafuer zustaendigen programmierer. martins e-mail sah dann heute als sie endlich in meinem mailpostfach lag so aus:
Hallo,
Sorry I wasn't responding that quickly - I was very busy and you email got almost lost in my inbox.
The water waves / rolling waves have been disabled in last minute before shipping the game as multiple code elements haven't been finished working the waves. To get it fully working rendering, physics, player movement, boat movement, camera clipping, underwater rendering, sound, maybe even AI is affected.
I asked the responsible programmer and he said it's deactivated and would
require some shader changes and tweaks. I'm sorry but I guess you won't see
in Crysis but we don't want drop it so it will remain CryEngine and we might reactivate it again.
fast alle hoffnungen sind zerstört :'( aber vllt hab ich die programmierer ja damit mal angeregt, wie er zum schluss erwaeht "we don't want drop it","we might reactivate it again"
MFG julez
THX gut zu wissen:cry:
MFG
Dragon01
17.03.2008, 18:02
Hab auch mal ein wenig rumgedocktert, und viele einstellungen versuch bis ich plötzlich das rausbekamm. Aber seht selbst :-P
3154
das sieht wirklich nicht übel aus, vorallem hat man jetzt mal WELLEN ^^ :P xD, am besten wäre das wasser von Bioshock meiner meinung nach :) das ist einfach am detailreichesten auch die wellen am anfang, für die die das spiel kennen...
Dragon01
17.03.2008, 18:42
das sieht wirklich nicht übel aus, vorallem hat man jetzt mal WELLEN ^^ :P xD, am besten wäre das wasser von Bioshock meiner meinung nach :) das ist einfach am detailreichesten auch die wellen am anfang, für die die das spiel kennen...
hmmm. kann man mit Bioshock eigendlich nicht vergleichen :d_eek:
obwohl es ein tolles Game ist, die Wellen sind klein laufen über kreutz und überschneiden sich dan. Bei Crysis hast du eine richtige Dynamic in den wellen. Versuch mal die einstellungen aus den Sreenshot dann siehst du den unteschied. :wink:
dragon01, welche map ist das?
Paul11.10
17.03.2008, 19:46
ehm welches material hast du benutzt?
Dragon01
17.03.2008, 19:50
Die gibts noch nicht, erst mal mach meine Map DragonBeach fertig und dan erst die Dragon Map. Aber schön das sie dir gefällt :biggrin:. Hier noch mal ein kleiner vorgeschmack
bl4ckhawk5
17.03.2008, 22:46
neeeeeeeeeeeeeeeeeeeeein !!!
ich hab grad voll die coolen Wellen gemacht und dann wollte ich noch die ToD-Settings verändern damit sie noch besser aussehen und ich hab dann ausversehen "sun shafts" auf ganz hoch gestellt.
Tja nicht nur der Editor sondern auch mein PC hat sich aufgehängt und jetzt ist alles weg.
Ich schau mal ob ich sie nochmal so gut hinbekomme, wenn ja stell ich ein Screenshot rein
MfG
bl4ckhawk5
so ein wave tool gibt es doch wenn ich mich nicht irre... *EditorStartUmNachzuschauen*
joa, misc->water wave
oder macht das was anderes? wenn ja, was?
Mann kann die Wellen bei Terrain / Environment ändern.
Da müsste irgendwo Ozean Animation stehen.
Da kann man des einstellen
bumpelwumpel
17.03.2008, 23:56
Das sind Bilder aus der Map Dream Experimental.
http://www.abload.de/thumb/crysis2008-03-1723-4kpz.png (http://www.abload.de/image.php?img=crysis2008-03-1723-4kpz.png) http://www.abload.de/thumb/crysis2008-03-1723-5poo.png (http://www.abload.de/image.php?img=crysis2008-03-1723-5poo.png) http://www.abload.de/thumb/crysis2008-03-1723-5eqx.png (http://www.abload.de/image.php?img=crysis2008-03-1723-5eqx.png) http://www.abload.de/thumb/crysis2008-03-1723-5jhb.png (http://www.abload.de/image.php?img=crysis2008-03-1723-5jhb.png) http://www.abload.de/thumb/crysis2008-03-1723-5h98.png (http://www.abload.de/image.php?img=crysis2008-03-1723-5h98.png)
Ich finde dort sieht das Wasser richtig gut aus.
Die gibts noch nicht, erst mal mach meine Map DragonBeach fertig und dan erst die Dragon Map. Aber schön das sie dir gefällt :biggrin:. Hier noch mal ein kleiner vorgeschmack
bin besonders daren interessiert wie du das wasser so hinbekommen hast. Alleine die Environment-Einstellungen bringen das nicht so. Hast du das Material verändert, wenn ja welches?
Möchte das Wasser gerne auch mal so bei mir sehen in bewegten Bildern.
Dragon01
18.03.2008, 00:12
bin besonders daren interessiert wie du das wasser so hinbekommen hast. Alleine die Environment-Einstellungen bringen das nicht so. Hast du das Material verändert, wenn ja welches?
Möchte das Wasser gerne auch mal so bei mir sehen in bewegten Bildern.
Habe das Material ocean_big _waves aus dem Material Editor mit den daten zum Bild eingegeben porbier mal aus :razz:
bl4ckhawk5
18.03.2008, 00:29
Wellen einfach nur mit Environment verändert: (sind zwar noch nicht so schön aber besser wie keine)
http://www.abload.de/thumb/water1j7l.jpg (http://www.abload.de/image.php?img=water1j7l.jpg)
http://www.abload.de/thumb/water2t7u.jpg (http://www.abload.de/image.php?img=water2t7u.jpg)
Level: Village
MfG
Dragon01
18.03.2008, 00:39
Wellen einfach nur mit Environment verändert: (sind zwar noch nicht so schön aber besser wie keine)
http://www.abload.de/thumb/water1j7l.jpg (http://www.abload.de/image.php?img=water1j7l.jpg)
http://www.abload.de/thumb/water2t7u.jpg (http://www.abload.de/image.php?img=water2t7u.jpg)
Level: Village
MfG
benutze mal die einstellungen im Terrain Environment Ocean Animation
WindSpeed 12
WaveSpeed 0,01
WaveAmount 0,02
WaveSize 13
und :biggrin:
bl4ckhawk5
18.03.2008, 11:41
find ich nicht so toll weil dann die Wellen an der selben stelle bleiben und sich nur die "Wasseroberfläche" bewegt.
€dit: können wir ja gleich einen Wave-Contest machen. Wer macht die schönsten Wellen.^^
MfG
DasTeufelskind
18.03.2008, 12:08
Hey Leute es gibt die Option im Editor (schon mal erwähnt auf seite 3)
Rollupbar > Terrain > Environment > OceanAnimation,
mit dem Tool kann man richtige lineare Wellen die sich auf die Küste zubewegen machen. Jedoch muss man vorher in der Konsole ein Befehl eingeben (siehe unten)...jedenfalls gibt es dann eine richtige Welle aber einfach nur schwarz ohne Textur:D Aber vielleicht kann das ja einer von euch super Progis richten?
I did it work, but with no texture and water appeareace.
http://img402.imageshack.us/img402/1787/editor2007110800270334cvs3.jpg
Befehl im Editor eingeben:
e_water_waves 1
Habe das Material ocean_big _waves aus dem Material Editor mit den daten zum Bild eingegeben porbier mal aus :razz:
wie bekommst du denn das material geladen? den materaleditor bekomme ich auch auf aber irgendwie krieg ich das "ocean_big_waves" material nicht auf den ocean
bl4ckhawk5
18.03.2008, 12:38
hab wieder neue Wellen die sehen schon nicht schlecht aus finde ich.
Das mit dem Befehl werd ich mal Testen
http://www.abload.de/thumb/waves1rto.jpg (http://www.abload.de/image.php?img=waves1rto.jpg)
http://www.abload.de/thumb/waves294p.jpg (http://www.abload.de/image.php?img=waves294p.jpg)
material kann man nur drauf tun (ist bei mir zumindest so) indem du eins auswählst
z.b. unter Ocean, ocean_big_waves
jetzt steht unten vom Fenster der Pfad
z.b. Materials/Ocean/ocean_big_waves
und den schreibst du dann in die spalte
Achtung:
ich dreh mich immer so hin das ich wen OCean nicht sehe wenn ich das Material verändere weil sich mein Laptop sonst aufhängt^^
MfG
Das sind meine waves nachdem ich ein wenig dran rumgespielt habe:p
Dragon01
18.03.2008, 12:59
Das ist garnicht so schwer, gehe einfach im Terrain Environment Ocean
unter Material, öffne dazu den Materialeditor wähle Materials Ocean_big_Wave aus.
In der RollupBar unter Material ist vor dem /... ein kleiner button <- einfach drücken und schon wird die Datei zugewiesen ;-)
Killuminati91
18.03.2008, 13:20
Wieso postet ihr hier irgendwelche Screenshots? Man kriegt das nich ohne das Tool hin.
http://cache.kotaku.com/assets/resources/2006/10/crysiscomparison.jpg
Hier nochmal für alle die es immernoch nich begriffen haben. Im unteren Bild links
die Schaumkronen - DAS macht das Water Wave tool
http://img156.imageshack.us/img156/2370/78667165jh1.jpg
http://img156.imageshack.us/img156/1553/23619457ji1.jpg
bl4ckhawk5
18.03.2008, 14:32
und weißt du vllt. wie man die macht bzw. wo die "Textur" oder so zu finden ist??
das einzige was ich hinbekomm ist eine sich bewegende fläche oder das hier^^:
http://www.abload.de/thumb/lolwavebr2.jpg (http://www.abload.de/image.php?img=lolwavebr2.jpg)
und das dieht ja wohl wirklich nciht nach welle aus^^
MfG
Wackelpudding as wasser FTW! xD
@ Killuminati91
Wie funktioniert denn das Wave-tool. Kannst du dafür bitte ein kurzes Tutorial schreiben?
Wäre wirklich nett.
bl4ckhawk5
19.03.2008, 15:00
ich hab ne Welle geschafft aber dann war der Ozean einfach nur blau ohne textur und Wellen waren auf dem Ozean dann auch nicht. Und meine 1 Welle war auch nicht die schönste^^
Dragon01
19.03.2008, 15:21
Habe das auch mal probiert, bekamm aber immer nur eine schwarze Textur die sich auf die Küste zubewegt. :( Weiß jemand welche Textur man zuweisen muß :?:
bl4ckhawk5
19.03.2008, 16:01
die textur für die wellen weiß ich aber trotzdem bleibt es schwarz
DasTeufelskind
24.03.2008, 11:43
Ach ja Leute habe ganze vergessen, das ganze geht nur mit DX10 oder mit very high patch, das deutet darauf hin das Crytek das ganze vielleicht mal nachliefert! (Wäre auch in Crysis 2 denkbar)
Majorpane
25.03.2008, 22:17
vielen dank erstmal an dasteufelskind fuer den konsolenbefehl^^
jetzt kann man wenigstens eine homogene welle erkennen ;)
jedoch fehlt uns die dazugehörige programmierung, dass die wellen sich aufbäumen. aber das stand ja alles soweit in der e-mail die ich von martin bekommen habe. wahrscheinlich ist dieses auch nicht mit dx10 zu erreichen da die programmierung die selbe ist. die textur, die dazugehören sind wahrscheinlich irgendwelche ocean_wave... materials. eig muessten sie ja die gleiche textur haben wie der ozean nur mit weißen schaumkronen oben drauf^^.
hoffentlich wird uns ein solcher patch bereitgestellt. und ich hoffe auch zusaetztlich, dass die wellen mit der cryengine 2 realisiert werden, obwohl ich in soner .pdf über die cryengine 2 nichts davon gelesen habe. es gab viele probleme mit der performance und der KI die druch die wellen beeinflusst wurden.
aber crytek sollte dieses gimmik doch mit einem patch fuer enthusiasten bereitstellen und eine spezielle auswahlmöglichkeit in den grafikeinstellungen programmieren, um den lowend systemen auch die chance zu gewaehrleisten zu spielen ;)
vllt schick ich in ein paar wochen noch eine e-mail an crytek, um denen mal ein wenig durck zu machen ;) vllt hilfts.
MFG Julez
Smirgoil
26.03.2008, 15:12
jo finde ich auch schade mit den wellen....crytek hätte es wenigstens für mapper drinlassen können...wenn es die KI beeinflusst hätten sie nur die waves aus´m SP entfernen können...naja
müssten sich normale Wellen nicht auf diese Weise realisieren lassen? Wie genau das funktioniert weiß ich natürlich nicht... :sad:
http://www.youtube.com/watch?v=s_on5-zbGR4
NoName07
25.05.2008, 19:00
Das ist doch schonmal interessant...
Hab mir die schwarze Welle auch mal im Editor angeschaut...
Ich glaube, früher oder später bekommts jemand hin :P
hier was neues, jetzt sind wenigstens die Wellen nicht mehr schwarz^^
http://crymod.com/thread.php?postid=308950#post308950
Wie genau geht das mit dem Wave tool ?
Kenne mich kein Bisschen damit aus ?
naja der TRead ist bissch komisch benannt^^
in der Rollupbar/Misc/ kannst du jedenfalls mit waterwave Wellen machen so wie du Strassen macht
http://www.youtube.com/watch?v=EPM6cw_62CE&eurl
Dragon01
03.08.2008, 20:06
http://www.youtube.com/watch?v=EPM6cw_62CE&eurl
Coool :-D, und wieß man schon wies geht ?
Das sind Partikeleffekte, die mit Hilfe von nem Trackview bewegt werden. Mehr weis ich leider ach net.
Das Waterwavetool ist ja leider immernoch buggy :(
Und wie es aussieht gibts bei Warhead auch keine richtigen Wellen. Ich frag mich warum Crytek nicht einfach jemand dafür ansetzt? Sowas wäre ein Feature mehr...was kann daran schlecht sein? ;)
das Video ist doch bestimmt ein Fake:roll:
ok doch nicht wurde ja auf Crymod gepostet:D
Die Welle ansich sieht ja mal klasse aus.
Allerdings hat er die Windgeschwindigkeit(und damit auch die Geschwindigkeit des Wassers)so hoch gestellt, daß es aussieht als würde die Insel(auf der er steht) mit 20 Knoten durchs Wasser heitzen,fehlt nur noch die Bugwelle.
mfg
ich fände es auch klasse, wenn's endlich funktionieren würde,
warum nicht? weil's den durchschnitt Deppen nicht interessiert!?
Dragon01
14.01.2009, 22:01
Wie siehts eigendlich aus, gibt es irgend was neues vom Wavewater tool :?:
Hat da irgenjemand eine neue info.
@ Dragon01
Schaue mal hier:
http://www.crymod.com/thread.php?threadid=42044&hilight=water+wave
Könnte dir weiterhelfen. ;)
wow hier sieht man die wellen in crysis,
http://www.youtube.com/watch?v=x8mM0Pj20nw&feature=related
ab 0:14-0:38
man die sehen echt geil aus, schade das die es nicht geschafft haben das ins hauptspiel einzubauen. das wäre noch das i-pünkchen oben drauf gewesen.
wie er versucht den Hubschrauber zu treffen :lol:
wenn du das von 1:15-3:33 meinst, das hängt damit zusammen das der die ki damals (wurde glaub auf irgend na messe vorgestellt dieser kleine teil) viel zu gut war und die raketen in der luft abgefangen hat.
XcorpioN
19.05.2009, 16:00
Ich glaub, lag auch einfach daran das der nicht richtig gezielt hat (immer son bisschen nach rechts verzogen)
Allgemein sahen die Arme da noch irgendwie krummer aus und es sah so aus, als hätten die arme einen kleineren eindruck gemacht.
Aber die Wellen sahen echt geil aus, also versteh ich nicht wieso die nicht mehr in solcher Form vorhanden sind
HeyHey91
19.05.2009, 17:58
die wellen waren einfach nur geil, aber auch der Realismus von manchen Versionen war der hammer, die Tatsache, dass man in Leichen aber reinschießen kann oder realistische Blut Spritzer mussten sie wohl rausnehmen, die Wellen kannst du teilweise noch erstellen, das einzig doofe, es sieht nicht wirklich gut aus, das automatische zurückziehen kann man auch vergessen.
naja was solls, villeicht in Crysis 2, die Wellen ziehen aber mit Sicherheit auch ordentlich Power
das spiel zieht doch sowieso schon sau viel, da kommts aufdie paar wellen nich an :D
aber schade ist einfach dass das wirklich was is was es in keinem anderen game gibt wie es so vieles gab was es bei release noch bei keinem anderen game gab. wäre einfach wieder ne 1+ für crytek gewesen wenn die wellen dabei gewesen wären, hoffe einfach die kommen noch mit irgendnem patch oder eben in crysis 2.
und das mit den leichen un dem blut is mir auch aufgefallen, das sieht in dem vid einfach viel geiler aus ... kack jugendschutz -.- aber das is auch nicht das wichtigste ^^
Black_Death
19.05.2009, 20:50
wow hier sieht man die wellen in crysis,
http://www.youtube.com/watch?v=x8mM0Pj20nw&feature=related
ab 0:14-0:38
man die sehen echt geil aus, schade das die es nicht geschafft haben das ins hauptspiel einzubauen. das wäre noch das i-pünkchen oben drauf gewesen.
Aber man kann doch solche wellen selber mit dem Wave tool erstellen oder?
DAnn wäre sowas doch auch "möglich".
HeyHey91
19.05.2009, 20:52
die Welle selber wie sie sich aufbaut kannste machen, es gibt aber teils massive schwierigkeiten, ich hab bei der Map Island rumgespielt und ne große Breite welle erzeugt, wenn das Teil auf so ne Sandbank trifft, dann wird sie ganz langsam, bis sie dann fast das Ende erreicht hat, dann isse wieder genauso schnell wie vorher. Sieht richtig lustig aus
...nein nicht solche.
Man kann lediglich eine platte Fläche erstellen welche sich durch das Wasser bewegt und diese mit einem Material versehen was aber ziemlich schwach aussieht.
Die Wellen die man im Video sieht existieren so nicht mehr. Leider.
HeyHey91
19.05.2009, 21:05
nein, du kannst die Wellen bis zu 10 Meter auftürmen, dabei gibts aber das Problem, dass das Teil dauernd seine Form ändert, bis 2 Meter gehts aber relativ gut, solang man die amount werte relativ niedrig lässt.
so siehts bei 10 Meter aus, die eine Seite drückts unter die Wasseroberfläche, währen die andere oben ist.
http://www.bilder-upload.eu/thumb/U1e3rOU2PzBxa9y.jpg (http://www.bilder-upload.eu/show.php?file=U1e3rOU2PzBxa9y.jpg)
http://www.bilder-upload.eu/thumb/SYZSQIlrmUsIZeQ.jpg (http://www.bilder-upload.eu/show.php?file=SYZSQIlrmUsIZeQ.jpg)
die Shader die Leute gemacht haben sehen tatsächlich bei 2 Meter höhe relativ gut aus, sind aber zu sehr durchsichtig, was man aber ganz gut mit etwas bläulicher machen weg retoschieren kann.
HeyHey91
19.05.2009, 22:30
ich hab mal wieder ein bisschen mit rumgespielt
hier mal ein paar Bilder, man muss aber genau hinschauen um die Wellen zu erkennen, ich kann nur soviel sagen, die Wellen richten sich exakt nach dem Boden und werden größer, wenn er ansteigt, sie brechen sich sogar und ziehen sich zurück
hier mal ein paar neue Fotos, dieses mal mit Shader
unten findet ihr auch die Einstellungen und ein kleines Video
http://www.bilderupload.de/bild.php/2,25583,editor2009051922322335D2V6J.jpg (http://www.bilderupload.de/bild.php/25583,editor2009051922322335D2V6J.jpg)
http://www.bilderupload.de/bild.php/2,25584,editor20090519223225131PY7Y.jpg (http://www.bilderupload.de/bild.php/25584,editor20090519223225131PY7Y.jpg)
http://www.bilderupload.de/bild.php/2,25589,200905192301536NCQX.jpg (http://www.bilderupload.de/bild.php/25589,200905192301536NCQX.jpg)
http://www.bilderupload.de/bild.php/2,25590,200905192302161Q3ED.jpg (http://www.bilderupload.de/bild.php/25590,200905192302161Q3ED.jpg)
http://www.bilderupload.de/bild.php/2,25585,20090519224903BBF51.jpg (http://www.bilderupload.de/bild.php/25585,20090519224903BBF51.jpg)
hier mein Video
http://www.youtube.com/watch?v=du4Q2tR6XVE
eigentlich ist das Wave Tool fast funktionsfähig, es fehlen nur die richtigen Shader von Crytec, so eine Welle zieht aber verdammt viel Leistung, wenn man sich in ihr befindet.
HeyHey91
19.05.2009, 22:42
hi, sorry für die verspätung aber youtube war lahm, das sind die Shader die ich mir mal irgendwo runtergeladen hab, war sogar glaub ich hier
hier das Video, da sieht man die Welle auch
du4Q2tR6XVE (http://www.youtube.com/watch?v=du4Q2tR6XVE)
http://www.youtube.com/watch?v=du4Q2tR6XVE
hätt ich ein besseres Material gehabt, wär die Welle nicht so heftig durchsichtig gewesen, die Wellenphysik funktioniert aber relativ gut
sorry, dass ich nicht die Edit funktion genommen hab
hey heyhey91,
das hast du bis jetzt schon gut hinbekommen.
Sehen schon richtig geil aus die Wellen. Bleib dran!
HeyHey91
19.05.2009, 22:54
wär cool, wenn jemand ordentliche Shader programmieren könnte oder die Texturen so hinbiegen könnte
Dragon01
19.05.2009, 23:15
Sehr gut :razz:, und wie hast dust bis jetzt hinbekommen ?
HeyHey91
20.05.2009, 14:33
macht die Wellen an, die Settings die ich genommen hab seht ihr auf den Bildern, wer Wellen will, die sich möglichst wenig in der Höhe ändern muss den Boden glätten, die richten sich perfekt nach der Bodenkontur.
Die Shader hab ich mir mal irgendwo gezogen, sry, schon zu lang her, wer sie aber findet, wär cool, wenn ihr den Link hier reinstellt
ich muss jetzt aber doch nochmal fragen welches material du dafür benutzt hast.
wenn ich oceanwaves_ddn.dds aus wähle bleibt die Welle immernoch schwarz
HeyHey91
20.05.2009, 17:03
wenn ihr mir sagt, wie man hier was hochladen kann, dann lad ich sie hoch
ich hab mir vor langer Zeit mal ne .cfx datei runtergeladen, hier mal der Code, muss leider 2 Antworten machen, da das Teil zuviele Zeichen hat
/// Uber-mess , cleanup whenever possible..
#include "Common.cfi"
#include "ModificatorVT.cfi"
#include "ModificatorTC.cfi"
#include "ShadeLib.cfi"
float Script : STANDARDSGLOBAL
<
string Script =
"Public;"
"NoPreview;"
"LocalConstants;"
#if %WAVE_DECAL
//"ForceZpass;"
"ForceDrawAfterWater;"
#endif
"ShaderDrawType = General;"
"ShaderType = Water;"
"StartTecnique = e_water_ocean_fft ? Water : WaterFFT;";
>;
/// Un-Tweakables //////////////////////
float4x4 mViewProj : PI_Composite; // view projection matrix
float4x4 mViewProjI : PB_UnProjMatrix; // invert( view projection matrix )
float4x4 mWorldT : PI_TransObjMatrix;
float4x4 mCamera : PB_CameraMatrix_I;
float4 g_fWaterLevel : PB_WaterLevel;
float4x4 mReflProj : PI_TexMatrix
<
string 'Sampler' (envMapSamplerRefl)
>;
// water waves parameters
float4 OceanParams0 = { PI_FromObject[0], PI_FromObject[1], PI_FromObject[2], PI_FromObject[3] };
float4 OceanParams1 = { PI_FromObject[4], PI_FromObject[5], PI_FromObject[6], PI_FromObject[7] };
// x: lifetime, y: curr lifetime, z: distance to terrain height, w: view distance attenuation
float4 WaveParams0 = { PI_FromObject[8], PI_FromObject[9], PI_FromObject[10], PI_FromObject[11] };
// x: current wave height, yzw unused
float4 WaveParams1 = { PI_FromObject[12], PI_FromObject[13], PI_FromObject[14], PI_FromObject[15] };
// Tweakables /////////////////
/*
float BigWavesScale = 2
float SmallWavesScale = BigWavesScale
float FresnelBias = 0
float SunShinePow = 128
*/
float SoftIntersectionFactor
<
psregister = PS_REG_PM_4.x;
string UIHelp = "Controls softness of water surface intersection with other opaque scene geometry";
string UIName = "Soft intersection factor";
string UIWidget = "slider";
float UIMin = 0.0;
float UIMax = 10.0;
float UIStep = 0.1;
> = 1.0;
// General procedural wind support
#if %WAVE_DECAL
float MaxAnimAmplitudeWav0
<
vsregister = VS_REG_PM_4.y;
string UIName = "Max animation amplitude wave0";
string UIWidget = "slider";
float UIMin = 0.0;
float UIMax = 10.0;
float UIStep = 0.001;
> = 1.0;
float MaxAnimAmplitudeWav1
<
vsregister = VS_REG_PM_4.z;
string UIHelp = "Set cloth animation amplitude";
string UIName = "Max animation amplitude wave1";
string UIWidget = "slider";
float UIMin = 0.0;
float UIMax = 10.0;
float UIStep = 0.001;
> = 1.0;
#endif
#if %FAKE_CAMERA_MOVEMENT
float FakeCameraSpeed
<
vsregister = VS_REG_PM_4.w;
string UIHelp = "Set fake camera speed";
string UIName = "Fake camera speed";
string UIWidget = "slider";
float UIMin = -10.0;
float UIMax = 10.0;
float UIStep = 0.001;
> = 0.0;
#endif
float ReflectionAmount
<
psregister = PS_REG_PM_4.z;
string UIHelp = "Set reflection scale";
string UIName = "Reflection Amount";
string UIWidget = "slider";
float UIMin = 0.0;
float UIMax = 10.0;
float UIStep = 0.001;
> = 0.5;
float WhiteCapsAmount
<
psregister = PS_REG_PM_4.w;
string UIHelp = "Set white caps";
string UIName = "WhiteCaps Amount";
string UIWidget = "slider";
float UIMin = 0.0;
float UIMax = 10.0;
float UIStep = 0.001;
> = 0.75;
float SunMultiplier
<
psregister = PS_REG_PM_5.x;
string UIName = "Sun multiplier";
string UIWidget = "slider";
float UIMin = 0.0;
float UIMax = 32.0;
float UIStep = 0.001;
> = 1.0;
/*
float SunGlintMultiplier = 1.5
float SunGlintThreshold = 1
*/
float FresnelScale
<
psregister = PS_REG_PM_5.w;
string UIName = "Fresnel scale";
string UIWidget = "slider";
float UIMin = 0;
float UIMax = 32.0;
float UIStep = 0.05;
> = 1.0;
////////////////////////////////////////////////////////////////
sampler2D fftTexSampler : register(s0);
sampler2D envMapSamplerRefl : register(s0)
<
string Script =
"RenderOrder=PreProcess;"
"ProcessOrder=WaterReflection;"
"RenderCamera=WaterPlaneReflected;"
"RenderTarget_IDPool = _RT2D_WATER_ID;"
"RenderTarget_Width=$ScreenSize;"
"RenderTarget_Height=$ScreenSize;"
"RenderTarget_UpdateType=WaterReflect;"
"RenderDepthStencilTarget=DepthBuffer;"
"ClearSetColor=Black;"
"ClearSetDepth=1;"
"ClearTarget=Color;"
"ClearTarget=Depth;";
>
{
Texture = $RT_2D;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
};
sampler2D envMapSamplerRefr : register(s1)
{
Texture = $SceneTarget;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = POINT;
AddressU = Clamp;
AddressV = Clamp;
};
// Anisotropic not working ..
sampler2D oceanBumpMapSampler
{
Texture = $Bump;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = POINT;
AddressU = Wrap;
AddressV = Wrap;
};
sampler2D sceneDepthSampler
{
Texture = $ZTarget;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = POINT;
AddressU = Clamp;
AddressV = Clamp;
};
// Anisotropic not working ..
sampler2D foamSampler
{
Texture = textures/defaults/water_foam.dds; //_02.dds;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = POINT;
AddressU = Wrap;
AddressV = Wrap;
};
sampler2D waterGlossMapSampler
{
Texture = Textures/defaults/water_gloss.dds;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Wrap;
AddressV = Wrap;
};
sampler2D foamSamplerSec
{
Texture = Textures/defaults/water_foam_02.dds;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = POINT;
AddressU = Wrap;
AddressV = Wrap;
};
sampler2D waveSampler
{
Texture = textures/defaults/water_wave.dds;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = LINEAR;
AddressU = Wrap;
AddressV = Clamp;
};
sampler2D waveBumpSampler
{
Texture = textures/defaults/water_wave_ddn.dds;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = LINEAR;
AddressU = Wrap;
AddressV = Clamp;
};
/////////////////////////////
struct a2vWater
{
float4 Position : POSITION;
#if %WAVE_DECAL
float2 baseTC : TEXCOORDN;
float4 Color : COLOR0;
#endif
};
//simple sin approx for 4 at a time
float4 _ApproxSine4(float4 arg)
{
return sin(arg); //SmoothSignedTriangleWave(frac(arg)*2-1 + 0.5);
}
//simple sin approx for 4 at a time
float4 _ApproxCosine4(float4 arg)
{
return sin(arg); //return SmoothSignedTriangleWave(frac(arg)*2-1);
}
struct v2fWater
{
float4 Position : POSITION; // in projection space
float4 baseTC : TEXCOORDN; // foam coordinates
float4 Wave0 : TEXCOORDN; // wz if next frequency wave x2
float4 Wave1 : TEXCOORDN; // wz if next frequency wave x2
float4 screenProj : TEXCOORDN; // refraction projection
float4 envTC : TEXCOORDN; // reflection projection
float4 viewVec : TEXCOORDN;
float4 normalVec : TEXCOORDN; // w unused
#if %_RT_FOG
float4 localFogColor : TEXCOORDN;
#endif
float4 cColor : COLOR0;
};
float4 tex2Dlod_bilinear( in sampler2D s, in float2 t, in float2 textureSize, in float2 texelSize )
{
float2 f = frac( t * textureSize );
// TODO: take advantage of arbitrary swizzles for 2.x & 3.0
float4 t00 = tex2Dlod( s, float4(t, 0, 0) );
float4 t10 = tex2Dlod( s, float4( t + float2( texelSize.x, 0 ), 0, 0) );
float4 tA = lerp( t00, t10, f.x );
float4 t01 = tex2Dlod( s, float4( t + float2( 0, texelSize.y ), 0, 0) );
float4 t11 = tex2Dlod( s, float4( t + float2( texelSize.x, texelSize.y ), 0, 0) );
float4 tB = lerp( t01, t11, f.x );
return lerp( tA, tB, f.y );
}
// Get waves
void GetWave(inout float3 vPos, in float2 FlowDir, in a2vWater IN, bool bOneSample = true)
{
if( GetShaderQuality() == QUALITY_LOW )
return;
// constant to scale down values a bit
const float fAnimAmplitudeScale = 1.0 / 5.0;
float3 vFakePos = vPos;
#if %FAKE_CAMERA_MOVEMENT
vFakePos += ( float3(FlowDir.xy* g_VS_AnimGenParams.x* FakeCameraSpeed , 0) )*1.05 /* workaround for register exceeding */ ;
#endif
float3 vPosOrig = vFakePos;
float fPhaseTest = length(vFakePos.xy);
#if %WAVE_DECAL
float fDistToEdge =1.0;
float fEdgesAtten = 1.0f;
//float fLen = length(vPosOrig);
// compute per-wave - less 10 instructions
half fLifetime = WaveParams0.x;
fDistToEdge = IN.Color.y;
// color.x = x attenuation,
// color.y = y attenuation
// color.z = x sector attenuation
// color.w = edges attenuation -> (1-abs(color.x*2-1)) * (1-abs(color.y*2-1))
fEdgesAtten = saturate( 2 * sqrt(1-abs(IN.Color.z*2-1)) ) ;
fEdgesAtten *= MaxAnimAmplitudeWav0 *4; // 7 inst
//float2 vSinCos = float2( sin( vFakePos.x ), cos( vFakePos.x ) ) *0.333;//ApproxSine2(vFakePos.xy);// * 0.333;
//vPos.xy += vSinCos;
//fDistToEdge = sqrt(fDistToEdge) *fLifetime;
fDistToEdge = fDistToEdge * fLifetime;
OceanParams1.x = lerp( OceanParams1.x, MaxAnimAmplitudeWav0, fDistToEdge); // 3 inst
//AnimAmplitudeWav0 = lerp( AnimAmplitudeWav0, MaxAnimAmplitudeWav0, fDistToEdge);
//AnimAmplitudeWav1 = lerp( AnimAmplitudeWav1, MaxAnimAmplitudeWav1, fDistToEdge);
// vPos.z += sin( fLifetime *fDistToEdge.xxxx+fPhaseTest*1.01)*(fEdgesAtten * fLifetime) * WaveParams1.x;// * saturate(abs(fDistToEdge*2-1)+ 0.4);
//vPos.xyz = normalize(vPos.xyz) * fPhaseTest;
#endif
//////////////////////////////////////////////////////////////////////////////////////////////////
// Water ocean animation
// Each wave as ~doubled frequency/phase
const float4 vFrequencies = 5*OceanParams0.z * float4(0.233, 0.455, 0.6135, -0.1467);
const float4 vPhases = OceanParams0.w * float4(0.1, 0.159, 0.557, 0.2199);
const float4 vAmplitudes = OceanParams1.x * float4(1, 0.5, 0.25, 0.5);
float4 vWaveFreq = g_VS_AnimGenParams.z * vFrequencies; // 1 inst
float4 vCosPhase = (fPhaseTest + vFakePos.x)* vPhases; // 1 inst
float4 vCosWave = cos( vWaveFreq * FlowDir.x + vCosPhase ); // 8 inst
float4 vSinPhase = (fPhaseTest + vFakePos.y)* vPhases; // 1 inst
float4 vSinWave = sin( vWaveFreq * FlowDir.y + vSinPhase ); // 8 inst
float fAnimSum = dot(vCosWave, vAmplitudes) + dot(vSinWave, vAmplitudes); // 3 inst
#if !%_RT_SAMPLE4
if( GetShaderQuality() > QUALITY_LOW )
vPos.z += fAnimSum * fAnimAmplitudeScale; // 1 inst
#else
#ifndef D3D10
float3 v0 = tex2Dlod_bilinear( fftTexSampler, (vFakePos.xy)*0.0125*OceanParams0.w * 1.25, 64, 1.0/64 ); //*3
#else
float3 v0 = tex2Dlod( fftTexSampler, float4( (vFakePos.xy)*0.0125*OceanParams0.w * 1.25, 0 ,0) ); //*3
#endif
vPos.xyz += v0 * 0.06 * OceanParams1.x * float3(1.5,1.5,1);
#endif
}
//define WHITE_OUTPUT
//define %SCREEN_SPACE_GRID
#define %USE_EXP_VTX_ATTEN
// Get vertex from screen space into world spasace
void GetGridVertexPos( inout float4 vPos, inout float fDistToCam )
{
#if %SCREEN_SPACE_GRID || (!%_RT_QUALITY && !%_RT_QUALITY1)
const float fGridQuadSize = 1.0 / (200.0);
vPos.xy = ((vPos.xy + fGridQuadSize)* 2 - 1);
//vPos.xy = vPos.xy* 2 - 1;
// BFH: make sure edges go out of screen - todo: find better solution for this
//vPos.xy *= (1.0 + fGridQuadSize*10);
vPos.xy *= 2.0;
// BFH: make sure edges go out of screen - todo: find better solution for this
//vPos.y *= 1.1;
vPos.z = 0.0;
vPos.w = 1.0;
float4 vPosWS = mul( mViewProjI, vPos );
vPosWS /= vPosWS.w;
float3 view = g_VS_WorldViewPos.xyz - float3(vPosWS.xy, OceanParams1.w);
float fDirSign = sign(view.z); // make sure to invert sign when bellow water
// get z plane intersections
float2 z_isecs = float2( max(fDirSign*g_VS_WorldViewPos.z - fDirSign*vPosWS.z, 0.05 / g_VS_NearFarClipDist.y),
fDirSign*g_VS_WorldViewPos.z - fDirSign*OceanParams1.w );
//z_isecs *= fDirSign;
//z_isecs = max(z_isecs, 0.00001);
// clamp t just in case
float t = min( z_isecs.y / z_isecs.x, g_VS_NearFarClipDist.y * 5.0 );
// project vertex along ray direction
float2 vRayDir = (vPosWS.xy - g_VS_WorldViewPos.xy);
vPos.xy = g_VS_WorldViewPos.xy + vRayDir.xy * t;
fDistToCam = t;
// BFH to avoid retarded artefacts at horizon line - and still not perfect - how to solve this ?
float fHeightDistanceSnap =(t / g_VS_NearFarClipDist.y);// * saturate(abs(view.z)*0.1);
//fHeightDistanceSnap *= (t > 0)? 0.05:1; // avoid funky reverted height
vPos.z = OceanParams1.w;
if( t >= g_VS_NearFarClipDist.y * 3.5)
vPos.z = OceanParams1.w + fHeightDistanceSnap;
#else
float atten = ( vPos.z );
// simple lod - keep nearby detail until 200 meters after that project all vertices to horizon
float fLod0 = 250 *( 1/ min(OceanParams0.w, 2.0 ));
fLod0 = (atten >0.98)?g_VS_NearFarClipDist.y*2:fLod0;
// Stupid hlsl bug, left for documentation purpose..
// This gets some funky rotation
//vPos.x = 0.707 * (vPos.x) - 0.707 * (vPos.y);
//vPos.y = 0.707 * (vPos.y) + 0.707 * (vPos.x);
// This works correctly..
//float tx = vPos.x;
//float ty = vPos.y;
//vPos.x = 0.707 * (vPos.x) - 0.707 * (ty);
//vPos.y = 0.707 * (vPos.y) + 0.707 * (tx);
// Set a 45 degree rotation to the grid
vPos.xy = 0.707 * vPos.xy + 0.707 * float2( - vPos.y, vPos.x);
// Orientate along camera direction - try keeping good amount of triangles on screen
float2 vPosRot = mul(( (const float3x3) mCamera ), -fLod0 * float3(vPos.x, 0, vPos.y-0.3));
// for no rotation
// float2 vPosRot = mul(( (const float3x3) mCamera ), -fLod0 * float3((vPos.x*2-1)*0.4, 0, vPos.y-0.25));
// martin trick: snap grid to avoid translation aliasing
float2 cpos = g_VS_WorldViewPos.xy;
cpos.xy -= frac(cpos.xy * 0.4) * 2.5;
float fHeightDistanceSnap = 3 * (atten >0.98);
vPos = float4( cpos.xy + vPosRot.xy , OceanParams1.w + fHeightDistanceSnap, 1);
#endif
}
float3 ComputeSurfaceNormal( in float2 vFlowDir, in float3 vPosOrig, in float3 vPos, float fDisp, in a2vWater IN)
{
float3 vNormal = float3(0,0,1);
float3 vPos1 = vPosOrig.xyz + float3(1,0,0);
float3 vPos1Orig = vPos1;
GetWave( vPos1.xyz, vFlowDir, IN);
vPos1.xyz = lerp(vPosOrig.xyz, vPos1.xyz, fDisp); // 2 alu
vNormal.x = vPos.z - vPos1.z;
vPos1 = vPosOrig.xyz + float3(0,1,0);
vPos1Orig = vPos1;
GetWave( vPos1.xyz, vFlowDir, IN);
vPos1.xyz = lerp(vPosOrig.xyz, vPos1.xyz, fDisp); // 2 alu
vNormal.y = vPos.z - vPos1.z;
return vNormal;
}
///////////////// vertex shader //////////////////
v2fWater WaterVS(a2vWater IN)
{
int nQuality = GetShaderQuality();
v2fWater OUT;
#ifndef OPENGL
OUT = (v2fWater)1;
#endif
// Position in screen space.
float4 vPos = IN.Position;
//float bEdgeDispl = 1-saturate(saturate((vPos.z+0.05))); //vPos.z;
float bEdgeDispl =1 - saturate(saturate(vPos.z +0.05)*2-1.0); //vPos.z;
float fNormalAtten = bEdgeDispl;
float bDebug = vPos.z;
float2 FlowDir = OceanParams1.yz;
// Output bump layers texture coordinates
float2 vTranslation= ( g_VS_AnimGenParams.z * OceanParams0.y * 0.0025)* FlowDir;
float fVertexDist = 0;
float vBlendFogMax = 0;
#if !%WAVE_DECAL
GetGridVertexPos( vPos, fVertexDist); // 30 alu
vBlendFogMax = vPos.w;
vPos.w = 1;
#else
vPos = float4( mul(mWorldT, vPos).xy, OceanParams1.w, 1);
bEdgeDispl = 1;
#endif
float4 vPosOrig = vPos;
float3 vPos0 = vPosOrig.xyz;
GetWave( vPos.xyz, FlowDir, IN, false);
float fDistToCam = length(g_VS_WorldViewPos.xyz - vPos.xyz); // 2 alu
// Attenuate wave strength nearby camera
float fNearbyCameraAtten = (saturate( fDistToCam*fDistToCam)); // 1 alu
#if !%WAVE_DECAL
vPos.xyz = lerp(vPosOrig.xyz, vPos.xyz, saturate(fNearbyCameraAtten * bEdgeDispl)); // 2 alu //* bEdgeDispl
#endif
// Add small waves nearby camera
#if !%WAVE_DECAL
//const float4 vNearWavesFreqPhases = float4(-11.0, -5.0, 10.0, 15.0);
//float fNearCamWaves = dot(ApproxSine2( g_VS_AnimGenParams.z * vNearWavesFreqPhases.xy + fDistToCam * vNearWavesFreqPhases.zw), float2(0.6, 0.4));
//float fDispAmount = saturate( 1 / (fDistToCam) ); // 1 alu
//vPos.z += fNearCamWaves * fDispAmount * 0.025;// * bEdgeDispl; // 2 alu
#endif
// Output projected reflection texture coordinates
float4 vProjTex = mul(mReflProj, float4(vPos.xy, g_fWaterLevel.z, 1)); // 4 alu
OUT.envTC = vProjTex;
#if %_RT_FOG
OUT.localFogColor = GetVolumetricFogColor( vPos );
if( nQuality >= QUALITY_HIGH )
OUT.localFogColor = vPos;
#endif
// compute normal vector
{
OUT.normalVec.xyz = ComputeSurfaceNormal( FlowDir, vPosOrig, vPos, bEdgeDispl, IN);
OUT.normalVec.z += 0.1;
OUT.screenProj.z = saturate(2*(vPos.z - OceanParams1.w)*saturate((-OUT.normalVec.x -OUT.normalVec.y )*0.9+0.2));
}
// chopiness - needs testing
float fWaveDispAmount = abs(vPosOrig.z - vPos.z);
#if !%WAVE_DECAL && !%_RT_SAMPLE4
float2 vChoppy = normalize( OUT.normalVec.xyz ).xy * FlowDir *OceanParams1.x;//* fWaveDispAmount;
vPos.xy -= vChoppy;
fWaveDispAmount = dot(vChoppy.xy, vChoppy.xy);
#endif
// Output eye/light vector
float3 viewVec = g_VS_WorldViewPos.xyz - vPos.xyz; // 1 alu
OUT.viewVec.xyz = ( viewVec.xyz ); // 3 alu
// verify diferences
OUT.normalVec.w = 1; //1.0 / dot( ( OUT.viewVec.xyz ) , miscCamFront.xyz ); // 2 alu
OUT.Position = mul(mViewProj, vPos); // 4 alu
//OUT.Position.w *= ;
//bEdgeDispl *
// Attenuate normal strength to make tesselation artefacts less visible
//OUT.normalVec.xy*= saturate(1- OUT.Position.w*0.0075*0.5 + saturate(0.25 / OceanParams0.w)); // 2 alu
// Scale texture coordinates to get mix of low/high frequency details
OUT.viewVec.w = OUT.Position.w * g_VS_NearFarClipDist.w; // 1 alu
// Output projected refraction texture coordinates
OUT.screenProj.xyw = HPosToScreenTC( OUT.Position ).xyw; // 2 alu
// dont touch this scales !
float2 vTex = vPos.xy * 0.005; // 1 alu
#if %FAKE_CAMERA_MOVEMENT
vTex = (vPos.xy + float2(FlowDir.x, FlowDir.y)* (g_VS_AnimGenParams.x*FakeCameraSpeed*0.5)) * 0.005;
#endif
if( GetShaderQuality() == QUALITY_LOW )
vTranslation.xy *= 2;
// Output texture coordinates for water - don't touch texture scales! hand tweaked stuff
OUT.Wave0.xywz = vTex.xyxy * float4(4, 4, 2, 2) + vTranslation.xyxy * float4(1, 1, 2, 2);
OUT.Wave1.xywz = OUT.Wave0.xywz *2;
if( GetShaderQuality() == QUALITY_LOW )
OUT.Wave1.wz = vTex.xy * 8 - 2*vTranslation.xy;
#if %WAVE_DECAL
OUT.baseTC.xy = IN.baseTC.xy;
float fAnimFoam = frac( g_VS_AnimGenParams.z * OceanParams0.z * 0.01);
OUT.baseTC.wz = vTex.yx * 42.0 + fAnimFoam*FlowDir;
#else
// Output texture coordinates for foam - don't touch texture scales! hand tweaked stuff
float2 fAnimFoam = frac( g_VS_AnimGenParams.z * OceanParams0.z * 0.01 * float2(0.2, 1)*2);
OUT.baseTC.xywz = vTex.xyxy * float4(58*0.2, 52*0.2, 38, 42)*3 + fAnimFoam.xxyy * float4(-1, -1, 1, 1);
#endif
#if %WAVE_DECAL
//float3 vWaterPos = float3(vPosOrig.xy, OceanParams1.w);
//GetWave( vWaterPos.xyz, FlowDir, IN);
// avoid intersections
//vPos.z -= 0.1;//+=sin(g_VS_AnimGenParams.z*3 + dot(vPos.xy,0.5)*4)*0.25 - 0.125; // 0.1 +
// color.x = x attenuation,
// color.y = y attenuation
// color.z = x sector attenuation
// color.w = edges attenuation -> (1-abs(color.x*2-1)) * (1-abs(color.y*2-1))
OUT.cColor = IN.Color.w;
// TEMPORARY FIX: NO WAVES VISIBLE FROM BELLOW WATER
//OUT.cColor *=saturate((g_VS_WorldViewPos.z - OceanParams1.w )*4);
// Add soft intersection with water plane
//OUT.cColor *= saturate( (OceanParams1.w - vPos.z) * 2);
//OUT.cColor *= saturate( (vWaterPos.z - vPos.z) * 2);
// No waves in terrain area
OUT.cColor *= WaveParams0.z;
#else
OUT.cColor = float4(bDebug.xx, fWaveDispAmount, vBlendFogMax);
#endif
return OUT;
}
///////////////// pixel shader //////////////////
half3 BumpGen( in v2fWater IN )
{
half3 bumpNormal;
half3 vVertexNormal = IN.normalVec.xyz;
// Scale first layer bump, for big waves
half2 bumpColorA = FetchNormalMap(oceanBumpMapSampler, IN.Wave0.xy);
half2 bumpColorB = FetchNormalMap(oceanBumpMapSampler, IN.Wave0.wz);
half2 bumpLowFreq;
bumpLowFreq = (bumpColorA + bumpColorB) - 1.0;
bumpLowFreq *= 2;
half2 bumpColorC = FetchNormalMap(oceanBumpMapSampler, IN.Wave1.xy);
half2 bumpColorD = FetchNormalMap(oceanBumpMapSampler, IN.Wave1.wz);
half2 bumpHighFreq;
bumpHighFreq = (bumpColorC + bumpColorD) - 1.0;
// Mix high and low frequency normals
if( GetShaderQuality() > QUALITY_LOW )
bumpNormal = half3(bumpLowFreq.xy + bumpHighFreq.xy,1);
else
bumpNormal = half3(bumpHighFreq.xy,1);
// Clamp max bump to 0.15
bumpNormal.xy *= 0.15;
HeyHey91
20.05.2009, 17:04
if( GetShaderQuality() > QUALITY_LOW )
{
bumpNormal.z = 1;//sqrt(1 - dot(bumpNormal.xy, bumpNormal.xy));
bumpNormal.xyz += vVertexNormal.xyz;
}
bumpNormal.xyz = normalize( bumpNormal );
//bumpNormal.xyz += ;
//bumpNormal.xyz = normalize( vVertexNormal.xyz + float3(bumpNormal.xy, 0) );
return bumpNormal;
}
pixout WaterLowQualityPS( v2fWater IN )
{
pixout OUT = (pixout) 0;
half3 vVertexNormal = IN.normalVec.xyz;
half3 bumpNormal = BumpGen( IN );
half3 vFinalNormal = bumpNormal;//vVertexNormal.xyz ;//( vVertexNormal.xyz + float3(bumpNormal.xy, 0) ); // opt: no normalize
bumpNormal = vFinalNormal;
// Water edge softness
half3 viewVec = normalize(IN.viewVec.xyz);
float sceneDepth = DecodeSceneDepth( sceneDepthSampler, IN.screenProj );
float waterDepth = IN.screenProj.w;
float depth = ( sceneDepth - waterDepth ) * IN.normalVec.w;
half softIntersect = saturate( SoftIntersectionFactor * depth );
// Get abs( NdotI ) and fresnel term
half NdotI = 1-abs( dot( viewVec.xyz, vFinalNormal.xyz ) );
half fFresnel= saturate( 0.5 + NdotI*NdotI*0.5);// FresnelBias + GetFresnelTex( NdotI, 0).z*FresnelScale;
//half fFresnel= 0.25 + NdotI *NdotI*0.8;// FresnelBias + GetFresnelTex( NdotI, 0).z*FresnelScale;
// Get reflection color
half2 reflNewst = (IN.envTC.xy/IN.envTC.w) + vFinalNormal.xy * 0.33;
// Should do bilinear filtering, but artefacts not much visible due to bump mapping
half4 reflectColor = tex2D(envMapSamplerRefl, reflNewst);
reflectColor += saturate(tex2D(waterGlossMapSampler,IN.Wave0.xy + vFinalNormal.xy * 0.33)-0.25)*0.125;
/*
// Get refraction
float2 refrNewst = ( IN.screenProj.xy / IN.screenProj.w );
float2 refrTC = bumpNormal.xy * 0.1;
// apply refraction masking
{
float depthRefr = tex2D( sceneDepthSampler, refrNewst + refrTC.xy * 1.15 ).r;
half fRefractionMask = (IN.viewVec.w <depthRefr );
// Apply refraction mask to bump offsets
refrTC *= fRefractionMask;
}*/
// half3 refractColor = tex2D(envMapSamplerRefr, refrNewst + refrTC * 1.15 ).xyz;
#if %SUN_SHINE
// half3 mirrorEye = ( 2 * dot( viewVec, bumpNormal) * bumpNormal - viewVec );
// half dotSpec = saturate(dot( mirrorEye.xyz, g_PS_SunLightDir ) * 0.6 + 0.4);
// half3 vSunGlow = saturate(g_PS_SunLightDir.z) *( ( pow( dotSpec, SunShinePow ) ) *SunMultiplier) * g_PS_SunColor.xyz ;
#endif
fFresnel = ( fFresnel ); //* ReflectionAmount);
half3 final= reflectColor;
#if %SUN_SHINE
// Add sun specular term
//final.xyz += vSunGlow.xyz;
#endif
//final.xyz = lerp( IN.localFogColor.xyz, final, saturate( IN.localFogColor.w / softIntersect) );
#if %_RT_FOG
final.xyz = lerp( IN.localFogColor.xyz, final, saturate( IN.localFogColor.w) );
#endif
OUT.Color.xyz = final;
OUT.Color.w = saturate(fFresnel*softIntersect);
return OUT;
}
pixout WaterPS(v2fWater IN)
{
pixout OUT = (pixout) 0;
int nQuality = GetShaderQuality(); // shader quality level
#ifdef D3D10
// workaround for usual dx10 incorrect order sampler binding
half4 c0 = 0;
c0 += tex2D(envMapSamplerRefl, IN.screenProj.xy);
c0 += tex2D(envMapSamplerRefr, IN.screenProj.xy);
c0 += tex2D(oceanBumpMapSampler, IN.screenProj.xy);
c0 += tex2D(sceneDepthSampler, IN.screenProj.xy);
c0 += tex2D(foamSampler, IN.screenProj.xy);
c0 += tex2D(waterGlossMapSampler, IN.screenProj.xy);
c0 += tex2D(foamSamplerSec, IN.screenProj.xy);
#endif
// envMapSamplerRefl sampler NA NA 0 1
// envMapSamplerRefr sampler NA NA 1 1
// oceanBumpMapSampler sampler NA NA 2 1
// sceneDepthSampler sampler NA NA 3 1
// foamSampler sampler NA NA 4 1
// waterGlossMapSampler sampler NA NA 5 1
// foamSamplerSec sampler NA NA 6 1
//OUT.Color = 1;
//return OUT;
if( !nQuality )
return WaterLowQualityPS( IN );
OUT.Color = IN.cColor *4;
OUT.Color.w = 1;
//return OUT;
#if %_RT_DEBUG0 || %_RT_DEBUG1 || %_RT_DEBUG2 || %_RT_DEBUG3
DebugOutput(OUT.Color, IN.baseTC);
return OUT;
#endif
//get shadow from sun
half fShadowOccl = 1; //1.0f - tex2Dproj(shadowOccludeMapSampler, IN.screenProj.xyzw).x;
/* Begin:: Generate normal map from 4 normal map layers */
half3 vVertexNormal = IN.normalVec.xyz;
half3 bumpNormal = BumpGen( IN );
// bumpNormal = float3(0,0,1);
half3 vFinalNormal = ( vVertexNormal.xyz + float3(bumpNormal.xy, 0) ); // opt: no normalize
// opt: - 15 alu
/* End:: Generate normal map from 4 normal map layers */
/*
// Get glossy color (used for adding detail to sun specular, and fake big waves foam) = 5 alu
half fFoamGloss = tex2D(waterGlossMapSampler, IN.Wave0.wz*0.5*2 + vFinalNormal.xy*0.1).x; // 1 alu
fFoamGloss *= tex2D(waterGlossMapSampler, -IN.Wave0.xy*0.33*2 + vFinalNormal.xy*0.1).x; // 2 alu, 1 mov
fFoamGloss *= 2; // 1 alu
// Get foam = 5 alu
half fFoam = tex2D(foamSampler, IN.baseTC.xy*2 + vFinalNormal.xy*0.3).x; // 1 alu
fFoam += tex2D(foamSampler, IN.baseTC.wz*2 + vFinalNormal.xy*0.3).x; // 2 alu
*/
half fFoamGloss = tex2D(waterGlossMapSampler, IN.Wave0.wz*0.5*2 + vFinalNormal.xy*0.1).x; // 1 alu
fFoamGloss *= tex2D(waterGlossMapSampler, -IN.Wave0.xy*0.33*2 + vFinalNormal.xy*0.1).x; // 2 alu, 1 mov
fFoamGloss *= 2; // 1 alu
// Get foam = 5 alu
half fFoam = saturate(tex2D(foamSamplerSec, IN.baseTC.xy - vFinalNormal.xy*0.1).x); // 1 alu
fFoam += tex2D(foamSampler, IN.baseTC.wz + vFinalNormal.xy*0.4).x; // 2 alu
half fFoamLuminance = saturate( fFoam -0.85 ); // 1 alu
//////////////////////////////////////////////////////////////////////////////////////////////////
// Water edge and foam softness
half3 viewVec = normalize(IN.viewVec.xyz);
float sceneDepth = DecodeSceneDepth( sceneDepthSampler, IN.screenProj );
float waterDepth = IN.screenProj.w;
float depth = ( sceneDepth - waterDepth ) * IN.normalVec.w;
half softIntersect = saturate( SoftIntersectionFactor * depth );
// soften camera intersections (and foam also) - test - using alpha blending now to save some instructions
// softIntersect *= saturate( (IN.viewVec.w - PS_NearFarClipDist.x) * 1.5);
// foamSoftIntersect *= saturate( (IN.viewVec.w - PS_NearFarClipDist.x) * 0.75);
//////////////////////////////////////////////////////////////////////////////////////////////////
// Get abs( NdotI ) and fresnel term
half NdotI = (dot( viewVec.xyz, vFinalNormal.xyz ) ); // need detail textures rendering for underwater reflection
//half fInsideReflection = (1 - saturate(1000.0 * (NdotI+0.1)));
half fInsideReflection = 0;
if( nQuality >= QUALITY_HIGH )
fInsideReflection = saturate(-viewVec.z*1000);
NdotI = abs( NdotI ) ;
half fInternalRefl = 0;
//if( nQuality >= QUALITY_HIGH )
// fInternalRefl = saturate(1 - (saturate(NdotI-0.25))) * fInsideReflection;
half fFresnel= GetFresnel( NdotI , 0, 5) * FresnelScale;
//////////////////////////////////////////////////////////////////////////////////////////////////
// Get reflection color
half2 reflNewst = (IN.envTC.xy/IN.envTC.w) + bumpNormal.xy * (0.33 )*0.5;
// Should do bilinear filtering, but artefacts not much visible due to bump mapping
half4 reflectColor = tex2D(envMapSamplerRefl, reflNewst);
// OUT.Color = reflectColor;
//OUT.Color.w = 1;
// foam soft isec, also add a bit of foam nearby camera intersections
half foamSoftIntersect = saturate( (0.1 / saturate(fFoamLuminance)) * (depth) );
//////////////////////////////////////////////////////////////////////////////////////////////////
// Get refraction ( using chroma dispersion )
// Compute refraction mask
float2 refrNewst = ( IN.screenProj.xy / IN.screenProj.w );
float2 refrTC = bumpNormal.xy *(0.1+ 0.1*fInsideReflection)*saturate( softIntersect*4); // Difraction amount always 0.1
//if( nQuality == QUALITY_HIGH )
{
// only hi-specs get refraction masking
// Add small bias to avoid leaking when extremelly nearby camera/water plane
const float fRefrMaskBias = 0.0001;
IN.viewVec.w += fRefrMaskBias;
#if !%NO_REFRACTION_BUMP
#if !%_RT_SAMPLE4
float depthRefr = tex2D( sceneDepthSampler, refrNewst + refrTC.xy * 1.15 ).r;
half fRefractionMask = (IN.viewVec.w <depthRefr );
// Apply refraction mask to bump offsets
refrTC *= fRefractionMask;
#else
float3 depthRefr = tex2D( sceneDepthSampler, refrNewst + refrTC.xy * 1.15 ).r;
depthRefr.y = tex2D( sceneDepthSampler, refrNewst + refrTC.xy ).r;
depthRefr.z = tex2D( sceneDepthSampler, refrNewst + refrTC.xy * 0.85 ).r;
half3 fRefractionMask = (IN.viewVec.www < depthRefr.xyz );
// Apply refraction mask to bump offsets
refrTC *= fRefractionMask.x * fRefractionMask.y * fRefractionMask.z;
#endif
#endif
}
#ifdef OPENGL
refrNewst.y = 1.0 - refrNewst.y;
#endif
half3 refractColor = 0;
#if !%NO_REFRACTION_BUMP
// Achromatic aberration taking about 2 ms. Only enable on very high specs (>=g8)0
#if %_RT_SAMPLE4
// since we need bilinear filtering in HDR anyway, use 3 lookups instead and get chroma dispersion for free
// 6 instructions extra for chroma dispersion
refractColor.x = tex2D(envMapSamplerRefr, refrNewst + refrTC * 1.15 ).x;;
refractColor.y = tex2D(envMapSamplerRefr, refrNewst + refrTC ).y;
refractColor.z = tex2D(envMapSamplerRefr, refrNewst + refrTC * 0.85 ).z;
#else
// no color dispersion for lower specs
refractColor.xyz = tex2D(envMapSamplerRefr, refrNewst + refrTC * 1.15 ).xyz;
#endif
#else
// no color dispersion for lower specs
refractColor.xyz = tex2D(envMapSamplerRefr, refrNewst ).xyz;
#endif
#if %SUN_SHINE
half3 mirrorEye = ( 2 * dot( viewVec, bumpNormal) * bumpNormal - viewVec );
half dotSpec = saturate(dot( mirrorEye.xyz, g_PS_SunLightDir ) * 0.5 + 0.5);
half3 vSunGlow = fFresnel*saturate(g_PS_SunLightDir.z) *( ( pow( dotSpec, 512 ) )*(fFoamGloss*1.8+0.2))* g_PS_SunColor.xyz ;
vSunGlow += vSunGlow *25 *saturate(fFoamGloss-0.05)* g_PS_SunColor.xyz;
#endif
fFresnel = saturate( fFresnel * ReflectionAmount*(fFoamGloss*0.2+0.8));
float fA = 1;
#if !%WAVE_DECAL
half3 final= lerp(refractColor,reflectColor,saturate(fFresnel +saturate(1-NdotI*2)*fInsideReflection));
#else
half3 final= lerp(refractColor,reflectColor,saturate(fFresnel +saturate(1-NdotI*2)*fInsideReflection));
#endif
// no foam for low-specs
if( nQuality == QUALITY_HIGH )
{
// procedural foam
half foam = smoothstep(0.4, 0.8, 1-foamSoftIntersect ) *0.5* softIntersect;
half3 cFoamFinal = foam;
half fCrestFoam = 0.5 * (fFoamLuminance * fFoamGloss * (IN.cColor.z + IN.screenProj.z));
half3 cWavesFoam =fFoamGloss*0.3;
cWavesFoam *= WhiteCapsAmount; // 2 alu
cFoamFinal = (fFoamGloss*0.5+0.5) * saturate( (cFoamFinal + cWavesFoam)*fFoamLuminance +fCrestFoam *WhiteCapsAmount); // 2 alu
// Add foam
final += (g_PS_SkyColor.xyz + g_PS_SunColor.xyz ) * cFoamFinal ; // 2 alu
// 6 alu
}
#if %SUN_SHINE
// Add sun specular term
final.xyz += vSunGlow.xyz * fShadowOccl * SunMultiplier;
#endif
#if !%WAVE_DECAL
fA = 1;
// soft intersection with camera
if( nQuality == QUALITY_HIGH )
fA *= saturate((IN.screenProj.w- PS_NearFarClipDist.x) * 50);
#endif
#if %_RT_FOG
half4 localFogColor = IN.localFogColor;
if( nQuality >= QUALITY_HIGH ) // compute per-pixel instead for hi specs
localFogColor = GetVolumetricFogColor( IN.localFogColor.xyz );
final.xyz = lerp( localFogColor.xyz, final, localFogColor.w );
#endif
final.xyz = lerp( refractColor, final.xyz, softIntersect * saturate(IN.screenProj.w));
// Add global fog - make sure fog doens't affect refraction on shore
// Soften camera intersections
// maybe 4 hi-spec
#if %WAVE_DECAL
//final = fA ;
//fA =1;
//fA *= saturate( (IN.viewVec.w - PS_NearFarClipDist.x) *100);
//fA *= saturate( (IN.viewVec.w/PS_NearFarClipDist.w - PS_NearFarClipDist.x) * 100);
#endif
//fA *= IN.screenProj.z;//*IN.screenProj.z*IN.screenProj.z;
#if !%WAVE_DECAL
// fA *= IN.cColor.w;
#endif
#if WHITE_OUTPUT
final = 1;
#endif
//OUT.Color = float4(IN.cColor.xxx, 1); //;max( half4(final.xyz, fA), 0);
OUT.Color = max( half4(final.xyz, fA), 0);
return OUT;
}
//////////////////////////////// technique ////////////////
technique Water
<
string Script =
"TechniqueShadowPass=ShadowPassWater;"
>
{
pass p0
{
ZEnable = true;
ZFunc = LEqual;
ZWriteEnable = true;
CullMode = None;
SrcBlend = SRC_ALPHA;
DestBlend = ONE_MINUS_SRC_ALPHA;
AlphaBlendEnable = true;
IgnoreMaterialState = true;
#if %WAVE_DECAL
SrcBlend = SRC_ALPHA;
DestBlend = ONE_MINUS_SRC_ALPHA;
AlphaBlendEnable = true;
CullMode = None;
ZEnable = false;
ZWriteEnable = false;
#endif
VertexShader = compile vs_Auto WaterVS() GeneralVS;
PixelShader = compile ps_Auto WaterPS() GeneralPS;
}
}
technique WaterFFT
<
string Script =
"TechniqueShadowPass=ShadowPassWaterFFT;"
>
{
pass p0
{
ZEnable = true;
ZFunc = LEqual;
ZWriteEnable = true;
CullMode = None;
SrcBlend = SRC_ALPHA;
DestBlend = ONE_MINUS_SRC_ALPHA;
AlphaBlendEnable = true;
IgnoreMaterialState = true;
#if %WAVE_DECAL
SrcBlend = SRC_ALPHA;
DestBlend = ONE_MINUS_SRC_ALPHA;
AlphaBlendEnable = true;
CullMode = None;
ZEnable = false;
ZWriteEnable = false;
#endif
VertexShader = compile vs_3_0 WaterVS() GeneralVS;
PixelShader = compile ps_3_0 WaterPS() GeneralPS;
}
}
/////////////// Shadow Pass ////////////////////////
#include "ShadowCommon.cfi"
#include "CommonShadowPass.cfi"
vert2fragShadow Water_ShadowVS(a2vWater IN)
{
vert2fragShadow OUT;
#ifndef OPENGL
OUT = (vert2fragShadow)0;
#endif
// Position in screen space.
float4 vPos = IN.Position;
float4 vPosOrig = IN.Position;
float2 FlowDir = OceanParams1.yz;
float fVertexDist = 0;
#if !%WAVE_DECAL
GetGridVertexPos( vPos, fVertexDist);
#else
vPos.z = (vPos.z < OceanParams1.w)? OceanParams1.w: vPos.z;
#endif
vPosOrig.xyz = vPos.xyz;
float viewAngle = abs( normalize(g_VS_WorldViewPos.xyz-vPosOrig.xyz).z *10);
float3 vPos0 = vPosOrig.xyz;
GetWave( vPos0.xyz, FlowDir, IN);
// todo: Store previous frame position,transformation - use for interpolating. Might help hiding some artefacts
float3 vDisp = vPos0 - vPos.xyz;
float fDistToCam = length(g_VS_WorldViewPos.xyz - vPos.xyz);
float fDispLen = length( vDisp.xyz );
// Attenuate wave strength nearby camera
float fNearbyCameraAtten = (saturate( fDistToCam / 5));
vPos.xyz += vDisp.xyz * fNearbyCameraAtten;
// Add small waves nearby camera
#if !%WAVE_DECAL
float fNearCamWaves = sin( - g_VS_AnimGenParams.z * 11 + fDistToCam * 10 )*0.6;
fNearCamWaves += sin( - g_VS_AnimGenParams.z * 5 + fDistToCam * 15)*0.4;
float fDispAmount = saturate( 1 / (fDistToCam) );
vPos.z += (fNearCamWaves )* fDispAmount*0.025;
#endif
OUT.HPosition = mul(mViewProj, vPos);
OUT.RandDirTC.xy = mul(vPos.xyz, (float3x3) TexGen0).xy / 800;
// compute shadow tex coords and depth
GenShadowTC(vPos, OUT.shadowTC);
return OUT;
}
pixout_cl Water_ShadowPS(vert2fragShadow IN)
{
pixout_cl OUT;
float4 vCompare = (float4)0;
#ifndef %_RT_GSM_COMBINED
//non-combined GSM
vCompare = ShadowDepthTest(IN.shadowTC, IN.RandDirTC.xy);
#else
//GSM ATLAS
vCompare = ShadowDepthTestAtlas(IN.shadowTC, IN.RandDirTC.xy);
//GSM ATLAS
#endif
//shadow fading - is not supported currently
//vCompare *= IN.RandDirTC.z;
OUT.Color = 1 - vCompare;
return OUT;
}
technique ShadowPassWater
{
pass p0
{
VertexShader = compile vs_Auto Water_ShadowVS();
PixelShader = compile ps_Auto Water_ShadowPS();
ZEnable = true;
ZFunc = LEqual;
ZWriteEnable = false;
CullMode = None;
ZEnable = true;
ZWriteEnable = true;
CullMode = None;
}
}
technique ShadowPassWaterFFT
{
pass p0
{
VertexShader = compile vs_Auto Water_ShadowVS();
PixelShader = compile ps_Auto Water_ShadowPS();
ZEnable = true;
ZFunc = LEqual;
ZWriteEnable = false;
CullMode = None;
ZEnable = true;
ZWriteEnable = true;
CullMode = None;
}
}
/////////////////////// eof ///
okay danke für die Mühe aber damit kann ich leider nichts anfangen
versuch mal hier hochzuladen.
http://www.fileuploadx.de/
HeyHey91
20.05.2009, 17:14
ich hatte mal auch ein Material ohne so ne Gischt, wär das auch hatt, könnte ers mir bitte schicken ???
hier mal das augenblickliche, derjenige ders erstellt hat, hat echt gute Arbeit geleistet
http://www.fileuploadx.de/602174
Den Ordner Shaders einfach in den Ordner Game von Crysis tun
Riesendanke!
Klappt schon ganz gut, fehlt nur noch der letzte feinschliff wenn die Welle auf Land trifft. Aber wie sie sich durchs Meer Bewegt sieht von weiter weg schon sehr geil aus.
http://www.abload.de/thumb/wave1xsev.jpg (http://www.abload.de/image.php?img=wave1xsev.jpg) http://www.abload.de/thumb/wave2swld.jpg (http://www.abload.de/image.php?img=wave2swld.jpg) http://www.abload.de/thumb/wave3jt5y.jpg (http://www.abload.de/image.php?img=wave3jt5y.jpg) http://www.abload.de/thumb/wave4qp8p.jpg (http://www.abload.de/image.php?img=wave4qp8p.jpg)
HeyHey91
20.05.2009, 17:37
was mich gewaltig an den Wellen stört, dass die Teile nur so dünn wie ne Textur sind, aber brechen und sowas tun die sich wirkich realistisch, was mich noch stört, dass sich die Wellen unter wasser ziehen lassen, beziehungsweise, dass mans so heftig durchsieht
klar das ist noch nicht die perfekte Lösung, aber verrmittelt einen kleinen Eindruck davon wie es hätte aussehen können wenn die Profis von Crytek das gemacht hätten.
JACK RABBITz
30.06.2009, 11:08
hi, sorry für die verspätung aber youtube war lahm, das sind die Shader die ich mir mal irgendwo runtergeladen hab, war sogar glaub ich hier
hier das Video, da sieht man die Welle auch
du4Q2tR6XVE (http://www.youtube.com/watch?v=du4Q2tR6XVE)
http://www.youtube.com/watch?v=du4Q2tR6XVE
hätt ich ein besseres Material gehabt, wär die Welle nicht so heftig durchsichtig gewesen, die Wellenphysik funktioniert aber relativ gut
sorry, dass ich nicht die Edit funktion genommen hab
Könntest Du mal bitte kurz beschreiben, wie Du das in kurzen Stück alles hin bekommen hast?
Der Shaderlink ist leider tot und die Texturfrage würde mich auch noch brennend interessieren.
Und dann ganz kurz nur, wie ich sowas z.B. in die island.map bekomme.
Sorry für die dumme Frage aber mein Crysis lag 1 Jahr im Schrank...
Übrigens @ all: Klar funktioniert Ragdoll, schwimmende Leichen und Blutspritzer. Wermutstropfen: Nur in Version 1.0
Ich kanns aber posten, wenn gewünscht.
kann mir da jemand nachhelfen.? :sad:
ich kann den shader nich mehr dloaden.
geht doch :smile:
http://www.crymod.com/thread.php?postid=621178#post621178
geht doch :smile:
http://www.crymod.com/thread.php?postid=621178#post621178
wo pack ich diese dll hin.? oO
Affenzahn375
29.04.2010, 11:18
wo pack ich diese dll hin.? oO
steht doch da
------
Here, sorry but this is quick and dirty day. No time to package this for convenience, you'll need to know what to do with a mod dll. If not then the information is posted on these forums in a number of places.
Probably stickied in fact.
Also, the latest water shader tweak, totally beta a little less quick and dirty, just put it in your game directory.
Possible bug alert with the DLL: I got graphical glitches in the editor that I dont usually get.
------
also nachdem ich mir hier alles durchgelesen habe muss ich sagen dass das eine sehr komplizierte gschicht` ist.
Jetzt (2012) ist es schwer das mitzubekommen, weil ziemlich viele Videos und Links nicht mehr zugänglich sind.
Aus diesem Grund bitte ich jemanden in dieser großen weiten Welt, ein (wenn geht möglichst umfangreiches) Tutorial zu diesem Kapitel zu machen. Bestenfalls in Deutsch ;-)
PS: ihr könnt YT durchforsten aber da findet man 0 bis auf eine englisch kurzfassung ( http://www.youtube.com/watch?v=TLgoAPH-tWQ )
Suchbegriff: sandbox 2 waves
Vielen, vielen Dank im Voraus:!:
Ich kann dir davon nur abraten. Ich bin zwar alles andere als auf dem neusten Stand, was die dynamischen Wellen in der CE2 anbelangt, aber ich weiß, dass Crytek einen Grund gehabt hat, als sie die wieder rausgenommen haben.
Sieht so aus, als hätte jemand eine Mod.dll geschrieben, mit der das ganze funktionieren soll, aber wie gesagt, eine wirklich gute, bugfreie Lösung gibt es nicht.
Das englische Tutorial beschäftigt sich übrigens nur mit der Ozean Bewegung an sich, nicht mit dem Wellen-Tool.
Powered by vBulletin® Version 4.2.5 Copyright ©2026 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.