Jump to content
  • Advertisement
Sign in to follow this  
anhoppe

Away from the standard? XNA Terrain rendering issue

This topic is 3631 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, I'm writing a simple RTS. I found a large number of tutorials about terrain rendering and guess what, I implemented a height map using a custom content loader! Works. My problem: How do I alter this $%&/! map at runtime? My units should be able to build a nice street or a cornfield on my map. I received a very nice answer in this forum about texture splatting but I did not have the time to find out how that works. Does anybody know a tutorial that covers this topic? Or any other way to alter an already loaded map. Help is certainly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
It very much depends on how your are storing your map in memory. Can you give some more details?

Share this post


Link to post
Share on other sites
The terrain is a gray scale image, the content loader attaches a dictionary with the vertex array to the model. I use that data for triangle picking, it's the approach from creators club triangle picker.

But maybe I will use models.
Thank you

Share this post


Link to post
Share on other sites
Triangle picking is a read-only operation, but you basically need to implement a writeable equivalent. Access the same underlying data and modify the heights (or whatever properties)...

Using models is definitely a good idea, but it would be perfectly valid to flatten a region of terrain to build a road and that can't be done with a model - that needs modification to the actual terrain geometry.


hth
Jack

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!