I have an heightmap generated using libnoise (c++). I am loading it from the babylon.js framework (3dWebGL).
I have my heightmap image file and also a river position image file, also generated using libnoise. I am able to load the heightmap, apply materials, etc.. everything looks good.
But I have two questions: 1.- How can I apply a river material to specifics parts of the loaded terrain according with the river map file or what should be a generic approach to do this?
2.- After everything is loaded and in place, I can see the ground, see and rivers. What is a good approach to interact with all this information? I mean, once I load the materials, How do I know when a position is water or not? Should I keep the river map in memory and check it?
I am sure all this sounds quite basic, but I just want to have a general idea to develop it and follow way that is well known that works before starting implement crazy ideas.