Re: [Algorithms] Curves...
Brought to you by:
vexxed72
From: Ralf S. <rap...@ra...> - 2000-09-01 22:15:05
|
|> Bezier or Nurb:s?? or maybe something else... | If you want smooth looking terrains, both are good. | If not, then you will have to do some bump or displacement | mapping to get nice pits, valleys, and such. a simple but effective trick i used in an experimental isometric-terrain voxel engine was this: the terain itself was generated by a spectral-synthese heightfield generation programm written by Klaus Hartmann. the data(512x512) was stored as a height-map and during runtime converted to 2d-splines. these splines were rendered to the screen with a resulting size of 65536x65536(the entire "new" "base"-heightfield). as Dave remarked everything was round and smooth... to add artificall structure i "added" the initial heightmap with the size of 512x512 to the resulting heightfield(65536x65536) using tiling. i think i have to remark: one nice feature of heightfields generated by spectrale-synthese is: they "tile" perfectly!! well, there was structure! but unfortunately now the "__repeating__" heightfield "on top" of the base heightfield was visible. so, as a last step i was computing the roughness at a given position at the base-heightfield and then scaling the detail-heightfield linear to the corresponding roughness. here are some results: http://www.rappongi.com/h1.jpg http://www.rappongi.com/h2.jpg http://www.rappongi.com/h3.jpg last remarks: the roughness was computed by computing the deltas-height of surounding heights. ... the roughness values between four samples on the base-heightfiled were computed using bi-linear interpolation. finalHeight = heightFromSplines(x, y) + heightFromHeightfield(x & 511, y & 511) * roughness(x, y) maybe this small trick will be usefull for someone else. - ralf |