View Full Version : Smoothing
07-16-2005, 02:03 AM
I have created a terrain, it loads from a simple RAW file. The porblem is that I am getting straight lines going from one vertex to the other. I want it to smooth out so:
Instead of this:
I get this:
Or in a case like this:
I want it to be rounded and go from the first vertex to the last in sort of like a rounded slope.
I would be fine with the first way, as I know it would be easier, but I would prefer a way to round the slopes.
I don't want any "sharp edges".
How can I achieve this? I have thought of subdividing the triangles in my strip(although I don't know how to do this) and I have thought of a bezier surface instead of a triangle strip(don't know how these work either).
07-16-2005, 02:44 AM
To smooth surfaces I personnaly really like Catmull-Clark subdivisions surfaces. Simple to implement and works with any topology.
There is a lot of other way to smooth surfaces (bezier, spline, nurbs, ...) it all depends on what your want : surface passing through control points, very smooth surface, locality, etc...
Is you terrain a regular grid ?
07-16-2005, 04:14 AM
I believe it is a regular grid.
The Catmull-Clark method looks like it would be perfect, but how would I implement it into my code? It gives no code to go by, not even some psuedo-code. I get the theory behind it, but implementing it would be a different matter. One problem I see with it though, is that I am making large terrains. I have them in display lists, and are getting 60 frames per second max, this is generating more triangles and that is not something I want, I acctually want less. I guess I will have to look more into LOD before I do something like this.
Anyway, any help would be apprectiated.
The Catmull-Clark method looks like it would be perfect, but how would I implement it into my code? It gives no code to go by, not even some psuedo-code. www.google.com (http://www.google.com)
There many websites dedicated to this stuff, not to mention several full blown implementations...
07-20-2005, 07:54 PM
I have tried googling that stuff, and I am getting absolutely nothing.
I am going to try bezier surfaces and maybe nurbs.
But before I go into that, I want to know how I would add a vertex at a point between 2 other vertices. I am reading all my current vertices from an array: map; and was just wondering how I could call them with others inbetween, so between map and map I work out the average, which is 1.5, and then add a vertex at the point (1.5, map + 0.5, 1.5)
I am using triangle strips and calling it through a display list.
I have tried googling that stuff, and I am getting absolutely nothing.You need to press enter after you type in the search phrase...
07-22-2005, 11:33 PM
Haha, very funny.
Anyone with a serious answer, the only things I am finding in google are in other languages or just talk about the theory behind the catmull clark method.
07-23-2005, 01:03 AM
- We don't even know which programming langage you use
- The catmull clark is one of the simplest subdivision algorithm
took me 4 seconds :
EDIT: ok I am in a good mood today :
07-23-2005, 06:56 AM
Oh, lol, I use C++.
ZbuffeR, I don't even get them in my google searches :(
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.