   Projecting 2d vector roads onto 3d terrain at surface height?
  Hi, I wonder if anyone can help me out hereBasically I have height data that is at a certain level of detail plotted to a 3d terrain map.  (lots of triangles).I then want to add roads which are at a greater level of detail to this map.  The roads would have verticies at x,y locations not on the height data.  They are 2d vectors so the PrimitiveType.Linestrip would suit them perfectly.  I think it would be very difficult to go through and culculate heights for the road line points from the height data.  Is there any way to project it onto the 3d at all?THanks!   
Quote:I think it would be very difficult to go through and culculate heights for the road line points from the height data. Is there any way to project it onto the 3d at all?If I understand you correctly, this sounds like a variation of the 'how do I find the height at a specific xy point on my terrain' question that comes up occasionally. Search for 'bilinear interpolation' or 'barycentric coordinates'. If you have a ray-triangle intersection test, you could also just project a ray straight up or down at a given xy, and find out what triangle it intersects and where the intersection point is.   ;  Thanks for the pointers, will look into it.  I'm using direct3d mobile so the app will work on WM2005 when its available.  I've never heard of the ray triangle intercept thing before.  You got the right idea - but ist not as if I want to go coding this stuff, i hope there is a function of some sought in directx that would do it for me.   