DX11 [DX11] Using tessellation to smooth lines into curves

This topic is 2607 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hello,

This is what I want: make a line with a few points and then use tessellation to smooth it.

So far I got it working for a single quadratic or a single cubic bezier curve, but whenever I try to connect more curves I get sharp edges where they connect.

I tried linearly interpolating at the edges of two curves but that still produces a slight spike (I also tried a sine function to smooth instead of a linear, it is slightly better but still not perfect).

Has anyone done this and has some code to share or some other suggestions on how to produce a smooth line using dx11 tessellator?

Share on other sites
I dont think you can do that.

A Tessellation is only to break up a triangel in more triangels to get a more highpolly model. (with good use of a height map)

But im not sure!

Share on other sites
Well you can tessellate a line, I'll try using a animated "heightmap" on a tessellated line and hopefully it will look good .

But still, if anyone managed to properly smooth a line, do tell.

Share on other sites
True as you said.

Have you tried an linear algorithm?

Share on other sites

Hello,

This is what I want: make a line with a few points and then use tessellation to smooth it.

So far I got it working for a single quadratic or a single cubic bezier curve, but whenever I try to connect more curves I get sharp edges where they connect.

I tried linearly interpolating at the edges of two curves but that still produces a slight spike (I also tried a sine function to smooth instead of a linear, it is slightly better but still not perfect).

Has anyone done this and has some code to share or some other suggestions on how to produce a smooth line using dx11 tessellator?

You probably want to use a curve formulation where you can ensure continuity at the connections/segments, then if needed you can convert that representation to a set of beziers(or whatever is easiest to render). For example you could use a BSpline curve(or other curve with local support). Using Bezier directly is problematic due to trying to choose points so that the tangents match at the join.

Take a look at the articles on Wikipedia or do a google search for more info(there are a ton of books and articles about parametric curves..).

David

Share on other sites

dblack: yeah, continuity was what I needed
I found the solution on the most bottom applet on this page: http://www.doc.ic.ac...al/Beziers.html

It works now, thanks for the suggestions!

Not sure about that article, it seems a bit 'iffy'/vague, I would recommend you also at least read some other articles which have a more solid description of continuity and B-Spline curves. However I cant view the applets so cant comment on anything but the text.

The best description I have found so far, if you want to get further into the subject, is "The NURBS Book", although it is a bit specialized to NURBS. The Wikipedia articles also looked fairly informative.

But it is good that it is working now:-)

David

1. 1
2. 2
Rutin
23
3. 3
JoeJ
20
4. 4
5. 5

• 28
• 40
• 23
• 13
• 13
• Forum Statistics

• Total Topics
631737
• Total Posts
3001949
×