HeightMap from Texture #1899
-
Hi All, making progress with porting my custom Unity terrain system to Stride. I have a custom vertex and I can create and draw the mesh. Now to add height. In the simplest Unity version I would read a value from a texture (texture.GetPixel(x,y)). This doesn't seem possible in Stride. Edit: Or should I be using an Image (is Texture a GPU object?) Edit: It's not going to win any awards but I'm getting there. Jus a float array from a texture. I'd still be curious about the use of Heightmaps and colliders though. Thanks. Cheers |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hey, did you check here? https://github.com/Doprez/Awesome-Stride#terrain |
Beta Was this translation helpful? Give feedback.
-
Hi Chris,
|
Beta Was this translation helpful? Give feedback.
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