Author Topic: Sea Waves  (Read 2404 times)

Legacy_KlatchainCoffee

  • Sr. Member
  • ****
  • Posts: 372
  • Karma: +0/-0
Sea Waves
« on: March 22, 2012, 12:58:54 am »


               I am building a sea-voyage based campaign and am wondering if there is anything out there for simulating big sea storms.

In particular I'm looking for something like large sea waves that seem to engulf a ship in the middle of an ocean storm. This could either take form of an animated 'walkable' placable (something like existing water cover placable) or something akin to fog, rain or snow effect placables.

I would be very grateful for any information on whether something like this has been done and is accessible or, if not, how complicated it would be to create from scratch.

Thanks in advance!
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Sea Waves
« Reply #1 on: March 22, 2012, 05:18:56 pm »


               

KlatchainCoffee wrote...

I am building a sea-voyage based campaign and am wondering if there is anything out there for simulating big sea storms.

In particular I'm looking for something like large sea waves that seem to engulf a ship in the middle of an ocean storm. This could either take form of an animated 'walkable' placable (something like existing water cover placable) or something akin to fog, rain or snow effect placables.

I would be very grateful for any information on whether something like this has been done and is accessible or, if not, how complicated it would be to create from scratch.

Thanks in advance!


I haven't seen anything like what you're describing.  The only effects I'm aware of are smaller scale effects which are really just emitter effects at the base of a ship, where the boat meets the water.  So...this package on the Vault has some ship tiles where you can turn on some animations on the tile and it'll make those effects.  Look at ReadMe_Galleons.htm and check out the section titled "A Quick Note".  Maybe someone else knows of something closer to what you're thinking of.  As far as "complicated" goes...it depends on whether you know how to edit models for NWN.

...or, if not, how complicated it would be to create from scratch.

(looks around furtively, lowering his fourth cup of coffee with a shaking hand)

"Did somebody say...from scratch?!?!"  '<img'>

If you don't do 3D custom content in NWN, the rest of this message won't be terribly useful to you.  There will be a nice picture and a video to click on and watch but that's about it.  The rest of this is for other CC makers here who might want to take a stab at this or if you do know your way around GMax/Max.  It would be awesome if you were a custom content creator because you could make one heck of an environment for your players to ride around in during the adventure.

To create an effect specifically like the one you describe, there are a few minimum requirements, IMO.  First, the ship has to pitch forward and back like it's rocking on the seas. Second, there has to be some big splashing going on when it pitches down into the oncoming waves.  And third, it helps if you have the impression of the ship moving forward, into the waves.

So:
1. Ship pitches forward and back
2. Big splashing going on when it pitches into the waves
3. Gives the impression of moving forward

I'll explain how to do the first aspect from scratch and give some ideas how to address the other two afterward.

Since the game engine doesn't allow a player-walkable ship to pitch like that (and still remain believeable), the solution is to make everything else pitch to and fro and let the human mind fool itself, or hopefully fool itself, into believing it's the ship that's doing the pitching.  One way you could achieve the effect is by making a false world out of a sphere and encapsulate the player in it.

Like this:
'Posted

This is a super basic implementation of how that would work.  Just need a few parts- here's how their hierarchy in Max:
'Posted

plc_a01 - My model name.  I always replace the Armoire appearance when I test.
animdummy - Dummy node, used to animate the pitching
false_world_sphere - Skybox.  A sphere with a sky map applied (a sphere map) whose normals are flipped so the texture is on the inside of the sphere instead of the outside.  I left it at the default number of segments (32?) and used sphere mapping with a sphere map of a sky I found online.  Radius is 2500cm, which is fine for the default camera.
ocean_surface - The...(wait for it)...surface of the ocean.  This was a circle shape I made in Max, giving it a radius of 2600cm, which makes it slightly larger than the skybox, whcih is fine.  I don't want to run out of ocean.  To turn it from a circle shape into a flat circle, I just applied the Extrude modifier without any sort of special settings and that fills it in, turning it into a disc from a circle.  I then applied a sea texture I found online.

This is the basic setup for the effect and how it would work.  As you can see, the false world skybox and the surface are both children of the animdummy so they're connected to it and whatever the animdummy does, they'll do.  Since I'm doing this quick proof-of-concept as a placeable (more on different ways to do this a little further down), changed the time configuration to 149 frames (since frame 0 counts, that gives me 150 frames or 5 seconds for my cycle), then I created a default animation on the placeable and give it a frame range of 0 to 149.

