Does anyone know of any shaders or techniques that will render directional rivers/streams such as the ones in Civ V?
.
Does anyone know of any shaders or techniques that will render directional rivers/streams such as the ones in Civ V?
.
uv animation on shaped mesh.
I thought of that, but I am creating a large map of the earth and all the major rivers; I think this approach would incur a big performance hit, no?
I very much doubt it. You only need a shared material to scroll; it has no performance impact to my knowledge. The only impact you get is the actual rendering of the meshes, which frankly, isn’t something a mobile phone would worry about.
I don’t say this lightly, my current game - the other brothers, works fine on mobile and has 10+ scrolling mesh chunks as well as other stuff on screen. Offscreen, it’s culled. All share the same material which is scrolled once per frame.
These are major rivers - how many would you expect to be using visible at one time? It’s going to be obliterated by part of the expense of rendering planet earth.
Well, to answer this question I’ll have to give you the detailed scoop :
The earth map is based on a Blue Marble image which I scaled down to 20k x 10k (hi-res) and 5k x 2k (low-res), which I then split into 20 x 10 (200) tiles. I have both a sphere and plane mesh (for 3D/2D modes) which are split into 20 x 10 sub-meshes, and I assign a low-res image to each sub-mesh. Now when the user scrolls around and zooms in/out of the sphere/plane (depending on whether they are in 3D/2D mode), my custom LOD will swap out the low-res images within the view window with a hi-res version. This is all done asynchronously and there’s caching involved so no big impact on framerate and everything seems smooth and you don’t notice anything’s happening (unless you’re very fast and know where to look) but on the web-player the first hi-res swaps take several seconds and are definitely noticeable; but like I said, no big impact on performance. The reason behind this custom LOD madness is so that the video memory usage at any one time is such that it will be able to work on mobile devices as well. This is a LOD demo I created for testing :
www.quantumward.com/AA/WebPlayer.html
Now this is all working great using meshes, but it’s all very flat and static and I want to start moving this to a terrain-based system in order to use heightmaps for mountains and get a nicely rendered ocean and flowing rivers. In other words, I want to take this up a notch and make it look as beautiful as they made it in Civ V. In order to do this, I have to cross-off some issues on my list :
No support for replacing terrain shader - I use a custom shader I created in Strumpy to render the terrain, so I’ll have to figure out how to replace the existing terrain shader with my custom one.
River rendering - I need to figure out the most efficient way to render directional rivers a-la Civ V (the topic of this discussion)
No support for non-planar terrain - I need to figure out how to create a terrain-based sphere.
Now to answer your question as to how many would be visible at one time : when fully zoomed out, the entire map.
So that’s it in a nutshell; any advice would be appreciated.