YouGroove Posted February 13, 2014 Share Posted February 13, 2014 My question is how to have some plane water looking infinite from terrain ? Specially if you fly high or climb some big hill ? How to make it look infinite ? Mesh Z buffer ? Hide border of water plane with some distant moutains meshes ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted February 13, 2014 Share Posted February 13, 2014 I think you can do this with the skybox can't you? If you have a skybox that has water on the bottom of it that can supplement your actual water plane when viewed from climbing high 1 Quote Link to comment Share on other sites More sharing options...
gamecreator Posted February 13, 2014 Share Posted February 13, 2014 That sounds like a decent solution except if your water is animated, you would probably see it animate from a distance as well. But the skybox wouldn't move so the edge could probably still be made out. Not sure how obvious it would be. Quote Link to comment Share on other sites More sharing options...
Rick Posted February 13, 2014 Share Posted February 13, 2014 I think maybe some kind of fog could help with this? I know in WoW you can only see so far before the fog kicks in and starts blurring things out. I'm sure there are other tricks one could use. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted February 13, 2014 Author Share Posted February 13, 2014 Well water is Shader, skybox is not water shader , perhaps something to try. Yes Fog seems the simple better way, just make the plane big enought and put some fog for big distance, and some simple islands meshes to break the empty far space. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
DudeAwesome Posted February 13, 2014 Share Posted February 13, 2014 just draw what you see if you want it real d= distance to horizont r= radius from planet h= eyeheight 6400KM= earthradius Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
YouGroove Posted February 13, 2014 Author Share Posted February 13, 2014 Okay Dudeawesome You should bring concrete solution shader or prefab instaed of theory. Seems subtule distant Fog system is the big winner. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
DudeAwesome Posted February 13, 2014 Share Posted February 13, 2014 its not hard theory but this is just small math and easy to implement. easiest solution to to this would be to set the camera range to d if you use first person view. you also can use distance fog. its up to you what you need for you game and how its the best way to implement it. I cant know it. Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
cassius Posted February 14, 2014 Share Posted February 14, 2014 in le2 you could make the water really deep and it was a good way of stopping your character dropping off the edge of the map. It just looked like the character had drowned.This was much better than having a bunch of unlikely looking mountains around the edge of your map. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
YouGroove Posted February 14, 2014 Author Share Posted February 14, 2014 in le2 you could make the water really deep and it was a good way of stopping your character dropping off the edge of the map. This is not a problem of deep water ,the characters will stay on some island, only some perimter in water will be allowed. I just need the characters to in top of moutain to not view some border corner of the big water plane. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Michael_J Posted February 14, 2014 Share Posted February 14, 2014 Try this (I've used it in the past): If you don't want to fog out in the distance, create a disc shape for your water plane. The disc should be made of a few concentric rings of polygons. Select the outermost vertices of the disc and set these vertices' alpha to zero (or, if your water plane needs a LOT of verts, or uses tessellation, you can use a texture component that controls the alpha--map accordingly to create the fade). This transparency will allow the water disc to fade gradually into the sky sphere. Obviously, the bottom half of the sky sphere should be painted to look like ocean so the water disc blends to something similar.... Note: if you're using a skybox then you'd use a square plane instead of a disc so it fits better. The special need here would be for a shader that allows vertex alpha to be used to control transparency if needed. Also, generally speaking, fogging out the water plane before the edge can be seen is typically cheaper, but not much. The water plane's transparency doesn't need to be sorted since the only thing that draws "behind" it is the skybox (assuming you can control the render order). 2 Quote --"There is no spoon" Link to comment Share on other sites More sharing options...
mobilemedved Posted November 15, 2016 Share Posted November 15, 2016 I make infinite water on HLSL. On Nuclear Basic http://forums.nuclearglory.com/index.php?tid=4836&tpg=2 1. Make object Plane 2. Apply water shader to it in game cycle: Plane position = camera position Scroll plane texture on shader automatic //vertex shader v2f v(a2v In) { v2f Out = (v2f)0; float4 Po = float4(In.position.xyz,1); float3 Pw = mul(Po,world).xyz; Out.pos = Pw; Out.eye = viewInv[3].xyz; Out.position = mul(Po, wvp); Out.viewpos = Out.position; //automatic sroll water if player move Out.uv.xy = (In.texCoord+Pw.xz)*textureScale; Out.uv.zw = (In.texCoord2+Pw.xz)*textureScale; return Out; } O! "Water mode: When checked, a water plane will appear everywhere in the scene" http://www.leadwerks.com/werkspace/page/tutorials/_/scene-panel-r3#section3 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.