[free]Water for all Editions (reflecting)

Posted By: Slin

[free]Water for all Editions (reflecting) - 09/16/07 18:05



By accident rvL_eXile and I noticed, that 3DGS 6.60 Extra supports effects using the fixed function pipeline. After a lot of testing I got a ffp water effect wich was written by Steempipe to work (Link ) for everyone.
Just one or two days before, ChrisB released his great render to texture plugin for free. Because of that, I tried to get realtimereflections to work with the water. I had some more problems (Link ), but found a solution now.
The effect works fine now, with my A7 Comm, but with A6 and the Plugin it has the problem, that the Engine Skyobject clips objects away in the reflection.
I think that it would be a big help for everyone if someone could figure out, how to get this working properly. Until then youŽll have to use A big boxmodel around your level as sky (Sry, I havenŽt done it in the testlevel). In the testlevel, youŽll notice that problem as well because I forgot to delete the engine sky... . I as well published a version with A7 Comm. This is in the folder, so that you can see, how it should look if everything is right.
YouŽll may notice some other small problems, but it is up to you to fix them

ChrisB allowed me to upload his dll together with this small package, so a big thanks to him. But he told me that I should tell you, that there are still some problems with the dll. You can find some more infos about the dll in this thread: render2texture.dll by ChrisB

Another big thanks goes to rvL_eXile, who helped me with testing (and made me slower because of asking questions about some scripts he is working on...) and created the testlevel. He asked me to tell you that all the models and textures are free to use but the skycube texture, wich was generated with the free version of terragen and canŽt be used for commercial projects because of that.

And now have fun with it!

Download


Btw, IŽm actually updating my Blog with new information about Chopper-Zone, first infos about the postprocessingpackage IŽm working on and with a short clip of dynamic shadowmapping in 3DGS (and some information about it ), but give me one or two more hours for this


Slin


Edit: If you have any questions or problems belonging to this, just post them
Posted By: rvL_eXile

Re: [free]Water for all Editions (reflecting) - 09/16/07 18:26

Really nice Contribution. Ive tested it many Times. It works perfect, not FPS Slow down !
Enjoy this really nice Water Effect with Lower Edition (Extra)!

As Slin said, all Models are Free but the Skycube is not 4 free

cYa Sebastian
Posted By: aztec

Re: [free]Water for all Editions (reflecting) - 09/16/07 18:33

klingt gut kann man dass auch bei A7 extra benutzen?
Mfg
Aztec
Posted By: Slin

Re: [free]Water for all Editions (reflecting) - 09/16/07 18:36

It should work with A7 Extra as well, but it is up to you to test it
Posted By: vartan_s

Re: [free]Water for all Editions (reflecting) - 09/16/07 18:43

I may not post a lot here, but I have an eye on the forum, and what I see is that your contributions are pretty amazing... you're making me feel guilty about not contributing .
Posted By: mpdeveloper_B

Re: [free]Water for all Editions (reflecting) - 09/16/07 19:15

wow, i'm gonna get this, just one question, what shader version does it support (lowest)
Posted By: Slin

[free]Water for all Editions (reflecting) - 09/16/07 19:19

thanks, for your comments
It uses the fixed function pipeline, wich means that it isnŽt a real shader -> your graphicshardware doesnŽt need to support any shadermodel
Posted By: Nems

Re: [free]Water for all Editions (reflecting) - 09/16/07 20:13

Cool, first time I am able to intergrate a shader type water effect, thanks, again!
Posted By: sPlKe

Re: [free]Water for all Editions (reflecting) - 09/16/07 20:17

List of Gods
Updated 16. Septemebr 2007
Hans Zimmer
Peter Jackson
Ryan Sohmer
Tim Buckley
Alex Proyas

HeelX
ello
TripleX

UPDATE:
Slin
Posted By: Mondivirtuali

Re: [free]Water for all Editions (reflecting) - 09/16/07 21:48

