Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Map Editor Terrain Increase/Decrease


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Anddos   Members   -  Reputation: 550

Like
0Likes
Like

Posted 11 May 2014 - 12:03 PM

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.


:)

Sponsor:

#2 kauna   Crossbones+   -  Reputation: 2894

Like
2Likes
Like

Posted 11 May 2014 - 06:09 PM

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!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS