Quake3World.com Forums
     Level Editing & Modeling
        Shore water shader?


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: 

The Illuminated
The Illuminated
Joined: 11 May 2003
Posts: 1498
PostPosted: 02-25-2005 07:45 AM           Profile Send private message  E-mail  Edit post Reply with quote


Is this for rtcw? If it is, there should be a shader like that (ala the shoreline in beach).



_________________
black & white blanket logic


Top
                 

The Illuminated
The Illuminated
Joined: 11 May 2003
Posts: 1498
PostPosted: 02-25-2005 07:59 AM           Profile Send private message  E-mail  Edit post Reply with quote


Well take it from there anyways.... :S ;)



_________________
black & white blanket logic


Top
                 

Trainee
Trainee
Joined: 17 Feb 2005
Posts: 47
PostPosted: 02-28-2005 04:41 PM           Profile Send private message  E-mail  Edit post Reply with quote


Kaz, maybe you should make a Far Cry level. :) The water in that game is AWESOME.



_________________
The number 1 cause of death in games is panic.

Add 870 posts to what it says my total is (SonicClang is my real profile)


Top
                 

Immortal
Immortal
Joined: 15 Dec 2000
Posts: 2297
PostPosted: 02-28-2005 05:19 PM           Profile Send private message  E-mail  Edit post Reply with quote


I was doing this with implicit vertex alpha/color when we were working on what would eventually be the ocean shader for Battery (in Enemy Territory). It could be done using q3map_alphaMod volume brushes to set explicit vertex alpha and do additional foam/edge passes in shallow water:

http://akiba.shaderlab.com/samples/ocean_2003-01-30/




Top
                 

Trainee
Trainee
Joined: 17 Feb 2005
Posts: 47
PostPosted: 02-28-2005 05:20 PM           Profile Send private message  E-mail  Edit post Reply with quote


The clouds over head opened up, the sun shone through and a voice spoke to them... and it was ydnar... :D



_________________
The number 1 cause of death in games is panic.

Add 870 posts to what it says my total is (SonicClang is my real profile)


Top
                 

Etile
Etile
Joined: 19 Nov 2003
Posts: 34899
PostPosted: 03-01-2005 04:59 AM           Profile Send private message  E-mail  Edit post Reply with quote


The outermost vertexes of the land should all sit on the same plane on the z-axis. That way the water vertexes can match up to them to make the alphamod work.

If you had, say, a strip of beach right around the edge, with a strip of water running alongside it, you could blend the two then put an surf shader overlay over both of them to disguise the blend and use alphamod vol brushes on the seaward wide. I guess the surf shader could be scrolling but with alpha fade and a tcMod to make the surf fade away as it rolls up the beach. It would need a shallow sloped beach though to look natural.

I've been thinking about doing something like this myself, and this was the best thing I could think of. Hope it makes sense.




Top
                 

Insane Quaker
Insane Quaker
Joined: 04 Aug 2000
Posts: 255
PostPosted: 03-12-2005 05:18 PM           Profile Send private message  E-mail  Edit post Reply with quote


I needed an effect like this for Subpen level I did for the demo, it included one texture for ocean or water, I used three shaders one for clear, one for the transistion, and then one for opaque using a simple gray scale ramp texture. Open up .pk3 demo files look for the water.shader, please recreate this with your own source, as it is illegal to use this as is.

I pulled out the shader below, Ydnar can speak to these commands working with Q3map2 but I am pretty sure they will, this system gave me pretty good control and might be less overhead during runtime. It gave me the ability to control with brushes where the water was shallow, and where it wasn't.


textures/water/subpen_clear
{
qer_editorimage textures/water/subpen_clear.tga
qer_keyword natural
qer_keyword liquid
qer_keyword subpen
qer_keyword add-on
qer_keyword ocean
surfaceParm water
surfaceparm trans
surfaceParm noimpact
{
map textures/water/noise.tga
tcMod transform 1 0 0 1 0 0
tcMod scroll 0.01 -0.13
nextbundle
map textures/water/noise2.tga
blendfunc add
tcMod transform 1 0 0 1 0 0
tcMod scroll 0.12 0
}

{
map textures/water/subpen_waves.tga
blendfunc blend
alphagen const 0.5
tcMod scroll 0 0.01
}
{
map textures/water/water_shadows.tga
tcMod scroll 0 0.07
nextbundle
map textures/water/water_shadows2.tga
blendfunc filter
tcMod scroll 0.07 -0.07
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
depthFunc equal
}
}

textures/water/subpen_transition
{
qer_editorimage textures/water/subpen_transition.tga
qer_keyword natural
qer_keyword liquid
qer_keyword subpen
qer_keyword add-on
qer_keyword ocean
surfaceParm water
surfaceparm trans
surfaceParm noimpact
{
map textures/water/clear_transition.tga
blendfunc blend
// tcmod scale 0.3 0.3
tcmod transform 0.85 0 0 0.85 0.1 0.1
}
{
map textures/water/noise.tga
tcMod transform 1 0 0 1 0 0
tcMod scroll 0.01 -0.13
nextbundle
map textures/water/noise2.tga
blendfunc add
tcMod transform 1 0 0 1 0 0
tcMod scroll 0.12 0
}

{
map textures/water/subpen_waves.tga
blendfunc blend
alphagen const 0.5
tcMod scroll 0 0.01
}
{
map textures/water/water_shadows.tga
tcMod scroll 0 0.07
// tcmod transform 0.1 0 0 0.1 1 0
nextbundle
map textures/water/water_shadows2.tga
blendfunc filter
tcMod scroll 0.07 -0.07
// tcmod transform 0.1 0 0 0.1 1 0
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
depthFunc equal
}
}

textures/water/subpen_opaque
{
qer_editorimage textures/water/subpen_opaque.tga
qer_keyword natural
qer_keyword liquid
qer_keyword subpen
qer_keyword add-on
qer_keyword ocean
surfaceParm water
surfaceparm trans
surfaceParm noimpact
{
map textures/water/opaque.tga
blendfunc blend
}
{
map textures/water/noise.tga
tcMod transform 1 0 0 1 0 0
tcMod scroll 0.01 -0.13
nextbundle
map textures/water/noise2.tga
blendfunc add
tcMod transform 1 0 0 1 0 0
tcMod scroll 0.12 0
}

{
map textures/water/subpen_waves.tga
blendfunc blend
alphagen const 0.5
tcMod scroll 0 0.01
}
{
map textures/water/water_shadows.tga
tcMod scroll 0 0.07
nextbundle
map textures/water/water_shadows2.tga
blendfunc filter
tcMod scroll 0.07 -0.07
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
depthFunc equal
}
}

The purpose is for a large body of the water btw, not the foam.




Last edited by Vexar on 03-12-2005 05:24 PM, edited 1 time in total.

Top
                 

Insane Quaker
Insane Quaker
Joined: 04 Aug 2000
Posts: 255
PostPosted: 03-12-2005 05:26 PM           Profile Send private message  E-mail  Edit post Reply with quote


Do a search google search for Spearhead Demo




Top
                 

Insane Quaker
Insane Quaker
Joined: 04 Aug 2000
Posts: 255
PostPosted: 03-12-2005 05:33 PM           Profile Send private message  E-mail  Edit post Reply with quote


With out the textures it's not going to help that much... we also tagged the textures visually so we could see the water direction flow in the editor as they need to be aligned properly so the transision is seamless. Sorry about the 56k, that sucks. I can't post the textures as it would be aganist the law, sorry about that too.




Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.