Author Topic: Streaming the water  (Read 407 times)

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
Streaming the water
« on: November 06, 2012, 04:54:16 pm »


               I am playing with some water terrain, and I would like to animesh the texture mapping to simulate the stream of the liquid. this is going to be tricky, for the tiles where the river bends, namely the gggw and the gwww (grass, water) variations of the tiles. I think also the wwww tile, when used on a bend, will be a tricky one. I am not sure if it is possibel to map the mesh to get this flow, so I ask here, maybe someone knows special techniques '<img'>
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Streaming the water
« Reply #1 on: November 06, 2012, 05:14:38 pm »


               I tried that with your demo of the flowing water that you release last year?  At the time, I tried several variations.

One thing that I did NOT try was to split the plane into two pieces.

However, there is something that you MUST remember, the engine auto-rotates tiles when it paints.  So, I was ending up with water flowing in opposite directions on two connected tiles.  I don't think there is a way to turn that feature off in the toolset.  I am not talking about rotating the textures, but the engine actually rotates the entire physical tile.

You can correct it, by just keep painting the same tile down until it rotates to the direction you need, but it is a pain in the arse doing that when building.  The main issue here is that when you paint a single tile, the engine also re-paints all nine tiles surrounding it, and it can, and sometimes does, rotate the connecting tiles instead of the one you are painting down... kind of a snowball effect.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Streaming the water
« Reply #2 on: November 06, 2012, 05:23:53 pm »


               <going around...>

Consider animating the tverts in a *rotation* rather than a linear movement, like Vibrant Penumbra did with the top of her Whirlpools:
'Image
That might get you around the bend, anyway...

Likewise, you might make the streambeds empty and create special stream placeables (with animesh) that fit precisely into them, allowing the animations to be one direction (off) or the other (on) or still (dead).

Just some ideas ;-)

<...the bend>
               
               

               


                     Modifié par Rolo Kipp, 06 novembre 2012 - 05:25 .
                     
                  


            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
Streaming the water
« Reply #3 on: November 06, 2012, 05:25:14 pm »


               I think Baba did the flowing river demo '<img'> I agree with the analysis, you will need to rotate wwww full water tiles to get the correct flowing direction, thats maybe boring but, if you 1st paint the whole river then activate the animations and rotate/ switch to animloop 2 when needed, you'll get nice STRAIGHT wide rivers! What stops me here is the texture mapping to get the water bend and the texture stay seamless
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Streaming the water
« Reply #4 on: November 06, 2012, 05:27:54 pm »


               <warping in...>

Ahhh! Then animate the texture linearly first, then warp the geometry after the texture is flowing.

Make a long, straight, many segment plane. Animate the texture. Then bend the river.

Edit: I understand now. Ok. Out of ideas except special purpose groups, as you mentioned. Or really large placeables (againt, special purpose).

<...at geezer speed>
               
               

               


                     Modifié par Rolo Kipp, 06 novembre 2012 - 05:36 .
                     
                  


            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
Streaming the water
« Reply #5 on: November 06, 2012, 05:30:34 pm »


               lets focus on the seamlessness of the bends '<img'>

the way I map bends in stream crosser doesnt work with a river terrain. the key to understand what i mean is to visualise the tile variations needed for the river bends: gwww and gggw, not saying wwww for the mississippi style rivers '<img'> there you notice, there are ADIACENT water edges in the mesh. thats the issue. I will be able to animate the river flow, but I will lose the seamlessness of water texture
               
               

               
            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
Streaming the water
« Reply #6 on: November 06, 2012, 05:58:36 pm »


               img854.imageshack.us/img854/9674/waterflow01.jpg

you see the cyan crosses are the edges where the texturizing issue comes

img542.imageshack.us/img542/7113/waterflow02.jpg

see how making a group would solve the issue. not elegant though
               
               

               
            

Legacy_NWN_baba yaga

  • Hero Member
  • *****
  • Posts: 1944
  • Karma: +0/-0
Streaming the water
« Reply #7 on: November 06, 2012, 07:41:11 pm »


               that could be my test yes. It is usefull for waterfalls or rivers within a group only and I dont know any way to create the same effect for the usual tileset system w/o using a very large group. You need to control the whole mesh that represents the river for a seamless flow... so No idea how you can achieve that one @sen, looking very good anyway:'<img'>
               
               

               


                     Modifié par NWN_baba yaga, 06 novembre 2012 - 07:43 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Streaming the water
« Reply #8 on: November 06, 2012, 07:56:37 pm »


               <pulling out all...>

that could be my test yes. It is usefull for waterfalls or rivers within a group only and I dont know any way to create the same effect for the usual tileset system w/o using a very large group. You need to control the whole mesh that represents the river for a seamless flow... so No idea how you can achieve that one @sen, looking very good anyway:

Unless the edge2edge timing and mapping of the anim is *very* precise, and all tile anims start and run at the *exact* same rate... If so, then mapping the south edge of the first tile so it starts/ends at one frame before the north edge of matching tiles might work...

That is, have the map scaled so that the south/east edges overlap to the south and east by one anim frame's worth of distance - i.e. if you have a 1000 frame anim (a 33 second anim... should be about right for water, I'd think), then the water map needs to be 1cm bigger than the geometry it's mapped to. So you only see the first 999 frames worth on tile 1, the last/begining of the loop occurs on the next tile over.

<...his micrometers and sonic screwdrivers>
               
               

               
            

Legacy_NWN_baba yaga

  • Hero Member
  • *****
  • Posts: 1944
  • Karma: +0/-0
Streaming the water
« Reply #9 on: November 06, 2012, 08:00:23 pm »


               sounds doable... many things are doable in nwn as we now know:) But is the time spending and patience worth the effect? Not sure how many hours you might need to get that precise loop working and i can easily live and build with the terrain just how it is. Some vfx splashes here and there around a few boulders or moving stream vfx are what i would do. Yes boulders man, there must be some boulders placed in the water please.... yes precious you do:D
               
               

               


                     Modifié par NWN_baba yaga, 06 novembre 2012 - 08:01 .
                     
                  


            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
Streaming the water
« Reply #10 on: November 06, 2012, 08:18:46 pm »


               I managed make the stream/water transition smooth (static water, animeshed stream) by "scaling" transparencies, basically the water by default is 50% opacity, I have the static lake mesh, and the stream one, overlapping. i detached the overlapping faces and applied scaled transparency with trimesh. so:
stream: 50% 29% 25% 21% 0%
lake: 0% 21% 25% 29% 50%

this way the flow gradually decreases as it matches the lake. if the engine was able to render opacities below 21% it would be even smoother, but it does the work. maybe I try something similar
               
               

               
            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
Streaming the water
« Reply #11 on: November 06, 2012, 08:24:36 pm »


               I will add some boulder in walkable water, I am not sure yet if i want to make a different nowalk water terrain, atm the water is partially walkable, deepens and then at the edges becomes no walk. eventually i can make the basic tiles all walkable, and a separate deep water terrain to be mixed ONLY with walkable water, because otherwise there would be really too many variations, and there is a chance once im done, that I will want to mix the water with ice to show in winter, so having deep water touch the land would mean some unholy amount of work to complete the variations for 4 different terrains. namely, about 100, about the amount i had to to to create the quadruple raise. I just want to apply an envmaptexture string to some icey waterfall '<img'>
               
               

               
            

Legacy_NWN_baba yaga

  • Hero Member
  • *****
  • Posts: 1944
  • Karma: +0/-0
Streaming the water
« Reply #12 on: November 06, 2012, 08:50:25 pm »


               very clever idea to use a transparency sollution:) Looing forward to see da outacome:D