3
2014
River Mesh Generator
Testing river mesh generation,
idea is from forum topic: http://forum.unity3d.com/threads/225561-Is-there-any-way-to-have-a-river-flow-without-flow-maps?p=1502875
Webplayer:
http://unitycoder.com/upload/demos/RiverMeshMakerUnity/
Features:
– Start point, length, width, segment length, adjustable x-position (middle of the river), in the screenshot using Mathf.Cos(#)
– Each piece/segment has UV (0,0 to 1,1) so can scroll the texture to Y direction..
Todo:
– Terrain editor plugin (to dig river in unity terrain object)
Problems:
– Would need better water shader..
– Start of the river bit bugged
– Tried baking flow direction to vertex colors, but couldnt get the angles right..
– Visible tiling on slices (depends on shader used.. but should blend them somehow)
– vertical segment start and end have duplicate vertices, not needed..
—
Image#2: mesh geometry, made from 4 vertices per segment

Related Posts
3 Comments + Add Comment
Leave a comment to ensiferum888
Recent posts
- LudumDare59 : Signal
- Unity Editor: Tree Generator
- Leaf/Foliage Generator Tools (Runs in Browser)
- Testing Unity AI Beta
- Ways to Support UnityCoder Development
- Using UI Slider to Create 5-Star Rating Element
- Game Music Library For Unity (editor plugin)
- Fontastic : Easily Test Fonts in Unity Editor!
- GeoTiff Importer & Terrain Generator for Unity
- Create Baked DropShadow for UI images
- .JP2 Ortho Image Converter to PNG/JPG/TIFF
- Convert LAS/LAZ/PLY pointclouds to GLTF (GLB) Point Meshes (standalone converter)
Recent Comments
- on Sprite Sheet Flip Book Shader
- on Sprite Sheet Flip Book Shader
- on [Asset Store] PolygonCollider2D Optimizer
- on Trajectory Test Scene 2.0
- on Vector3 maths for dummies!
- on UnityHub 3.6.0: Remove Version Control & Cloud Dashboard columns
- on Using RenderDoc with Unity (graphics debugger)
- on UI Scroll View automatic Content height
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
An article by













Hey there, I accidently stumbled on this blog while looking at ways to place grass procedurally on a terrain.
I’m the one who started the thread on the unity forums, I wanted to let you know I decided to go with a flowmap finally the results are much more impressive. You can take a look at the web player here: https://dl.dropboxusercontent.com/u/234357896/UnityBuilds.html
After clicking on Start Game you’ll be able to generate terrains and rivers (tick off trees and rocks for faster processing)
If you’re interested I can send you the tools I used to create the flowmap. The problem is my river shape isn’t good compared to yours. I used the shader in this package: http://scrawkblog.com/2013/12/12/tiled-directional-flow-in-unity/
thanks for the unity shader link, actually had tried to get some ideas from that original shader here, but it didnt work that time:
http://www.rug.nl/science-and-society/centre-for-information-technology/research/hpcv/publications/watershader/
your game looks very nice, kind of reminds me of Settlers (the first one was a good game)..
sure, i’d be interested to have a look (i can send my river code, still it’s only using Sin/Cos for that shape.. maybe perlin noise would give some more interesting shapes)
my email is here: http://unitycoder.com/blog/requests/
making curved paths:
http://www.redblobgames.com/articles/curved-paths/