I click on the Key Filters button, make sure Rotation keys are the only thing checked, click the Auto Key button next to it, and making sure animdummy iis the only thing selected, click on the key icon to lay down a key at frame 0.  Move the animation slider to frame 38 (about 1/4th of 150) and rotate the animdummy 2 degrees, pitching it forward and since I'm in Auto Key mode, the animation keys are laid down for me as soon as I move or rotate something.  Then to frame 75, rotating the animdummy back up 2 degrees to where it was.  Move the slider to frame 112, pitch the animdummy up 2 degrees, then turn off autokey.  Finally, I select the first frame of the animation and, hodling down the SHIFT key (copy), drag it to the very last frame.  That gives me a full pitch cycle.  Playing it, I can see the world and ocean move as I like.

And that's that!  Here's what it looks like:
'Posted

This is the tame version but you should get the idea.  Increase the pitch and you might even make a player or two queasy.  How's that for immersion!  So that's how to achieve the first part of the effect...from scratch.

That still leaves us with splashing from the bow and creating the illusion of movement.  Some ideas on how to do those:

Splashing: Emitters using a detonation event would seem to be the way to go here.  Might run into problems getting the emitters in just the right places to line up with the bow of the boat since we're doing this as a placeable.  See "Bonus Points", below.  Will require tweaking, as emitters always do, to make sure they go off at just the right time in the pitch cycle as well.

Illusion of Forward Movement: There are a couple of  different ways to approach this.  Remember, we can't move the ship so everything else has to do the moving, etc.  I can think of three ways, from easiest and do-able to craziest and hypothetical:
1. Use the "conveyor belt" method such as that which is used on for the moving chain in tsw01_a02_03.mdl from the Steamworks tileset.
2. Use animesh to animate the textures and or verts to give the illusion of movement.  Really, this is about making the texture scroll.  See Baba Yaga's excellent demo of the effect here and Bannor Bloodfist's tutorial on reproducing the effect here.
3. Using skin mesh and bones to simulate the movement of the waves.  Bone objects would act as waves, moving under the surface of the non-moving static ocean and giving the impression that the waves were moving "through" the texture, deforming it as they went.  I believe it would work this way.  If not, bones which just moved up and down, instead of laterally, could be used and timed in such a way that they could give the illusion of a "moving" wave.  As in , in a grid of bone objects, the far right side rise up, then down.  As they go down the next column of bones move up then down.  And so on.

The first of those three gets the job done and probably is as good as anything the other two would net you.

Bonus Points: This effect is nice but you're fighting against the existing water plane.  If your pitch is too much, the pitching water plane you made will dip down enough that you see the real water plane that's part of the tiles whcih surround the ship.  The solution to this is either raise the pitching water plane you made (you can just adjust the placeable's height in the toolset), reduce the pitch or...make a new tileset with the pitching water plane built in.  I like the idea of doing this as a tileset because it gives you a lot more control over the scene.
               
               

               


                     Modifié par OldTimeRadio, 22 mars 2012 - 05:29 .
                     
                  


            

Legacy_nwnsmith

  • Full Member
  • ***
  • Posts: 125
  • Karma: +0/-0
Sea Waves
« Reply #2 on: March 22, 2012, 06:03:23 pm »


               I'm sorry but every now and then I get overwhelmed with how talented and fun this community is !!!!
               
               

               
            

Legacy_Karvon

  • Sr. Member
  • ****
  • Posts: 430
  • Karma: +0/-0
Sea Waves
« Reply #3 on: March 22, 2012, 08:47:43 pm »


               Wow, I'd be happy with just a simple hak for that rocking motion '<img'>

Karvon
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
Sea Waves
« Reply #4 on: March 22, 2012, 09:15:30 pm »


               I have made some wave placables I never got back to making the crest emitter but they turn out real nice. Interesting on how you did the rocking. I get it put together and release it and some other stuff around spring break early April.
               
               

               
            

Legacy_NWN_baba yaga

  • Hero Member
  • *****
  • Posts: 1944
  • Karma: +0/-0
Sea Waves
« Reply #5 on: March 22, 2012, 09:22:53 pm »


               Yeah, OTR! You are unbelievable fast and good in creating new environmental stuff. Its always a pleasure and inspiration to see your realizations of ideas:) The shorewaves from ShadowM are also very cool. I used them heavily for an area in my module.
               
               

               
            

Legacy_KlatchainCoffee

  • Sr. Member
  • ****
  • Posts: 372
  • Karma: +0/-0
