1
\$\begingroup\$

I have a large cubic bezier defined 2D polygon area which I need to render in DX11 real-time to create as many 4096x4096 textures as needed. An average control point count would be around the 12k and I need to render it with a 16x resolution, meaning that for every unit of length, I would need 16 line segments. This makes it impossible to triangulate the generated mesh as the shear number of polygon points would take seconds to triangulate.

I thought of tessellating the bezier polygon and then clipping it to fustrum but again, since we are talking about a lot of triangles that would be too slow for real time rendering (I need to be able to modify the bezier polygon real time).

To add insult to injury, polygon holes and Steiner points are a requirement as the color of the surface would come from the different points "depth".

Ideally, I would clip the bezier polygon (to fustrum or smaller sub-polygons) before tessellating but I don't know of a library that can do that.

The only "idea" I currently have is to cut any bezier segment to sub-segments shorter than 4 units, using the 64 levels of shader tessellation and then move the new vertices according to the control points but needless to say, this seems overly complicated and inefficient.

\$\endgroup\$
  • \$\begingroup\$ You may want to look at the SimpleBezier11 sample on MSDN Code Gallery \$\endgroup\$ – Chuck Walbourn Sep 9 '14 at 22:08
  • \$\begingroup\$ Sorry but that's not what I'm looking after. Let me explain. The best example I can think of is a huge map with lakes etc. This map is made of bezier contours generated at a 1:10000 ratio for each height. Now imagine trying to render just a tiny part in 1:1 ratio. The small part you see on screen is affected by other curves that might be very far as the height interpolation might come from them. \$\endgroup\$ – BezierHelpMe Sep 10 '14 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.