|
Author
|
Topic: Variance, Distance from Camera
|
Effin Goose Member
|
posted February 03, 2000 08:08 PM
Hi,In my Roam/Treadmarks like terrain engine, I modify the variance based on the distance of the triangle to the camera. To get the distance to the triangle I get the closest point of the triangle to the camera and use the distance of that. However to get the closest point i needed to find the closest distance which is a formula requiring a square root. Since I'm sure this is an unnecessary evil, i was wondering how others calculated the distance to the triangle. Thanks for your time Ryan ------------------
I dont like it, and Im sorry I ever had anything to do with it - Schrodinger IP: |
Cthulhu Member
|
posted February 04, 2000 05:38 AM
Whenever you split a triangle, you always split a diamond formed by two opposite triangles. I use distance to the center vertex of the diamond, the one that is added to mesh when splitting the diamond.Note that [variance/distance > threshold] is same as [variance^2/distance^2 > threshold^2]. This eliminates square root. IP: |
Effin Goose Member
|
posted February 05, 2000 10:15 PM
G'dayThanks for your help. I never thought of the distance thing that way (though i should of  Ryan ------------------
I dont like it, and Im sorry I ever had anything to do with it - Schrodinger IP: | |