Sea Waves
« Reply #6 on: March 22, 2012, 09:25:30 pm »


               I have to chime in with the other responses. I've been an admiring 'lurker' in this community for a while and can only confirm once again that you guys are amazing!

Thanks for a quick and extremely helpful reply, just the stuff in that video is already so much better than nothing.  This is a long sea voyage involving many land and underwater adventures, but it would lose much without at least some degree of realism of the water in the middle of the ocean.

I had already contemplated how movement of a walkable ship can be simulated and concluded that providing the illusion of everything else moving is the only way. Several 'false world' spheres can be created for 'normal', 'windy/rough' and 'very stormy' seas. From your video it seems to work quite well. Splashes of water and a possible wake line would indeed be bonuses.

Creating a tileset for this should not be too difficult, as only one tile type would be essential for this effect [not counting all the possible ship tiles that could be included in it].

Having loads of ideas an some amount of artistic skill, I would really love to create some 3D custom content for NWN if I ever have the time to learn the right tools. '<img'> I have to say that browsing this forum gave me a good deal of inspiration to make an affort and find the said time.

I will definitely look into them shorewaves as well - they've beenon my 'wishlist' for this mod for a while now.  Thanks![smilie]../../../images/forum/emoticons/grin.png[/smilie]
upd: Having had a browse through the vault would appreciate a link to the shorewave hak.
(I actually have a really old hak with small-ish animated shorewave placables, but they only work in the toolset - when you place them and completely disappear when you run the mod. )
               
               

               


                     Modifié par KlatchainCoffee, 22 mars 2012 - 09:33 .
                     
                  


            

Legacy_Vipre

  • Newbie
  • *
  • Posts: 49
  • Karma: +0/-0
Sea Waves
« Reply #7 on: March 23, 2012, 12:02:29 am »


               That is one of the coolest things I've ever seen done to NWN. Unreal.
               
               

               
            

Legacy_Vivienne L

  • Full Member
  • ***
  • Posts: 130
  • Karma: +0/-0
Sea Waves
« Reply #8 on: March 23, 2012, 12:37:46 pm »


               Wow, awesome stuff!!
ShadowM, your shorewaves are awesome but they were a little hard to find (they are yours, right; the author's name is different there!); here's the link for anybody who's interested

Shorewaves

KlatchainCoffee, you're going to have to 'unclick' the static button in the properties of this placeable for it to show up in the game!

OldTimeRadio, that 'sphere animation' is awesome!!  I'm feeling seasick now:blink:!
               
               

               


                     Modifié par vivienne.l, 23 mars 2012 - 04:43 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Sea Waves
« Reply #9 on: March 23, 2012, 01:59:23 pm »


               <holding out his own shakey hands..>

Add in some scripted camera movement (I think the storm scene in Relbonian Chronicles did this very well) and you have some truly great "immersion".

(ex-salvage sailor here) I think I still have somewhere some incredible footage of huge ice-choked waves sweeping some crew men overboard while the Coast Guard were trying to air-lift them off a crabber pinned to the rocks on St. Paul Is. That sort of elementally monster wave smashing into a ship and sweeping it clear is viscerally intense. 3 guys running across the deck and this freight-train of ice and water bearing down on them, the crowd on the cliff above (including the camera-man) screaming at them and then a chaotic maelstrom and breath held waiting to see them re-emerge... and only one bright orange suit clinging to the rigging! Then a dark head pops up and then another... between the grinding ship and the dark rocks!

*Really* like your idea of the sky-box placeable, OTR. I should have thought of that :-)

Oh, all the men were rescued, BTW. The helo pilot was re-assigned to tropical climes... She had broken regs to fly in icing conditions, but since she saved 5 lives, they couldn't very well discipline her, could they? ;-)

<...with an unsteady camera>
               
               

               


                     Modifié par Rolo Kipp, 23 mars 2012 - 01:59 .
                     
                  


            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
Sea Waves
« Reply #10 on: March 23, 2012, 06:41:36 pm »


               No though are not my waves, but I did start my work with them. My waves are even better they actually move like wave and have the crest appear. Mine are placables with a number of varieties that will allow you to do shores and sea effect. That what I was talking about I have to take his emitters and add them to my placables. '<img'> I have to dig them out and take some pics for you all when I can. '<img'>
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Sea Waves
« Reply #11 on: March 23, 2012, 10:08:12 pm »


               Heh heh!  I'm glad you folks are liking this.  I thought I was going to be done with it but I found myself playing around with it a little more in order to test out some ideas regarding the illusion of forward movement through the water. 