Hi, with A660 Com, I just see a totally black water
Posted By: sPlKe

Re: [free]Water for all Editions (reflecting) - 09/16/07 22:04

thats your graphics card...
i have the same problem too
Posted By: Mondivirtuali

Re: [free]Water for all Editions (reflecting) - 09/17/07 00:40

I got a 6800 GT, is not a bad card.
Posted By: lostclimate

Re: [free]Water for all Editions (reflecting) - 09/17/07 05:55

missing everything that doesnt have a alpha channel for some reason, the sky leaves and fence (not posts) show up.
Posted By: Slin

Re: [free]Water for all Editions (reflecting) - 09/17/07 09:29

The problem is (at the beginning it worked well for me), that 3DGS doesnŽt use the render to texture plugin. I have no idea why it stopped to work-.- But I thought that it is just a problem I had. Try to download the dll from its thread and run the example to see if it works or not.
Posted By: Slin

Re: [free]Water for all Editions (reflecting) - 09/17/07 18:03

For everyone having just a black screen, try this changed Shader.wdl.
There wonŽt be any reflection now, but the effect it self should work fine:

Code:

bmap waterbump = <waves2.tga>;
bmap envspec = <sky.tga>;

function mtl_ffpwater_event();

material mtl_ffpwater
{
skin1=waterbump;
skin2=envspec;

event = mtl_ffpwater_event;
effect = "water.fx";
}

function mtl_ffpwater_event()
{
while(1)
{
//Lets make it scroll in some direction
mtl_ffpwater.skill1 += 0.1*time_step; //Move the water along the x axis with the given speed
mtl_ffpwater.skill2 += 0.1*time_step; //Move the water along the y axis with the given speed
mtl_ffpwater.matrix31 = floatd(sin(mtl_ffpwater.skill1)*100000,40000);
mtl_ffpwater.matrix32 = floatd(cos(mtl_ffpwater.skill2)*100000,40000);
wait(1);
}
}

action Water
{
mtl_ffpwater.matrix11 = float(100); //Tilefactor of the Bumpmap in x direction
mtl_ffpwater.matrix22 = float(100); //Tilefactor of the Bumpmap in y direction

bmap_to_mipmap(mtl_ffpwater.skin1);
bmap_to_mipmap(mtl_ffpwater.skin2);

my.material = mtl_ffpwater;
}


Posted By: Blink

Re: [free]Water for all Editions (reflecting) - 09/18/07 03:00

hello Slin, still doing amazing work i see. it's still a black surface. i exchanged scripts.
Posted By: jermy

Re: [free]Water for all Editions (reflecting) - 09/19/07 16:04

what causes those black areas?

I took this screen from your published game in the downlad
Posted By: sPlKe

Re: [free]Water for all Editions (reflecting) - 09/19/07 16:08

i got it to run... ^^
Posted By: frazzle

Re: [free]Water for all Editions (reflecting) - 09/19/07 17:55

Sorry I noticed it so late Slin, this is again one super contribution

Cheers

Frazzle
Posted By: Slin

Re: [free]Water for all Editions (reflecting) - 09/19/07 19:24

Quote:

what causes those black areas?

I took this screen from your published game in the downlad




Sorry, I have no idea-.-
It looks alright here. Which graficscard do you have?
If anyone else has this problem, please tell me
Posted By: Shadow969

Re: [free]Water for all Editions (reflecting) - 09/19/07 19:52

Great contribution!
But it doesn't run on my graphicscard(ATI Radeon 9250)
i guess rendertarget's texture size exceeds 512*512?
Posted By: lostclimate

Re: [free]Water for all Editions (reflecting) - 09/19/07 22:50

just shrink the bmap and it should work.
Posted By: jermy

Re: [free]Water for all Editions (reflecting) - 09/20/07 15:57

Quote:

Quote:

what causes those black areas?

I took this screen from your published game in the downlad




