Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 6 1 2 3 4 5 6
Re: Fixed Function water? [Re: Drew] #24700
04/24/04 14:11
04/24/04 14:11
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Okay.... the published demo is here:

http://steempipe.technicalfoundry.com/water/water.html

There are 3 bodies of water. 2 have different versions of the effect.

Card will need to support EMBM and for one of the effects~ 3 stages/pass. FPS may take a dive with the terrain thing and the 3 waters going on. Since I installed Directx 9, my FPS has been essentially stuck at 58-59. So I really don't know.

Hope that this will give someone an idea or two. I have not screwed with this thing for maybe 2 weeks and did not keep any notes as to where I was with the cubic environment stuff. I did keep an important instruction to the cubic env map in the file, but commented out so I would not forget it. The cameraspacereflectionvector part.

A placeholder for me right now (until the CubeEnvMap) is the cloud specular map that moves with the view. It's going to take a different noise type or specular texture but I am too whacked right now to make one.

Have fun! Make this better, and post the code

Re: Fixed Function water? [Re: Steempipe] #24701
04/24/04 14:35
04/24/04 14:35
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
Its 2:00am here and I have been waiting for this online since your last post. You are awesome Steempipe - thank you soo much!


--Eric
Re: Fixed Function water? [Re: Nadester] #24702
04/24/04 14:45
04/24/04 14:45
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Thank you SteemPipe for all your hard work! I will try to improve on this as much as I can.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: Fixed Function water? [Re: William] #24703
04/24/04 15:33
04/24/04 15:33
Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
Drew Offline
Serious User
Drew  Offline
Serious User

Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
WOW that is nice! thank you

Re: Fixed Function water? [Re: Drew] #24704
04/24/04 17:08
04/24/04 17:08
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
it doesn't work on my geforce4! the water surfaces are just black. does anybody have a gf3/gf4/gffx and this effect shows up? i am sure that nvidia cards support this too somehow!

but thanks for sharing!

here is my explanation why environment mapping doesn't work on flat surfaces:

the vertex normals of flat surfaces all point into the same direction. with fixed function environment mapping the same view vector gets used for the whole object. so the resulting reflection vectors will all point into the same direction too and this causes that always the same pixel of the environment map gets sampled. the surface will be single colored because it shows one pixel only.

the way to do better environment mapping which works on planes is with a vertex shader. you can calculate an individual view vector per vertex:

Code:

texture mtlSkin1;
matrix matWorldViewProj;
matrix matWorld;
vector vecViewPos;

technique environment_mapping
{
pass p0
{
Texture[0]=<mtlSkin1>; // cube map

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]=<matWorld>;
VertexShaderConstant[8]=<vecViewPos>;

VertexShader=
decl
{
stream 0;
float v0[3]; //position
float v3[3]; //normal
float v7[3]; //uv
}
asm
{
vs.1.1
m4x4 oPos,v0,c0 // output vertex position to clip space

m4x4 r0,v0,c4 // transform vertex position to world space

sub r0,c8,r0 // calculate view vector
dp3 r0.w,r0,r0 // renormalize it
rsq r0.w,r0.w
mul r0,r0,r0.w

m3x3 r1,v3,c4 // transform vertex normal to world space

// calculate reflection vector
dp3 r2,r1,r0 // n.v
add r3,r1,r1 // 2n
mad oT0,r2,r3,-r0 // 2n(n.v)-v
};
PixelShader=
asm
{
ps.1.1
tex t0
mov r0,t0
};
}
}



Re: Fixed Function water? [Re: ventilator] #24705
04/24/04 18:54
04/24/04 18:54
Joined: Jun 2001
Posts: 385
Eastern Washington State
Z
Zio Offline
Senior Member
Zio  Offline
Senior Member
Z

Joined: Jun 2001
Posts: 385
Eastern Washington State
Quote:

it doesn't work on my geforce4! the water surfaces are just black.




Same thing on my GF3. I figured it was just a GF3 problem, since it seems to not support anything.

But it not working for your GF4 makes me feel a little better, lol. There must be something that needs to be done a little differently.


The screenshots remind me a lot of Morrowinds water, and that works fine on my GF3, so I know it's possible.

Re: Fixed Function water? [Re: Zio] #24706
04/24/04 19:43
04/24/04 19:43
Joined: Oct 2002
Posts: 806
Zapan@work Offline
User
Zapan@work  Offline
User

Joined: Oct 2002
Posts: 806
same here on gf3, gf4 and ati 9800

Re: Fixed Function water? [Re: Zapan@work] #24707
04/24/04 20:11
04/24/04 20:11
Joined: Mar 2004
Posts: 102
T
Taros Offline
Member
Taros  Offline
Member
T

Joined: Mar 2004
Posts: 102
Works great for me, but can kill the framerate (not much but is noteably slower than without it.)

I have a ATI Radeon 9800SE 256-bit modded to ATI Radeon 9800 Pro via Omega drivers

Re: Fixed Function water? [Re: Taros] #24708
04/24/04 21:16
04/24/04 21:16
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
Doesn't work on my Intel Extreme Graphics card. I'm going to see if it works on my Geforce 4 and Radeon 7500 when I get home - hopefully it will work on one of them.


--Eric
Re: Fixed Function water? [Re: Nadester] #24709
04/24/04 21:37
04/24/04 21:37
Joined: Oct 2000
Posts: 1,543
Germany
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

Joined: Oct 2000
Posts: 1,543
Germany
...and it doesn't work on a GeForce FX 5900.

Page 4 of 6 1 2 3 4 5 6

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1