The idea was this: Make simple animated waves using the Noise modifier.  Animate the texture using the UVW Xform modifier.  Animate both of those with just 5 keyframes each over the length of 150 frames.  Modify my UVW Mapping to break up the evenness of the grid so as textures move over the plane they distort, even without the waves.  And finally, drop a Smooth modifier on top of it all and tune autosmooth just until all my hard edges were gone.

Going into all I did would get probitively long but here's how my modifer stack looked when I was done.  The main bit is I selected a single vert on my ocean surface (I switched to a 30x30 plane) and used Soft Selection to push out influence till just before the plane intersected with my world sphere.  This way, waves closer to the boat are bigger.  Waves farther away, smaller.  Waves on the absolute horizon do not exist at all.
'Posted

'Posted

Definitely not perfect but I think it proves the concept .  I probably won't even bother with emitter splashes though I will work more on the waves- which you can see aren't very well done.

I'm going to keep on exploring this and seeing what can be done.  Unfortunately, because of the water plane the only way to get this to work and look nice is to redirect the ocean textures to a transparent texture, which is not going to cut it.  If I can use trickery and keep this a placeable, I think I migth do that instead of a tileset.

If I do try this as a tileset, can anyone hook me up with a list of ship models/tiles which should be included in order to make a sensible transition from a docked ship tile in Rural to the same ship out at sea?

Any more ideas about how this could be handled are welcome.  For instance, this skybox is just big enough for a 1x2 ship.  How physically big do you folks think something like this should be, etc.?
               
               

               


                     Modifié par OldTimeRadio, 23 mars 2012 - 10:13 .
                     
                  


            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
Sea Waves
« Reply #12 on: March 23, 2012, 11:11:18 pm »


               You could add a rotating cresting emitter under the boat for the effect of it cutting through the waves. Very nice 'B)'
               
               

               


                     Modifié par ShadowM, 23 mars 2012 - 11:13 .
                     
                  


            

Legacy_KlatchainCoffee

  • Sr. Member
  • ****
  • Posts: 372
  • Karma: +0/-0
Sea Waves
« Reply #13 on: March 23, 2012, 11:42:12 pm »


               ShadowM: I would very much appreciate if I was able to get hold of some decent shore waves for this campaign, as there are quite a number of beaches involved. I've been using 'Castle Rural' tileset a lot, but also used ixxon coast hak [attaches to Rural Grass] for variety - nice sandy beaches - minus the cliffs - but no waves to speak of [similar problem with the much better-looking W0rm tileset].

vivienne.l: Thank you! I'll be sure to look into it, though they may need some tinkering to be compatible with latest versions of NWN.

OTR: Despite any shortcomings, this looks good in the sense of giving the illusion of movement across the water.

This is a fairly long voyage into uncharted seas and so needs to feature a larger ship housing 50 (give or take) crew and passengers. I've looked quite thoroughly through the availiable models and Carrack, the model I like the most, which already exists in 'docked' and 'sailing' forms as a tile in the City Exterior tileset, is a little bit too small for the purpose at 1x4. I'm currently trying to look into whether it would be possible to 'enlarge' this model/tile to 1x5 or even 1x6.

I have never changed the size of a placable or a tile feature before, but I've heard of similar things being done.

There is also the nwn2 'ghost ship' model, which is 2x7, but I don't like its disproportionately short masts and lack of sails.

This is going to be a weekly campaign that may end up catering to between 5 and 25 people, some of them entirely new to NWN, hence the concern with space and appearences.

Thanks again - everyone has been exceptionally helpful here. :happy:
               
               

               


                     Modifié par KlatchainCoffee, 23 mars 2012 - 11:44 .
                     
                  


            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
Sea Waves
« Reply #14 on: March 23, 2012, 11:55:35 pm »


               Nice work so far, OldTimeRadio!

For the skybox, I think it needs to be much larger.  Right now to me it really does look like the inside of a ball rocking back and forth., or else the effect of a ship sailing around a very, very small watery planetoid. '<img'>

The watery texture moving under the water is a very cool effect.

I like the placeable idea.  Having it centered on the ship means it would be rendered for anyone onboard.

Perhaps have water part of the placeable include waves that move across the whole thing, rather than in the same position against the ship?

Or have it a combo tileset/placeable system....the ship tiles as placeables, but without a water layer below so that the placeable water+sky doesn't clip with existing water.  It could even be animated in a way that makes it look like the ship is moving up and down large swells (rather than cresting waves).

All in all, it looks like it would start to get complicated as you start to get more realistic, but could end up very convincing once fully functional.