# Calculate Terrain Height

**URL:** https://forum.castle-engine.io/t/calculate-terrain-height/759
**Category:** 3D
**Created:** [March 8, 2023, 8:44pm UTC](https://forum.castle-engine.io/t/calculate-terrain-height/759 "2023-03-08T20:44:52Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![eugeneloza](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/eugeneloza/32/12_2.png) [@eugeneloza](https://forum.castle-engine.io/u/eugeneloza)
#### Post date: [March 9, 2023, 1:52pm UTC](https://forum.castle-engine.io/t/calculate-terrain-height/759/5 "2023-03-09T13:52:58Z")

</div>

> [@Didi](#):
>
> Now I’m able to create grass (TCastleTransform) on the terrain.

Note that there is [Castle Game Engine: CastleBehaviors: Class TCastleStickToSurface](https://castle-engine.io/apidoc/html/CastleBehaviors.TCastleStickToSurface.html) behavior just for this specific usecase. You can check here for more info:

> [@New components to generate terrains, along with a demo including water and planting trees](https://forum.castle-engine.io/t/new-components-to-generate-terrains-along-with-a-demo-including-water-and-planting-trees/631):
>
> [[Terrain, water, trees designed in Castle Game Engine editor]](https://i0.wp.com/castle-engine.io/wp/wp-content/uploads/2022/08/1.png?ssl=1 "Terrain, water, trees designed in Castle Game Engine editor")[[Terrain, water, trees designed in Castle Game Engine editor]](https://i0.wp.com/castle-engine.io/wp/wp-content/uploads/2022/08/2.png?ssl=1 "Terrain, water, trees designed in Castle Game Engine editor")[[Water reflections]](https://i0.wp.com/castle-engine.io/wp/wp-content/uploads/2022/08/3.png?ssl=1 "Water reflections")[[Terrain wireframe, water rect underneath]](https://i0.wp.com/castle-engine.io/wp/wp-content/uploads/2022/08/3.5_terrain_wireframe.png?ssl=1 "Terrain wireframe, water rect underneath")[[Terrain with one size larger (and visible fog in the distance)]](https://i0.wp.com/castle-engine.io/wp/wp-content/uploads/2022/08/4_size.png?ssl=1 "Terrain with one size larger (and visible fog in the distance)")[[Trees planted with TCastleStickToSurface to stick on terrain]](https://i0.wp.com/castle-engine.io/wp/wp-content/uploads/2022/08/5_trees.png?ssl=1 "Trees planted with TCastleStickToSurface to stick on terrain")[[Alternative emphasis for steep texture layer]](https://i0.wp.com/castle-engine.io/wp/wp-content/uploads/2022/08/6_trees_steep_tex.png?ssl=1 "Alternative emphasis for steep texture layer")[[Terrain heights from a simple image]](https://i0.wp.com/castle-engine.io/wp/wp-content/uploads/2022/08/7_terrain_image_simple.png?ssl=1 "Terrain heights from a simple image") …

---

_[View the full topic](https://forum.castle-engine.io/t/calculate-terrain-height/759)._
