• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Lichtso

NURBS vs Rational Bezier Patches

2 posts in this topic

Hi, I'm currently working on a raytracing rendering engine for a research project. Since raytracing doesn't need triangle meshes I thought about using curves like NURBS or rational bezier patches. My question is: What do you think is better suiting for this purpose?

 

I have only worked with bezier curves before and just read a few papers and wiki articles about NURBS. Therefore I have some other questions about them:

 

1. Is there anything only a NURBS can form and a set of rational bezier patches can not?

I read some thing like: It is possible to convert a NURBS into a set of rational bezier patches and vice versa too, but I'm not sure about it.

 

2. What exactly is the knot vector of a NURBS and what is it needed for?

A set of rational bezier patches just needs the control points and their weights and a NURBS needs control points, weights and the knot vector. Isn't that redundant data?

 

3. Are calculations (finding a point, derivative or normal) of a NURBS more time expensive or complex than the ones of bezier patches?

 

4. NURBS seem to end before actually reaching the first / last control point, bezier curves reach the first and last control point in every case. That is a bit confusing but seems to be natural. Any explanation here?

0

Share this post


Link to post
Share on other sites

1) A NURBS can be easily decomposed into a set of Bezier curves with a specified continuity between consecutive curves. That means that a NURBS surface patch can be decomposed into a set of Bezier patches. It does work both ways via knot insertion and knot deletion. (Aside: knot deletion can't always be performed and yield the same curve/surface, so you'll have to know when you can do it)

 

2) The knot vector affords properties that you don't get with the Bezier formulation. The biggest problems with Beziers are local control and degree increase. For example, adding more control points to a Bezier curve increases your control of the curve shape, but it also increases the degree of the polynomial, increasing your computation time. As well, if you move a Bezier control point, the whole curve changes. The knot vector of the NURBS allows for a collection of multiple Bezier curves of the same degree and the order of the NURBS with local control, because each NURBS control point only influences a certain part of the whole NURBS, not all of it (local control).

 

Mathematically, the knot vector specifies a parameter interval over which the recursive basis functions act. A better way to picture this is to visualize the knot vector as specifying the start and end parameter values of the constituent Bezier curves. For example, the knot vector [0 0 0 0 1 2 2 2 2] for a 3rd-order NURBS says that the NURBS consists of 2 Bezier curves, one on the interval (0,1) and one on the interval (1,2). Furthermore, the knot vector tells us what the continuity of the curves are. In this case, the curves have C2 continuity at the parameter value 1. If the knot vector was [0 0 0 0 1 1 2 2 2 2], we'd still have 2 Bezier curves at intervals (0,1) and (1,2), but the continuity between the curves would only guaranteed to be C1 (however, if we inserted this knot, then the curves would still be C2). Middle knots (i.e. not the start or end knot values) can have a maximum of multiplicity "n" in the knot vector, and the minimum continuity of the Bezier curves at those parameter values is C^(n-k), where n is the order of the NURBS and k is the multiplicity of the knot. The properties of the knot vector also explain your question (4). Simply put, the knot vector adds a measure of control you don't have when working with Bezier curves.

 

3) The calculations for finding a NURBS point and normal are certainly more complicated than finding ones for Bezier surface patches. There are techniques for evaluating them more quickly, but you can always decompose the NURBS into Bezier surface patches and get points and normals that way. It's probably about the same amount of work either way.

 

4) In addition to the info on the knot vector, since the starting parameter value has multiplicity 4 (i.e. since the NURBS in this example is 3rd-order, it's n+1), then we know this NURBS curve passes through the starting control point. The end parameter value is also multiplicity 4, so the curve passes through the end control point. The knot vector doesn't necessarily have to have those "end conditions". The knot vector for a cubic NURBS can be [0 1 2 3 4 5 6 7 8], which means that the curve doesn't pass through the ends, consists of 2 Bezier curves at intervals (3,4) and (4,5) with continuity C2 at t=4.

 

In my opinion, Bezier surface patches are nicer to work with, but unless you know exactly how to "stitch" the Bezier patches together via control point placement, NURBS patches are probably what you want.

1

Share this post


Link to post
Share on other sites

Thanks for your answers. They helped me a lot.

 

Well, I think I will stick to rational cubic bezier patches, because I can implement a Bounding volume hierarchy built from the convex hull of the control points to accelerate the raytracing, which wouldn't be possible that easy when I would use NURBS. Also I can see no "real" advantage of NURBS except form the modeling, but that shouldn't be a problem since I can convert models of NURBS to bezier patches.

 

 

In my opinion, Bezier surface patches are nicer to work with, but unless you know exactly how to "stitch" the Bezier patches together via control point placement, NURBS patches are probably what you want.

 

If I got it right, than the continuity at the edge between to patches should be given when the three neighbor control points are forming two lines of equal length. So that shouldn't be that complicated to compute and even if I don't solve this problem, I can still convert NURBS models to bezier patches.

 

So I will start with the bezier patches and then try which method (numerical, approximation, dividing or maybe a mixture of those) is the fastest for my raytracing application.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0