Sorry, I have no idea-.-
It looks alright here. Which graficscard do you have?
If anyone else has this problem, please tell me




Radeon X1300.

iŽll download the newest driver!
Posted By: jermy

Re: [free]Water for all Editions (reflecting) - 09/20/07 18:09

... no change
but the programm starts in window mode, and then everything is still alright!
Then i switched to full-screen and there are tose black bubbles... and after changing again in window mode i cant see anymore black bubbles (also in full screen)

first start in window mode:

nothing wrong...

change to full screen (str.alt.enter)

Posted By: Nowherebrain

Re: [free]Water for all Editions (reflecting) - 09/21/07 00:07

I think he stated earlier that the resolution can not change during runtime(the main limitation)or do you mean...it works when started in windowed, but not when started in full screen?
Posted By: Blink

Re: [free]Water for all Editions (reflecting) - 09/24/07 02:38

i have A6 commercial 6.60, the water works, but i only get the sky as a reflection, not the trees like in the pic, is that a problem?
Posted By: sPlKe

Re: [free]Water for all Editions (reflecting) - 09/24/07 03:51

i do get the trees, A6.60 comercial, no black stuff and nothing, but the level geometry isnt mirrored...

just entities...
Posted By: jermy

Re: [free]Water for all Editions (reflecting) - 10/20/07 08:11

Quote:

How to integrate it into your own project:

Place a copy of the Plugins folder,
the water.fx file,
the Shader.wdl and the
waves2.tga file in your Projectfolder,

add this line to your main wdl:
include <shader.wdl>;
and assign the action water to a flat model or terrain entity.





Can i use the water effect also with lite-c? If i write #include "shader.wdl";
the compiler canŽt open the .wdl, cause its a .c project!
Posted By: Slin

Re: [free]Water for all Editions (reflecting) - 10/20/07 17:43

It works with lite-c you just have to make some small changes to the shader.wdl and rename it to shader.c
Posted By: jermy

Re: [free]Water for all Editions (reflecting) - 10/21/07 13:08

Quote:

It works with lite-c you just have to make some small changes to the shader.wdl and rename it to shader.c




ok, so far so good. I dont know how to write those two lines in lite-c:

Code:
  
mtl_ffpwater.matrix22 = float(100);
bmap_to_mipmap(mtl_ffpwater.skin1);



the copailer says matrix isnt a member of material...
Posted By: Wulfgar

Re: [free]Water for all Editions (reflecting) - 10/22/07 13:07

@jermy
Das hat er bei mir auch geschrieben. Musst die hinter die Action eine Klammer setzten also: Code:
action Water()
{
...
mtl_ffpwater.matrix22 = 100;
bmap_to_mipmap(mtl_ffpwater.skin1);
...
}



Dann sollte es funktionieren.

@all:
[Ger]
Funktioniert das auch mit der Lite - C Freeversion ich hab da immer nur einen Schwarzen fleck.
[Eng]
Is the Shader working with Lite - C Free, i have a black Area and no Watereffect.

Sorry for my bad English im from Germany.

Gruß\Greetings Wulfgar
Posted By: jermy

Re: [free]Water for all Editions (reflecting) - 10/23/07 17:38

nein an den beiden klammern liegt es nicht...

hat irgendjemand diesen skript schon umgewandelt?
Posted By: Wulfgar

Re: [free]Water for all Editions (reflecting) - 10/24/07 14:23

Ich hab das Skript zwar schon umgeschrieben, aber bei mir funktioniert das irgendwie nicht, aber wenn du mir sagst wohin(E - Mail Adresse) schick ich dirs.
Posted By: jermy

Re: [free]Water for all Editions (reflecting) - 10/26/07 16:44

