Getting Height Value
Getting Height Value
Getting Height Value
Getting Height Value
Getting Height Value
Getting Height Value Getting Height Value Getting Height Value Getting Height Value Getting Height Value Getting Height Value Getting Height Value Getting Height Value
Getting Height Value Getting Height Value
Getting Height Value
Go Back  Xtreme Visual Basic Talk > > > > Getting Height Value


Reply
 
Thread Tools Display Modes
  #1  
Old 07-04-2006, 09:01 PM
Moohasha's Avatar
Moohasha Moohasha is offline
Centurion
 
Join Date: Nov 2004
Location: Texas
Posts: 165
Default Getting Height Value


I'm trying to figure out how to get the height (y-value) on my terrain. The terrain is just a grid or points, evenly spaced in the x- and z-directions, with varrying y-values. The two methods I've though of are using collision detection (which I don't know how to do anyway, and don't think would be the best solution here), or interpolation. For the later, I was thinking I could just determine which face the object is centered over (which three vertices are closest), and interpolating the y-value between the three.
Does anyone have any better ideas, or just some help on how to accomplish this? I don't want this to take more time and be more trouble than it needs to be.
__________________
"The whole trouble comes from the fact that there is so much tinkering with software. It is not made in a clean fabrication process, which it should be. What we need, is software engineering." — F.L. Bauer, 1968
Reply With Quote
  #2  
Old 07-08-2006, 05:23 AM
Iceplug's Avatar
IceplugGetting Height Value Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

If your height values are nearly the same (no rapid changes) or you have a large density of points where you have the height, interpolating the height from the four surrounding points is a very easy and viable solution .
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #3  
Old 07-08-2006, 11:27 PM
Rockoon's Avatar
Rockoon Rockoon is offline
Joseph Koss

* Guru *
 
Join Date: Aug 2003
Location: Unfashionable End
Posts: 3,615
Default

It really depends...

Your height values are discrete samples of a continuous surface. They do not pretend to model the space between.

It is only through subjective definition that those samples model the space between and that mainly has to do with your rendering because you ARE rendering a continuous surface and the user expects the height values to jive with the visual experience.

If you are rendering flat shaded polygons between the sample points then piecewise linear interpolation is probably best.

If on the other hand you are rendering smoothed triangles, then perhaps a spline interpolation that closely models the smoothed normal interpolation would be best..


I would not use traditional ray vs polygon intersection tests (aka, "collision detection") for this sort of thing..
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Getting Height Value
Getting Height Value
Getting Height Value Getting Height Value
Getting Height Value
Getting Height Value
Getting Height Value Getting Height Value Getting Height Value Getting Height Value Getting Height Value Getting Height Value Getting Height Value
Getting Height Value
Getting Height Value
 
Getting Height Value
Getting Height Value
 
-->