Sign in to follow this  

Away from the standard? XNA Terrain rendering issue

This topic is 3291 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
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

This topic is 3291 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this