# Terrain Cursor

**URL:** https://forums.imgtec.com/t/terrain-cursor/512
**Category:** PowerVR Insider
**Created:** [October 26, 2009, 9:35pm UTC](https://forums.imgtec.com/t/terrain-cursor/512 "2009-10-26T21:35:20Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![r2d2proton](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@r2d2proton](https://forums.imgtec.com/u/r2d2proton)
#### Post date: [October 26, 2009, 9:35pm UTC](https://forums.imgtec.com/t/terrain-cursor/512/1 "2009-10-26T21:35:20Z")

</div>

Has anybody used FreeWorld3D ([FreeWorld3D.org](http://FreeWorld3D.org))?  
  
  
  
  
  
It is a program with potential. Anyway the author uses a “cursor” that rolls over the terrain as you move it. The cursor is comprised of two circles, an inner-outer pair. The two circles follow the contour of the terrain pretty good.  
  
  
  
  
  
I was wondering if anybody could tell me how the author accomplished this?  
  
  
  
  
  
I wanted to include an image here, but I don’t know how (sorry).  
  
  
  
  
  
Thanks in advance for your help,  
  
  
  
  
  
Jerry

---

<div class="post-metadata">

### Author: ![warmi](https://avatars.discourse-cdn.com/v4/letter/w/7ea924/32.png) [@warmi](https://forums.imgtec.com/u/warmi)
#### Post date: [October 27, 2009, 4:54am UTC](https://forums.imgtec.com/t/terrain-cursor/512/2 "2009-10-27T04:54:32Z")

</div>

There are many ways to do it … of the top of my head one would be to use projective texture mapping and another to have a hovering subdivided quad, manually updated on each frame to follow the ground shape.

---

<div class="post-metadata">

### Author: ![r2d2proton](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@r2d2proton](https://forums.imgtec.com/u/r2d2proton)
#### Post date: [October 27, 2009, 3:53pm UTC](https://forums.imgtec.com/t/terrain-cursor/512/3 "2009-10-27T15:53:49Z")

</div>

Warmi,  
  
  
  
  
  
I thought about the texture approach too, but the “cursor” does not look like one.  
  
  
  
  
  
And the “hovering quad” is basically the strategy I am employing now. However, sometimes the terrain is above the item I am rendering.  
  
  
  
  
  
Basically I am looking for a surefire way of rendering vector data over topology. From what I observed with the “cursor” it seems to match exactly.

---

<div class="post-metadata">

### Author: ![warmi](https://avatars.discourse-cdn.com/v4/letter/w/7ea924/32.png) [@warmi](https://forums.imgtec.com/u/warmi)
#### Post date: [October 27, 2009, 4:28pm UTC](https://forums.imgtec.com/t/terrain-cursor/512/4 "2009-10-27T16:28:52Z")

</div>

[http://freeworld3d.org/vegetation.gif](http://freeworld3d.org/vegetation.gif)  
  
  
  
  
  
If you are talking about this circle then it is clearly s subdivided set of lines which is pretty much the same approach as with the hovering quad.

---

<div class="post-metadata">

### Author: ![r2d2proton](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@r2d2proton](https://forums.imgtec.com/u/r2d2proton)
#### Post date: [October 27, 2009, 4:35pm UTC](https://forums.imgtec.com/t/terrain-cursor/512/5 "2009-10-27T16:35:19Z")

</div>

That’s it.  
  
  
  
  
  
And it does look like subdivided lines. Place the cursor farther back in that image where the slope is really varied, and it hugs the terrain pretty good.  
  
  
  
  
  
When I was looking at it, the divisions are not necessarily are 1-to-1 match. Yet the cursor is never hidden by the terrain.

---

<div class="post-metadata">

### Author: ![warmi](https://avatars.discourse-cdn.com/v4/letter/w/7ea924/32.png) [@warmi](https://forums.imgtec.com/u/warmi)
#### Post date: [October 27, 2009, 4:56pm UTC](https://forums.imgtec.com/t/terrain-cursor/512/6 "2009-10-27T16:56:14Z")

</div>

That’s because they probably calculate exact slope ( and height) of the terrain at each end of line segment and adjust accordingly.  
  
  
Given enough segments and a reasonable offset from the ground , you should never see clipping.
