Skip to content

HeightMap from Texture #1899

Discussion options

You must be logged in to vote

Hi Chris,
I tried a lot of different ways to read the pixel data from a texture as well, and then change them and add to a heightmap object; this worked for me the best, I hope it helps.
Another nice terrain sample is here: https://github.com/SilentCLD/XenkoHMTerrain
It is not using the terrain component setup, like some of the other tutorials, but they're all good to check out.
Cheers

            string assemblyPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string filename = AppContext.BaseDirectory + "Resources\\" + FileNameEditText.Text + ".bmp";
            Texture texture;
            using (var inStream = System.IO.File.OpenRead(filename))
      …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Bodyclock-Games
Comment options

Comment options

You must be logged in to vote
2 replies
@Bodyclock-Games
Comment options

@Bodyclock-Games
Comment options

Answer selected by Bodyclock-Games
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants