Jump to content

Water texture and shader??


Rick
 Share

Recommended Posts

I understand. I wasn't suggesting using an infinite plane. I was just stating that it would be cool if we could apply the default water shader to a multiple number of planes/cubes/etc in the level to do things like lakes, ponds, puddles, etc.

  • Upvote 1

52t__nvidia.png nVidia 530M cpu.gif Intel Core i7 - 2.3Ghz 114229_30245_16_hardware_memory_ram_icon.png 8GB DDR3 RAM Windows7_Start.gif Windows 7 Ultimate (64x)

-----

IconVisualStudio16.png Visual Studio 2010 Ultimate google-Chrome.png Google Chrome PhotoshopLinkIndicator.png Creative Suite 5 icon28.gif FL Studio 10 MicrosoftOfficeLive.png Office 15

-----

csharp.png Expert cpp.png Professional lua_icon.png Expert BMX Programmer

-----

i-windows-live-messenger-2009.pngskype-icon16.pngaim_online.pnggmail.pngicon_48x48_prism-facebook.pngtunein-web.pngyahoo.giftwitter16.png

Link to comment
Share on other sites

I did just this back in the 2.1 days. I used the existing water shader and applied it to my own planes (non infinite). I had to adjust some of the settings in the shader I seem to recollect to get the scaling right and I did have some z order issues with the textures where the plane met the terrain; but it worked.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Yeah, ideally it could do with a series of switchable options for the type and look of the water. That would make it pretty universal.

 

Wouldn't it be nice to have flowing water as well though, that flowed at right angles to the normals of the enclosing terrain so it would look like it flowed round corners etc. I have no idea how we'd even start to do that!

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

That would be nice. The only 2 ways I can think of is physics or faking it. The water plane could fake it. Rotate the plane anyway you want and apply a scrolling texture to it of water running down. I was poking around WoW's files the other day and that's how they do it. They actually modeled the entire water flow for a small rivers and waterfalls on a plan with scrolling textures. They actually made 2 planes. The bottom plane didn't have scrolling textures, but the top plane did.

Link to comment
Share on other sites

Fluid physics would be nice but we don't have that. Maybe a series of particle emitters could be used and the direction modulated by the angle of the containing terrain. Again, this is where particle attractors and deflectors would be great! Even if this was just used as you suggest to provide an upper layer over a base water textured plane. If you were wanting to modulate a scrolling texture such that it reflected the turns of the river I feel the use of Shaders looming into view as the obvious solution. Damn ... shaders again lol

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...