PDA

View Full Version : How to Get Smooth Renders?


jedhunsaker
10-11-2009, 08:56 AM
I'm taking a hard-surface modeling class and we're supposed to be modeling in NURBS, which is awesome because I'm extremely comfortable drawing vector shapes in CorelDRAW; however, curves and NURBS surfaces work differently, I've noticed.

Here's the problem–the way I understand it–at least in 2D vector illustration programs (e.g. CorelDRAW)–curves are mathematical calculations. I'm also a programmer, so I completely understand how all of this works. Now, in CorelDRAW, adding more nodes than needed to get the shape you want is a horrible idea because: (1) it's completely unnecessary and (2) it takes up superfluous disk space! Yet, this is what teachers and classmates tell me to do in order to get a smooth render.

Somehow, I don't want to believe this is the only way to achieve a smooth render! Please, refer to my attached mental ray render to see what I'm talking about.

Additionally, you can see in the render that my original surface renders out smoother than my offset surface? How does that make sense? It has the same amount of detail!

Ugh! So confused. Please help! How do I get smooth renders? How do I model in such a way that I consistently get smooth renders?

Note that my original surface is also not exactly smooth. It has some subtle roughness to it.

Pete2003
10-11-2009, 03:02 PM
Here's the problem–the way I understand it–at least in 2D vector illustration programs (e.g. CorelDRAW)–curves are mathematical calculations. I'm also a programmer, so I completely understand how all of this works. Now, in CorelDRAW, adding more nodes than needed to get the shape you want is a horrible idea because: (1) it's completely unnecessary and (2) it takes up superfluous disk space! Yet, this is what teachers and classmates tell me to do in order to get a smooth render.

...And additionally to your two points, the more detail you add to a nurbs surface, the harder it is to control the shape! Adding isoparms to a NURBS surface "in order to create a smooth render" is quite simply, wrong :)

For NURBs surfaces there a few things that you should be aware of...
Open the attribute editor for your NURBS shape and click the 'NURBS surface display' dropdown menu. Increasing the precision values will make sure that you get an accurate smooth NURBs surface within your viewport.

This doesnt however, affect your render. To do that...
Open the 'Tesselation' dropdown box and click "display render tesselation". What Maya does when it renders a NURBs surface is convert it into a polygon mesh first. By clicking 'display render tesselation' you should be able to see in your viewport exactly how the shape will be tessellated when rendered.

Now to get a smooth looking low detailed NURBs surface...
Open the 'Simple Tesselation Options' dropdown box, and simply up the default values from 4.5 to whatever value you need for the surface to look smooth. You will be able to preview the tesselation because you have already checked 'display render tesselation' in the previous step.

Now, go and teach your teachers about rendering NURBs surfaces :banghead:

Ta,
Pete.

jedhunsaker
10-11-2009, 08:27 PM
Now, go and teach your teachers about rendering NURBs surfaces :banghead:
Haha! Thanks, Pete! That's exactly what I'll do!

I'm actually extremely surprised that nobody knew this at school (I'm sure someone does, but nobody I talked to). We even had a special visitor in class on Friday with hyper-realistic renders that didn't know this tip.

I even got into a heated argument with one of my classmates about how adding geometry can't *possibly* be the solution.

You're a lifesaver, Pete... a livesaver!

Dangertaz
10-12-2009, 12:50 AM
Beware of advice from classmates and teachers; bug professionals. I think 80% of my daily work flow comes from the kind souls on this board (because it works) and NOT from expensive tutorials or the semi-informed opinions of my old school chums and teachers.

jedhunsaker
10-12-2009, 12:59 AM
Beware of advice from classmates and teachers; bug professionals. I think 80% of my daily work flow comes from the kind souls on this board (because it works) and NOT from expensive tutorials or the semi-informed opinions of my old school chums and teachers.Good advice. I shall continue to put myself in massive school debt while I remember this piece of advice :o)

Dangertaz
10-12-2009, 01:03 AM
'Tis ironic, but 'tis the truth (at least for me).

