Water Movement

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Rich Tea Biscuit
Corporal
Posts: 34
Joined: Wed Apr 25, 2007 11:57 pm
Location: mohaa\dm2

Water Movement

Post 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..
Image
User avatar
k47a
товарищ
Posts: 810
Joined: Fri Mar 25, 2005 1:19 pm

Post by k47a »

just change the shader...
Image
Rich Tea Biscuit
Corporal
Posts: 34
Joined: Wed Apr 25, 2007 11:57 pm
Location: mohaa\dm2

Post by Rich Tea Biscuit »

k47a wrote:just change the shader...
I am noob. Hear me Roar.

A little elaboration please?
Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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

Code: Select all

textures/richtea/sinkwater
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 :P
User avatar
StarGeneral
Sergeant
Posts: 67
Joined: Wed Oct 17, 2007 5:21 am

Post 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.
"Si vis pacem, para bellum."
"If you want peace, prepare for war."
User avatar
k47a
товарищ
Posts: 810
Joined: Fri Mar 25, 2005 1:19 pm

Post 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
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

sink

Post 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.
Tom Trude,

Image
User avatar
k47a
товарищ
Posts: 810
Joined: Fri Mar 25, 2005 1:19 pm

Post 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>
Image
Rich Tea Biscuit
Corporal
Posts: 34
Joined: Wed Apr 25, 2007 11:57 pm
Location: mohaa\dm2

Post 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.
Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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 Manual

Code: 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
	}
}
Rich Tea Biscuit
Corporal
Posts: 34
Joined: Wed Apr 25, 2007 11:57 pm
Location: mohaa\dm2

Post by Rich Tea Biscuit »

wacko wrote:the stock largestream won't change
Doh :oops:

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?
Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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 :wink:
Also, what parts of the model should become transparent?
User avatar
k47a
&#1090;&#1086;&#1074;&#1072;&#1088;&#1080;&#1097;
Posts: 810
Joined: Fri Mar 25, 2005 1:19 pm

Post 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
	}
}
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

shinny

Post 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.

Image

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.
Tom Trude,

Image
Rich Tea Biscuit
Corporal
Posts: 34
Joined: Wed Apr 25, 2007 11:57 pm
Location: mohaa\dm2

Post 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.
Image
Post Reply