Ocean terrain


(Danyboy) #1

I have a pretty darn sure feeling the sea in battery is not just a brush but a terrain - shader file

I tried making my own - but all went fine except when applying a base texture to the sides of the brushes that were’nt on the surface.

I applied a water texture instead of the usual caulk and the results were odd to say the least.
Just like to know what texture to apply to the other five sides of the ocean terrain.

Cheers Sock :slight_smile:


(damocles) #2

Nodraw non-solid should do fine. Unless things have changed in ET since Wolf.


(Danyboy) #3

erm i think i tried that but brushes were no longer kept their water surfaceparms - i will try again but im not sure.

Will keep you posted


(Lanz) #4

You need to use a shader which is both nodraw and water and apply that to the sides that meet another water brush.

Like this:

surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
surfaceparm water

I “think” I saw a shader like that in common called nodrawwater.


(Danyboy) #5

ok just letting u know

applying nodraw doesn’t work - the brush has texture applied fine, deformvetexes works - but its still solid

will hunt around in the common textures


(Danyboy) #6

hmmph - no textures that look like they would do the job in common shader

that water_nodraw is in the battery shader - but still doesnt make the terrain liquid

EDIT - will try this texture: battery/ocean_terrain and will let you know


(damocles) #7

Not too sure why you keep saying “doesn’t make the terrain liquid”. Did you use a terrain brush for the water? Did you make it in easygen or similar? If so, chances are it has the terrain key in it’s properties and that is why it’s solid. Use a single large block for the water. Nothing else. Or several blocks if you want the water to be an unusual shape. (the wvaes etc are made at compile time according to the water shader values)

And make sure the water texture on top is aligned properly over the multiple blocks or the deforming wave vertices will be out of alignment.


(ydnar) #8

The water in Battery was done with a combination of nonsolid/trans terrain on the tops of the brushes, and nodraw on the sides.

A large nodraw-water brush was placed overlapping the terrain brushes.

This simplified the collision data, as there was only one large water brush to deal with.

y


(Danyboy) #9

Not too sure why you keep saying “doesn’t make the terrain liquid”.

take a wild guess - because the terrain group isn’t liquid in game :stuck_out_tongue:

Anyway

Am wondering after what ydnar said - is the ocean terrain made of triangles like normal terrains or just 1 large one - I doubt it’s one brush since the texturing of foam at rock outcroppings and the shoreline would be difficult - if not impossible - to my knowledge.

Plus after r_showtris 1 on battery the ocean is made up of the same triangles that the land terrain is[/quote]


(Wils) #10

The ocean you see really is just standard terrain with deforming vertices and a set of transparent layers for the various water visuals like wash and silt. It’s textured with non-solid shaders so you can’t walk on it.

The actual in game ‘ocean’ is the big water brush ydnar mentioned above, which happens to be invisible (otherwise you’d see two seas on top of each other… duh :))

If you removed the terrain, you’d have invisible water that still behaved like water, just you couldn’t see it. If you removed the water brush, you’d have non-solid terrain that looked like water but didn’t behave like it. Make sense?

The only caveat is that you can’t make the terrain deform too much (i.e. no really big waves) because the invisible water doesn’t deform, so it’s possible to drown while it appears you’re getting plenty of air because the non-solid terrain is dipping under the water brush when it deforms.


(Danyboy) #11

oooookay - erm not sure if that’s help or confused me more - i get confused easily :stuck_out_tongue: :???:

So let me striaghten out my thoughts-

You have in essence 2 parts to the water - a top part - which is a non-solid terrain with nice water FX

Then you have a large brush underneath made of no-draw and water surfaceparms

Is this 2nd brush underneath or occuping the same space as the terrain?


(damocles) #12

Same space.