Jump to content
  • Advertisement
Sign in to follow this  
n3Xus

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 biggrin.gif.

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

Share this post


Link to post
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 this post


Link to post
Share on other sites

dblack: yeah, continuity was what I needed :D
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!