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).
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 ?
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.
There many websites dedicated to this stuff, not to mention several full blown implementations…
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.
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.
Oh, lol, I use C++.
ZbuffeR, I don’t even get them in my google searches