www.quadsoftware.com
FAQ  FAQ   Search  Search   Memberlist  Memberlist   Usergroups  Usergroups
Register  ::  Log in Log in to check your private messages


Post new topic  Reply to topic
 Best way to make rivers? « View previous topic :: View next topic » 
Author Message
keinmann
PostPosted: Mon Oct 15, 2012 8:25 pm    Post subject: Best way to make rivers? Reply with quote



Joined: 14 Sep 2009
Posts: 15

Hey guys,

I'm wondering what the best way to make rivers in Grome is? Doing them by hand has proven quite difficult for me. In some engines they have a "spline" tool that is used for creating both roads and rivers. But it looks like the GROME road tool only does roads. So I'm really not sure what to do.

Any help or advice greatly appreciated!

--ATC--
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Oct 16, 2012 6:50 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hi,

Yes, for now there is no dedicated river tool and you must use other methods. Maybe the best method is first to use a selection mask and paint where the river is. If you have a real world river as a shape file you can also use the ShapeSelect tool to apply the shape as a selection.

Once you have the selection you can use the selection Filter tool to blur, smooth, extend etc the selection. If you apply blur for example you can have a nice depth transition from the river bottom to the land.

Next you apply the elevation tool to decrease the heightmap where the selection is present (so you create the river bottom). You can also use a separate heightmap layer for this. For example if you need your river to fall from a mountain, have the mountain on a heightmap layer and the carved river on another. Disable the mountain layer before applying the river elevation brush. In this way you will have, for example, -10 meters for the river compared with the mountain (and not to absolute zero level).

Once you have the river carved you can apply the water generation tool. Again you can have the mountain heightmap disabled so you have the water apply on the river level alone.

In the end when you enable all heightmap layers, you have the mountains and then a constant depth river going above it, carving 10 meters as it flows around.

Using separate heightmaps and disabling/enabling them you change the reference heights that height and water tools use.

Let me know if you have any issues with this approach.

Regards,
Adrian L.
Back to top
View user's profile Send private message
keinmann
PostPosted: Tue Oct 16, 2012 4:22 pm    Post subject: Reply with quote



Joined: 14 Sep 2009
Posts: 15

Sounds like that will work! Thanks! Smile

Only thing I need to work out is how to render water correctly in our engine. I've already implemented a pretty sophisticated water shader in HLSL. But I haven't quite decided on a method of actually representing water geometry in the engine. A simple approach would be to just create a massive water plane beneath the terrain (same size as the terrain zone) at a certain level, so any depressions in the terrain (like a lake or pond) would automatically appear to be filled with water. But this won't, however, work for the situation you described where a river flows down from a mountain!

Instead I'm going to have to do something to calculate the water geometry so it gets put in the right place and matches up to rivers. And there needs to be some way to export data from GROME that the engine can use to construct water plane meshes. One way I've already considered would be to export point/curve data the engine can use to generate the water planes... Something like:

Code:

struct RiverNode
{
public:
   Vector2 Position;
   float   Elevation;
   float   RiverWidth;   
};


Any general ideas/guidelines you can give me about approaching this issue? BTW, this might not even work for rivers with irregular shapes because the width of the plane would have to be made much greater and it might "peek through" other bits of the surrounding terrain... Maybe a more "advanced" approach using the geometry shader stage would be more suitable...
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Oct 16, 2012 6:31 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hi,

Yes, I've just realize that indeed a simple plane would not work for rivers that have various geometry shapes and levels along the water flow. You can indeed generate a mask in Grome to mark where the river flows but then you would need to somehow tessellate this (probably upon export within a custom plugin or on another offline tool). The methods I've described above indeed work to create the river bend and to have a selection mask. There is also the selection flow generation which basically does exactly this, simulates a river flowing.

In general in what games I've saw rivers, their were constructed as complex geometry. Along these geometry special shaders were applied and some particle systems for foam, splashes etc.

So maybe you just need to output a mask from Grome. Then generate geometry to fill this mask. You will also need a direction for the river. Next Grome tool will have various spline tools to help here. But for now you can just go from upper level of terrain to lower level for the direction inside the mask. It will not be easy but it should work.

Kind Regards
Adrian L.
Back to top
View user's profile Send private message
keinmann
PostPosted: Tue Oct 16, 2012 7:37 pm    Post subject: Reply with quote



Joined: 14 Sep 2009
Posts: 15

Sounds like a plan! Thanks again! Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Based on a template by Dustin Baccetti
Powered by phpBB © 2001, 2005 phpBB Group