InfoHausaufg{at/web.de

Edit: danke, dass du das machst
Posted By: scrooge313

Re: [free]Water for all Editions (reflecting) - 01/22/08 00:53

Hi,

I'm wondering why the water shader effect looks like this at my computer:



I have a NVidia 6600GT graphic card.

I hope you can help me.

Thanks.

Regards,
scrooge313
Posted By: Joozey

Re: [free]Water for all Editions (reflecting) - 01/22/08 01:13

Neat, that looks like my tv .
I'm sorry I couldn't provide you with any helpfull information.
Posted By: Mythran

Re: [free]Water for all Editions (reflecting) - 01/22/08 15:51

Shader model not supported, Graphic card...
Have you changed the shader that comes in that folder?
Or maybe it can be an unknown problem lol. kidding
i dunno, but try downloading from other place that project folder.
By the way editions not versions, so what version are you using?

Greets
Posted By: scrooge313

Re: [free]Water for all Editions (reflecting) - 01/23/08 02:29

I didn't change the shader.wdl and my graphic card should provide shader 3.0 and I just installed the newest drivers. But I think it must be a problem with my card, unfortunately I don't know what kind of problem :-(

I'm using Gamestudio Extra Version 7.07

I also reinstalled directx 9.0c.

But look at this image when I was zooming out of the scene:



What the hell is that crazy painting? Is it a hidden message from mars?

Do you have any ideas what I can do to get a good looking water with my computer?

Greetings
Posted By: Mythran

Re: [free]Water for all Editions (reflecting) - 01/25/08 11:27

It works all fine for me...
I have an idea... change you're graphic card
It works for you too except the shader...
try to use other stuffs with shaders and tell me if you have the same problem.
Another idea try to update you're graphic card...
You might have missed an update.
Right now i cant see more problems than you're graphic card...
but try another shaders...
Posted By: PadMalcom

Re: [free]Water for all Editions (reflecting) - 01/25/08 22:13

Hi the demo works fine for me but when I try to integrate the code into my project (7.06 Extra) the Engine starts and quits within a second

Has anyone made the same experiences or even got a solution?
Posted By: PadMalcom

Re: [free]Water for all Editions (reflecting) - 02/04/08 15:23

Finally figured out that the line

effect = "water.fx";

trows me out... Hence, it must depend on the shader...
Anybody got it to work with A7 Extra?
Posted By: Poison

Re: [free]Water for all Editions (reflecting) - 02/04/08 16:56

Sry but A7 Extra donŽt support shaders.
You need Commercial or Pro for shader support.

Cheers

Poison
Posted By: PadMalcom

Re: [free]Water for all Editions (reflecting) - 02/04/08 19:48

Waaaa damn, I guessed that dll would be a workaround
Posted By: Slin

Re: [free]Water for all Editions (reflecting) - 02/04/08 20:00

A7 Extra doesnŽt support shaders but fixed function effects. And that is what this code is.
I actually donŽt see why it shouldnŽt work for you-.-
Posted By: lostclimate

Re: [free]Water for all Editions (reflecting) - 04/20/08 06:46

haha..... this is so much crap to get working in a6.4.... but i finally got it :

http://www.youtube.com/v/fsf8AvIbblQ


it might take a while for it to be available


EDIT:

heres a pic of it mixed with some horrible bloom... at least the bloom isnt ugly yellow or orange :P


Posted By: PadMalcom

Re: [free]Water for all Editions (reflecting) - 04/20/08 12:14

Maybe you could post your working code so that I can try it? ;\) Would be great!
Posted By: lostclimate

Re: [free]Water for all Editions (reflecting) - 04/20/08 16:05

no.......




jk yeah, ill do in in a while just going to get my bloom better, and the fix doesnt necessarily have anything to do with the code itself.
Posted By: nalan

Re: [free]Water for all Editions (reflecting) - 05/03/08 07:21

This water effect looks great!realistic!
Posted By: Tempelbauer

Re: [free]Water for all Editions (reflecting) - 05/04/08 14:12

great effect!!
iŽll use it for sure \:\)

many thanks
© 2024 lite-C Forums