Page 1 of 2
Water Movement
Posted: Thu Nov 29, 2007 6:41 pm
by Rich Tea Biscuit
Is there a water texture that doesnt not have some form of waves? Every texture I find rocks from side to side in a polygonal way, I'm just looking for some water to fill a sink with, thus needing it to be physically static, but not necessarily un-animated..
Posted: Thu Nov 29, 2007 7:22 pm
by k47a
just change the shader...
Posted: Thu Nov 29, 2007 7:50 pm
by Rich Tea Biscuit
k47a wrote:just change the shader...
I am noob. Hear me Roar.
A little elaboration please?
Posted: Thu Nov 29, 2007 10:12 pm
by wacko
1st you got to choose the liquid that suits u the most, e.g.
canal_sludge
2nd, in radiant u can find that
canal_sludge is in folder
misc_outside
3rd open pak0.pk3
4th enter folder scripts and find
misc_outside.shader and copy it to your desktop
5th open this file with Notepad (I personally prefer notepad++)
6th find this part starting with textures/
misc_outside/
canal_sludge:
Code: Select all
textures/misc_outside/canal_sludge
{
qer_editorimage textures/misc_outside/canal_sludge.tga
qer_keyword natural
qer_keyword liquid
qer_keyword ocean
qer_trans .4
surfaceparm trans
surfaceparm water
surfaceparm nolightmap
cull none
//deformvertexes wave 30 sin 0 60 0 .1
deformvertexes wave 2 sin 0 1 0 .2
{
map textures/misc_outside/ocean2_green.tga
depthwrite
blendfunc add
tcMod scroll 0.03 0.03
nextbundle
map textures/misc_outside/oceanbrite.tga
tcMod scroll -0.02 -0.02
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthfunc equal
}
}
7th copy/paste this part into an empty text-file
8th change the header to something like
9th put 2 slashes (//) in front of the deformvertexes making it a comment and thus stopping the waves
10th u've got sth like this:
Code: Select all
textures/richtea/sinkwater
{
qer_editorimage textures/misc_outside/canal_sludge.tga
qer_keyword natural
qer_keyword liquid
qer_keyword ocean
qer_trans .4
surfaceparm trans
surfaceparm water
surfaceparm nolightmap
cull none
//deformvertexes wave 30 sin 0 60 0 .1
// deformvertexes wave 2 sin 0 1 0 .2
{
map textures/misc_outside/ocean2_green.tga
depthwrite
blendfunc add
tcMod scroll 0.03 0.03
nextbundle
map textures/misc_outside/oceanbrite.tga
tcMod scroll -0.02 -0.02
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthfunc equal
}
}
11th save this file with name
richtea.shader into the folder mohaa/main/scripts. If it doesnt exist yet, create it and put the file into it. (It's 'mohaa' here, can be different at yours)
12th in radiant choose your texture
13th pray it works

Posted: Fri Nov 30, 2007 4:03 am
by StarGeneral
Does it really have to be that complicated? theres a few water textures that dont move around, I thought the canal sludge one didnt move around...If you have the stargefrothywater water texture try that, I dont think it moves around.
Posted: Fri Nov 30, 2007 8:57 am
by k47a
afaik the frothy water thing doesnt even look like water...
if you want to make a water texture that doesn't move at all:
textures/richtea/water
{
qer_editorimage your_texture.tga
qer_keyword richtea
qer_keyword liquid
qer_keyword ocean
qer_trans .4
surfaceparm trans
surfaceparm water
surfaceparm nolightmap
cull none
{
map your_texture.tga
depthwrite
blendfunc add
nextbundle
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthfunc equal
}
}
--> save as richtea.shader (save as 'all files')
instead
your_texture.tga enter the path of your texture, e.g.
textures/richtea/water.tga
make two folders:
textures>richtea --> in this you put your image
scripts --> in this you put your shader file[/code]
then you pack these two folders in a pk3 and put it in your main folder
sink
Posted: Fri Nov 30, 2007 11:00 am
by tltrude
Even if you manage to make a new water texture, it will be hard to make it look/act real is such a small space like a sink. You'll need to scale the texture way, way, way down.
Posted: Fri Nov 30, 2007 1:16 pm
by k47a
we're talking about mohaa here, tom... does *anything* look real in there?
but either way, if you wish to give it some movement, include these lines
Code: Select all
deformvertexes wave 30 sin 0 60 0 .1
deformvertexes wave 2 sin 0 1 0 .2
and play around with the numbers
whereas
deformVertexes wave <div> <func> <base> <amplitude> <phase> <freq>
Posted: Fri Nov 30, 2007 3:30 pm
by Rich Tea Biscuit
Thanks for the help everyone
Initially I tried modifying a copied shader (I think I copied LargeStream in the Ocean.shader) by removing the deformvertexes value and got nothing. It still moved about in a bizarre floating way.
I believe next on the list is creating a custom texture and scripting it as a water texture.
Posted: Fri Nov 30, 2007 3:53 pm
by wacko
If you did sth like the following based on that largestream, it won't move, bacause there's no command to do so. Of course you must use this new texture, the stock largestream won't change
Indepth knowledge of all the shader commands u can find in th
Q3 Shader ManualCode: Select all
textures/richtea/sinkwater
{
qer_editorimage textures/misc_outside/stream1.tga
qer_trans .4
surfaceparm nonsolid
surfaceparm trans
surfaceparm water
cull none
nopicmip
// deformvertexes wave 30 sin 0 10 0 .2 --------------------------commented out
{
map textures/misc_outside/stream2fx.tga
tcGen environment
tcMod turb 0 .003 0 1
nextbundle
map textures/misc_outside/stream2fx.tga
tcGen environment
tcMod turb 0 .001 .3 4
}
{
map textures/misc_outside/stream1.tga
blendFunc blend
rgbGen identity
tcMod scroll .05 -.025
// tcMod trans .5
}
{
map $lightmap
rgbGen Identity
blendFunc GL_DST_COLOR GL_ZERO
}
}
Posted: Fri Nov 30, 2007 4:29 pm
by Rich Tea Biscuit
wacko wrote:the stock largestream won't change
Doh
So the code has to be for a new texture.. ok.
Erm, whilst we're on the topic of Textures, I have another quick question: I'm trying to change Wehrpass.tga
(the first set of german papers:
pak2 > textures > models > items > wehrpass.tga) into something a little more contemporary, in the form of an ID card. I've layered it on top in the TGA file using photoshop, and hidden the background, which I'd hoped caused a transparency effect, alas, it hasnt. How would I go about doing transparency *around* the card, so the rest of the papers model doesn't show?
Posted: Fri Nov 30, 2007 5:37 pm
by wacko
yep, a new texture but still using the old image files
2nd, wehrpass, there's no transparency support in the corresponding shader, that's why
Also, what parts of the model should become transparent?
Posted: Fri Nov 30, 2007 6:18 pm
by k47a
to make something transparent in game, you need an alpha channel... (check the hud stuff, most textures on there use it)
either way, if you completely wanna change the pass to something else, it would be better to make a new shader for it...
i don't know if this helps you, but instead of looking through the original pk3 to find the shader i want, i (mostly) just modify this one:
Code: Select all
textures/traktorwerk/concrete04
{
qer_keyword traktor
surfaceparm rock
qer_editorimage textures/traktorwerk/concrete04.tga
{
map textures/traktorwerk/concrete04.tga
rgbGen identity
depthWrite
nextbundle
map $lightmap
}
}
shinny
Posted: Sun Dec 02, 2007 6:37 am
by tltrude
Sounds like you want a shinny plastic layer over a stock texture. You can do it by adding a reflective layer -- like you see on windows. Here is the shader for shinny gold, and the reflective layer is in orange.
textures/custom/glanz_gold
{
qer_editorimage textures/custom/glanz_gold.tga
qer_keyword gold
qer_keyword metal
surfaceparm metal
surfaceparm nomarks
{
map textures/mohcommon/envnormndy_day.tga
tcGen environment
}
{
map textures/custom/glanz_gold.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
}
The reflective layer image (envnormndy_day.tga) is a distorted image of buildings and sky, but you can use a different image that looks more like shinny plastic if you want -- like "textures/test/window_env.tga". Also, the "blendFunc" lines are part of what makes it look shinny.
If you want to see the glanz_gold.tga image in action, you can download it
here. The zip includes a playable test map and the .map file.
Posted: Mon Dec 03, 2007 7:08 pm
by Rich Tea Biscuit
wacko wrote:Also, what parts of the model should become transparent?
Basically looking to turn WehrPass
into an ID Card, so whilst I've placed the texture roughly on top of the paper (so it looks correct when being held), my mate Thingshappen created an alpha channel around it, so it looks nothing like the papers. The texture is below:
http://www.fileden.com/files/2007/3/3/8 ... hrpass.tga
Shaders.. Righty, I shall enlist the help of my scripting guru.