Map Editor Terrain Increase/Decrease

Started by
0 comments, last by kauna 9 years, 11 months ago

How do you select an area on the mesh to decrease on the y axis for the vertices like you see in map editors, you get like a small circle which represents the area that decrease's or increases.

:)
Advertisement

Your problem (which isn't overly complicated) has few phases to solve:

- find a ray starting from camera position and going to the direction pointed by the mouse (look for mouse picking ray casting on google)

- find intersection point of the ray from previous phase and the terrain

- get all vertices / height samples from a desired radius by using the intersection point from the last phase

- apply desired modify function to the height values (such as level terrain, add height, decrease height, blur ...). You may use the distance between the vertex and the intersection point as a blend value to smooth the modify function.

Cheers!

This topic is closed to new replies.

Advertisement