Three newbie questions: Water, Terrain and Sunlight.

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
-Dash-
Posts: 16
Joined: Tue Mar 16, 2010 12:20 am

Three newbie questions: Water, Terrain and Sunlight.

Post by -Dash- »

Water:
If anyone would be so kind as to provide me with a shader I could use for water. I'm looking for a certain amount of transparency, the water to be rippling, and an image that appears on the top of the water.

The problem I was having was that I went about making water like this: I have a texture of tropical looking water. I texture a box, while the texture is connected to a water shader.

However, I think I know what I'm doing wrong. I believe the box must be using a caulk texture (could someone please explain caulk?) and one of the faces needs to be the actual tropical texture.

A dillemma of course is that I don't know how to texture single faces!

My last question (although not required) is if it's possible to make a realistic looking sea. What I mean is, one where waves crash up and down, swell (yes, the type in Crysis). Would this entail modeling an entire sea in 3DSMax and adding it to the level? I seriously doubt you could create a texture that would change the appearance of actual brushes.

Terrain:
I've been using EasyGen for terrain creation but my problem is polycount! The problem is that it creates faces that are boxes to connect the terrain. Is there a way to simply use single sided brushes like planes and connect them? That would cut the polycount in half!


Sunlight:

Is there ways to create rays of sun coming through trees or other objects on a map and reflecting on the ground? I'm assuming you'd have to mess around with the IDTech3 source A LOT.


Answer me or become cursed!
User avatar
Foo
Posts: 13840
Joined: Thu Aug 03, 2000 7:00 am
Location: New Zealand

Re: Three newbie questions: Water, Terrain and Sunlight.

Post by Foo »

ctrl-shift-click for a single face ;)

As for the water face - If you want the box (volume) to be actually filled with functional in-game water, then you need to cover all sides of the box with the water shader.

If you only want the water effect but the player won't be touching the surface, applying the water shader to a single face, and nodraw to the rest, will suffice.
dONKEY
Posts: 566
Joined: Mon Oct 15, 2001 7:00 am

Re: Three newbie questions: Water, Terrain and Sunlight.

Post by dONKEY »

-Terrain...Not exactly following what you are saying here. If you are making terrain from brushes the entire terrain wants to be caulk with just the visible faces textured. See Sock's awesome stuff for guidance on terrain creation and shader set up.
Alternatively you can model terrain, see Kat's equally awesome stuff for the best info on creating and using meshes in idtech3 and 4. Granted these are blender specific, but it should give you an idea.

-God rays (rays of light through windows/trees/from breaks in the clouds etc) are done with light beam shaders on brushes or patches. The effect is 'faked'.

-Water swell is possible with shader commands. You wont easily create breakers, but waves washing onto the shore can be and has been done. For realistic 'fade to the horizon' looking oceans you will need to use alphaMod brushes, in the same way as described in Sock's articles on terrain. Ydnar did a lovely little test map to demonstrate this effect, which someone else will have to link you to as don't have it any more.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Three newbie questions: Water, Terrain and Sunlight.

Post by obsidian »

Q3Map2 Shader Manual linked in my signature. ydnar's sample maps are located there as well.

Also, read and learn from the stock Quake 3 shaders. There are a lot of them and lots of good examples.

Caulk is typically used on the back-face of brushes, between coplanar faces, behind patches and sometimes to specifically block light. It is NOT used on water. In your terrain example, you WOULD use caulk on all the faces except for the top one.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
-Dash-
Posts: 16
Joined: Tue Mar 16, 2010 12:20 am

Re: Three newbie questions: Water, Terrain and Sunlight.

Post by -Dash- »

Thank-you kindly for the excellent and generous replies.

Two more questions. When I dive into the water how do I make it so that my whole view is green, as if I'm viewing everything from under green water?

And how do I change the water textue that I textured to the face of the water caulk semi-transparent, so that my picture of tropical ocean blends in 20% opacity with rock bottom of the stream?
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Three newbie questions: Water, Terrain and Sunlight.

Post by obsidian »

Green water - hint: Fog

Water transparency:
If parts of the texture are more transparent than others (like the waves are foamy and opaque but the swells are transparent), read up on using .TGA image files with alpha channels and using a shader with blendFunc blend.

If the entire surface has a uniform amount of transparency, read up on alphaGen const.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Post Reply