InfernalDarkness
10-12-2009, 08:49 PM
Maya's NURBS can be a real pain in the ass, especially if you're used to any other package's NURBS usage (Rhino, for example) or other curve applications in other programs, just like your experience with Corel. One trick which you'll learn soon if you haven't is to keep in mind how Maya is converting the NURBS at rendertime; Maya software and mental ray don't render NURBS natively as of yet, and likely never will.

So if you really get stuck and the render output is on a deadline (or it doesn't matter how you get your results) do a quick poly-conversion and go from there. Much, much easier to work with sometimes!

jedhunsaker
10-12-2009, 09:30 PM
So if you really get stuck and the render output is on a deadline (or it doesn't matter how you get your results) do a quick poly-conversion and go from there. Much, much easier to work with sometimes!I was just thinking about this in the shower this morning–if there was any logical reason to convert from NURBS to polygons. Can you think of any other reasons?

Maya software and mental ray don't render NURBS natively as of yet, and likely never will.This is another question I had. Is there any renderer out there that *does* render NURBS natively? The way I see it–mathematically–everything has to be converted to some kind of polygon before render time anyway. I mean, any computer that draws a circle has to just draw a really tight polygon to make it look smooth. I understand that! But it seems to me that the renderer should be smart enough to calculate the distance of various NURBS objects and decide how tight the polygons should be, automatically, without the user having to define such a thing. Of course, if the object is right in your face you're going to need a really tight mesh! But if it's like a mile away... you get the idea. It's the same thing game engines do for real-time graphics. At least, I read about this in some Team Fortress 2 article, way before its release.

InfernalDarkness
10-12-2009, 10:34 PM
I was just thinking about this in the shower this morning–if there was any logical reason to convert from NURBS to polygons. Can you think of any other reasons?


Yes, the main reason to convert isn't just for rendering, but for modeling. Modeling in polygons in Maya gives you far more freedom and complexity, and Maya's NURBS are horrific. For example, you wouldn't want to model anything organic with NURBS, such as a face or creature. You could start there, but good luck getting a NURBS model to UV properly and be sculptable in Mudbox or Zbrush.

Even hard surfacing works better in Maya then NURBS, from a control and manipulatability standpoint. I used to love making cars with NURBS; now, polys are much cleaner, faster, and easier to work with.


This is another question I had. Is there any renderer out there that *does* render NURBS natively?

I believe Pixar's Renderman can handle NURBS natively.

The way I see it–mathematically–everything has to be converted to some kind of polygon before render time anyway. I mean, any computer that draws a circle has to just draw a really tight polygon to make it look smooth.

I dn't believe you see it "right", in this case. A NURBS circle is a piece of math. The screen doesn't have to draw a super-tight polygon, it just has to rasterize the circle. This doesn't necessarily mean tessalating the circle, but most apps would do it that way.

But for print, for example, the tessalation isn't a factor. Vector printing has been around since before bitmapped printing. Plotters are still used every day, all over, for everything from architecture to high-end signage. A plotter doesn't tessalate the lines; it simply goes x distance and curves x amount, then changes direction/distance/curvature. This is the key difference between say an .ai (Illustrator) file and a .psd (Photoshop file), or more specifically an EPS and a .bmp.

jedhunsaker
10-13-2009, 04:41 AM
I dn't believe you see it "right", in this case. A NURBS circle is a piece of math. The screen doesn't have to draw a super-tight polygon, it just has to rasterize the circle. This doesn't necessarily mean tessalating the circle, but most apps would do it that way.Yeah, I didn't really think that through before I said that one.

A plotter doesn't tessalate the lines; it simply goes x distance and curves x amount, then changes direction/distance/curvature. This is the key difference between say an .ai (Illustrator) file and a .psd (Photoshop file), or more specifically an EPS and a .bmp.Yeah, I understand the difference between vector and raster, but I also understand that rasterizing an image is done from top to bottom, so a computer won't rasterize it the same way a plotter would draw it. That said, I just don't see any reason that a rendering engine would *ever* treat a NURBS surface as polygons. I mean, we're drawing curves for a reason! They are supposed to be smooth! Granted, I can understand making them polygons for the viewport (for performance), but definitely not on a production-quality render!

Fortunately, this tip solves that issue, but I believe it should have been more intuitive. This software is just so massive!

CGTalk Moderation
10-13-2009, 04:41 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.