sea effect in DP

Discuss the construction of maps and the tools to create maps for 3D games.
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

sea effect in DP

Post by Nahuel »

i wanna to get some effect to a beach in a "coast" map. I am using DP : what do you think about to get waves and a nice "beach" effect in q3bsp? I can use some custom functions in qc if this beach effect requires some qc modification. Do you have some ideas to get a beach in dp with q3bsp?
hi, I am nahuel, I love quake and qc.
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: sea effect in DP

Post by ceriux »

id just have a plane laying partially over your water and beach. have it animated/alpha'd.
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: sea effect in DP

Post by frag.machine »

mp_beach in Return to Castle Wolfenstein MP comes to mind. Maybe checking it can give you a hint ?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Seven
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: sea effect in DP

Post by Seven »

Hi Nahuel,

You could maybe make use of hipnotics up/down moving water feature.
Intersected with a slope (which is the sand).
I do not know if this is possible.
When the water goes upwards then, the surface would become bigger in the slope direction.
When the water goes downwards then, the surface would become smaller in the slope direction.
Like on a real beach.
If it helps: the water area can also reach below the sand area. But player cannot "sink" in sand (which is solid).

For the splashes / foam, you could use several particle effects around the edges between slope and water.
Just an idea...

Or use 2 different floating speed water areas (beach = fast and deep water = slow) like this:
(watch start of clip):
http://www.youtube.com/watch?v=no7JsOy87vs
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: sea effect in DP

Post by goldenboy »

Good question; I also have one level that includes a seashore.

I'm not at the point where I'm doing the surf yet, but I have been thinking about it.

My ideas so far have involved either overlaying a shader to make it seem like waves hitting the beach, or to actually create an animated mesh of waves.

It depends how big the waves need to be, and on the shape of the waves. If it's just smaller waves that don't break, a shader with a normal map might do. For larger, breaking waves, I guess an animated mesh and particle effects would be needed.

Those are my 2 ideas on how to do it, anyway. I'm interested to know about other ways.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: sea effect in DP

Post by Spike »

reminds me of the film Truman Show.
if you swim out in the water, what's to stop the player from swimming into the skybox? or rather, that the water does not actually extend to the horizon, which is visible closer to shore.

I would say that most water shaders that consider distance from shore add some froth or so in the shallow water, based upon the refraction depth map and its distance from the water surface. use some texture with x+y for one axis and depth on the other and you can probably cover the edge of the shore fairly nicely. then you just need to raise the sea up and down slightly somehow and you've got waves.
I really wouldn't recommend doing huge crashing waves. that sort of thing requires lots of particle effects and stuff too.
if you were going to model it properly, you'd have different parts of the water surface move up and down separately. this makes the refraction/reflection images a real nightmare though. its easier to keep your geometry flat and implement whatever waves via a few scrolling textures in glsl. don't forget some specular on the wavecrests!
the key thing is that shallow areas = shallow waves, which means you don't reveal dodgy areas where your geometry wasn't drawn properly. combined with surf, you'll essentually mask off anywhere that's slightly close to shore and have no issues with black areas because of that.

but yeah, you will need some custom glsl for an actual beach scene.
Spiney
Posts: 63
Joined: Mon Feb 13, 2012 1:35 pm

Re: sea effect in DP

Post by Spiney »

How about Q3 patch meshes with texture panning (using the non-tiling flag, which name is escaping me) + up/down vertex shader.
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: sea effect in DP

Post by goldenboy »

if you swim out in the water, what's to stop the player from swimming into the skybox?
I've been thinking about this. I'll just have my protagonist refuse to swim in the ocean. This is actually quite realistic. Swimming at an unknown beach with full gear on and carrying weapons etc. is probably suicide (currents...) unless you're specially trained for it.

If the player forces her in with explosives or something, she will drown. Stupid player is stupid.

It's not Quake! :wink:
Spiney
Posts: 63
Joined: Mon Feb 13, 2012 1:35 pm

Re: sea effect in DP

Post by Spiney »

Sharks. With lazerbeams :mrgreen:
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: sea effect in DP

Post by goldenboy »

Personally I also liked how in Far Cry 1, if you swam towards the sea a helicopter would magically appear and gun you down. :mrgreen:
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: sea effect in DP

Post by frag.machine »

goldenboy wrote:
if you swim out in the water, what's to stop the player from swimming into the skybox?
I've been thinking about this. I'll just have my protagonist refuse to swim in the ocean. This is actually quite realistic. Swimming at an unknown beach with full gear on and carrying weapons etc. is probably suicide (currents...) unless you're specially trained for it.

If the player forces her in with explosives or something, she will drown. Stupid player is stupid.

It's not Quake! :wink:
Corridor-style gameplay ?... :|
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: sea effect in DP

Post by goldenboy »

frag.machine wrote:
goldenboy wrote:
if you swim out in the water, what's to stop the player from swimming into the skybox?
I've been thinking about this. I'll just have my protagonist refuse to swim in the ocean. This is actually quite realistic. Swimming at an unknown beach with full gear on and carrying weapons etc. is probably suicide (currents...) unless you're specially trained for it.

If the player forces her in with explosives or something, she will drown. Stupid player is stupid.

It's not Quake! :wink:
Corridor-style gameplay ?... :|

Uh, no?

Not being able to enter the only ocean in the game does not constitute corridor style gameplay. The outdoor area in question is thousands of qu across, most of them explorable, and contains several bodies of water, all of which will be swimmable -- with the exception of the "ocean".
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: sea effect in DP

Post by frag.machine »

phew... :D
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Re: sea effect in DP

Post by scar3crow »

Are you viewing it from above? Looking at it head-on? Can you walk down to it?

If viewing from above, you can just have a water bob like in Hipnotic against a slope with exaggerated changes to give the illusion of depth.

If looking head on, I recommend a rocky coast line with a shader to give the impression of movement, but also particle emitters behind the rocks to give the impression of spray.

Going into it or at least walking down very close is a whole other matter.
...and all around me was the chaos of battle and the reek of running blood.... and for the first time in my life I knew true happiness.
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: sea effect in DP

Post by leileilol »

It's all about trying to blend in with an infinite sea skybox. Usually a big alpha blended color blend texture to the skybox can work the illusion. For Q3 one would make this water use the blend texture scaled up to hit all edges of the water bounds, with a shader that has a second stage under it used as the wave texture.



Sometimes skyrooms can help - Q3MAP2 has support for that and it's kind of a neat illusion. This is recommended if you wanted passing clouds in your sky while trying to do the sea illusion, though I am not certain if Darkplaces can handle that weird hack.
i should not be here
Post Reply