Why are curves so hard in RT?

Wouldn't it be easy enough to implement perfect looking circles by giving it a formula and determining its size and position in the world, same with curves. Spheres too, all you'd need is some nice shading on the 2D sphere to give it the effect.

My calculator can do this! I know tessellation can achieve a similar thing, but why not just draw from a formula and calculate it with enough accuracy to look perfect at 720p?

I've made 2d games that can be infinitely zoomed into curves and all preserving curve detail in *caugh* java and I can squish them horizontally to simulate a 3D rotation.

Why do I see blocky looking barrels, balls, and bullets in all games today?
 
Because there are very few perfect spheres and cylinders in any game world, and once you start to combine them into more complex forms, it gets more and more complicated to draw them without using triangles. They you need 3D lighting and shading, textures, deformation... So it just isn't worth the time.

So Tron's light cycles for how such a 3D model would look like.
 
The reason what you propose isn't done is because of what Laa says; it's really really hard to represent real-world objects and imagery in a realistic way with this type of mathematical modelling. Much harder than by using polygons.

Furthermore, today's development software is made for polys, not for complex mathematical surfaces, so creating assets would be even more difficult than just the issues created by this new modeling system creates. Not to mention our GPUs, which expect to be fed polygons and nothing else.
 
Modeling software is only a problem in that you can't construct 99% of the real and imaginary worlds (except Tron) from procedural primitives. Doesn't matter what tools are provided if the task is impossible :)

NURBS is implicit as well, but quite problematic too, almost completely gone now from anywhere except from CAD/CAM.
 
Because direct algebraic solutions don't exist for general curves of degree 3 and higher.
For normals to look smooth accross a continuous curved surface you need at least a cubic curve, and in most cases modelling packages use degree 5 or higher (or subdivision surfaces which don't even have algebraic representations).

You can use itterative solutions for raytracing arbitrary curves, but they tend to be numerically unstable. There is a mechanism called bezier clipping, which is numerically stable, but IME is more expensive than brute force tessalation.

Trimming also makes the problem considerably worse.
 
NURBS is implicit as well, but quite problematic too, almost completely gone now from anywhere except from CAD/CAM.

Oh yes, texturing NURBS is a lot of fun. I remember when Centropolis was working on Godzilla and Softimage was putting out almost daily patches to fix all the bugs in the NURBS code.
 
You can use itterative solutions for raytracing arbitrary curves, but they tend to be numerically unstable. There is a mechanism called bezier clipping, which is numerically stable, but IME is more expensive than brute force tessalation.
This IMO is the real reason HOS hasn't progressed. Hardware went the tesselation route with good reason, and now it's a zillion times faster to render object with triangles rather than solve equations. Even in games designed specifically for CSGs where modelling isn't an issue, performance will still be poor versus tesselated versions of those beautiful mathematical functions.

Thus the only place for HOS in games is as part of a tesselated solution, with objects+displacement maps being converted to triangles to be rendered. But that'll work well enough.
 
Isn't this idea of drawing mathematical function, i.e. perfect curves when zoomed in, exactly what people want to approximate with tesselation, i.e. increase the polycount when zooming in?
So here you have your solution to the problem! Maybe you can use the mathematical functions (NURBS) to get boundaries for the tesselation...
 
It's not really a problem that needs a solution, as this technique has already been used a number of times. :) For example, some PS2 racing game whose name I can't remember stored the road surface as a mathematical representation rather than a 3D mesh, and tesselated it out in realtime. Saved some memory that way I believe. Height maps can also be stored this way - like the ground in games like World of Warcraft. Of course, you can't have inclinations greater than vertical with this technque, so no caves, overhangs etc...

The big problem with this idea - like described previously in the thread - is the number of objects you can reasonably describe with these surfaces is limited. So you don't really gain anything, you'll just create extra headaches for yourself this way. :)

Also, tesselation today is more about creating additional detail when approaching a detail (through displacement mapping) - and in the reverse, removing details when the object recedes, than making curves smoother...
 
What I don't get is that when there are objects with rotational symmetry why they can't model a pie slice of it in more detail then just draw it in however many places it needs to be drawn.
 
Do modeling programs really make it difficult to combine patches with tris? Algorithmically it's trivial.

Any way, a lot of it seems inertia to me ... (low) poly modeling needs to die already ... excellent rendering primitive, stupid modeling primitive.
 
In the same model?? How??

I guess I agree with Grall here - right now its probably far more feasible to provide mathematical hints for the tesselator to improve detail accuracy, than to really blend the two approaches.

One option that's a bit of a long shot that I'm wondering about is whether or not you can teach some kind of AA algorithm (something like MLAA) to AA tesselated curves in such a way that they look even smoother?

However, I personally do wonder also whether or not a hybrid approach may be possible. I'm sure we'll find out within 5 years. :) The more detail the 3D world gets, the more you win by modelling some aspects of it with a formula. And once that becomes more common, the more room there will be for a new way of rendering them.
 
But most of the things in nature aren't perfectly smooth and curved at all! A realistic living creature is as lumpy and bumpy as it gets, even man made objects have plenty of imperfections.

That mathematical precision is the very CG look everyone wants to get rid of, aiming for it is useless.
 
One option that's a bit of a long shot that I'm wondering about is whether or not you can teach some kind of AA algorithm (something like MLAA) to AA tesselated curves in such a way that they look even smoother?
In theory that's a good idea. You could weight the averages so instead of being a linear interpolation, you approximate a curve. However, I doubt if the single pixel depth of curvature is going to change much to the final image when the triangular edge is still clearly visible.
 
But most of the things in nature aren't perfectly smooth and curved at all! A realistic living creature is as lumpy and bumpy as it gets, even man made objects have plenty of imperfections.
As an approximation smooth and curved is better than piecewise flat though ... the error is equally distributed, whereas with polygons most of it is at the edges.

You can get closer to a natural surface by adding detail and creases to a HOS. But you can't really make a polygon round with a detail layer.
 
But most of the things in nature aren't perfectly smooth and curved at all! A realistic living creature is as lumpy and bumpy as it gets, even man made objects have plenty of imperfections.

That mathematical precision is the very CG look everyone wants to get rid of, aiming for it is useless.

Wheels, manholes, arches, tunnels, pipes, tubes and domes are quite common in games. Unrealistically perfectly smooth is probably the best we could hope for until small little imperfections could be added.
 
Last edited by a moderator:
Laa-Yosh said:
But most of the things in nature aren't perfectly smooth and curved at all! A realistic living creature is as lumpy and bumpy as it gets, even man made objects have plenty of imperfections.

That mathematical precision is the very CG look everyone wants to get rid of, aiming for it is useless.

Most things in nature aren't naturally blocky and triangular either. Looking outside nature though I can see mathematical renderings very useful in modeling machines though would you agree? Perhaps perfect mathematical spiral springs, sockets, wheels and LEDs. The cg look isn't for everything as you say but I think it has many uses
 
Back
Top