Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Gaming > Development Programming Algorithms > Re: Midpoint di...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 604 of 679
Post > Topic >>

Re: Midpoint displaced ROAM showing edges at all levels

by Tom Plunket <gamedev@[EMAIL PROTECTED] > Dec 11, 2006 at 04:27 PM

Otto Jensen wrote:

> The question is if this is something that will allways occure with
midpoint
> displacement, or if I am getting it all wrong. An example can be seen at
> www.greenleaf.dk/ridges.JPG where I made the situation more extreme to 
> clearly show the problem.

It will always occur if you choose random or otherwise arbitrary height
displacement of the subdivision points.

What you may want to investigate doing (assuming the origin is in the
center of your planet) is push points out to be the same distance from
the origin.  E.g. choose your radius, and at each subdivision push the
new point so that it's that far away from the origin.

> Given two points A and B, I calculate a linear midpoint M as (A+B)/2, 
> and then move it outwards to a position which is at the average radius, 
> so that (|A|+|B|)/2=|M|*s=|M'|.. where s is some scaling.

If you want to generate a sphere, s = desiredRadius / |M|, and scale M
by that amount.  The magnitudes of A and B are irrelevant, although your
scale factor is trigonometrically related to the angle between A and B
(which you could get with the dot product), but that seems like the hard
way to do it to me.  ;)

You may want to put something in place to generate mountains and other
terrain features, but getting a perfect sphere first is probably best.
;)

Good luck,

-tom!

--
 




 3 Posts in Topic:
Midpoint displaced ROAM showing edges at all levels
"Otto Jensen" &  2006-12-08 20:50:44 
Re: Midpoint displaced ROAM showing edges at all levels
Tom Plunket <gamedev@[  2006-12-11 16:27:41 
Re: Midpoint displaced ROAM showing edges at all levels
"Otto Jensen" &  2006-12-12 12:17:50 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 18 19:46:56 CDT 2008.