New in Cinema 4D R19: Speed Up the Viewport with Levels of Detail (LOD) for High Poly Models

Photo of Cineversity

Instructor Cineversity

Share this video
  • Duration: 08:06
  • Views: 2267
  • Made with Release: 19
  • Works with Release: 19 and greater

Use Levels of Detail to Speed Up your Viewport.

Cinema 4D Release 19 introduces the LOD object. Levels of Detail are commonly used in Video Games to keep frame-rates high by only showing high-poly objects when they’re close to the camera. You can now take advantage of that same strategy inside of Cinema 4D to more than double your viewport speed in certain situations.
Models used in this video are courtesy of ThreeDScans.com, a fantastic resource for high resolution scans of classic sculpture & artifacts.

Less...

Transcript

Cinema 4D Release 19 introduces the LOD object. Levels of detail are commonly used in video games to keep frame rates high by only showing high polygon objects when they're close to the camera. You can now take advantage of that same strategy inside of Cinema 4D to more than double your viewport speeds in certain situations. What we have here is a perfect use case for the level of detail object. I've got a number of extremely high polygon assets that are all visible in the frame. And as I'm playing this back, I'm seeing that I'm getting about 20 frames per second and this project is meant to be animated at 30 frames per second which means that I'm getting something less than real time. And so what I'm seeing in the editor is not what my render is going to look like and that's usually a very bad thing when you're animating. However, if I go ahead and activate my levels of detail objects, and I've already done that in a take here. I've got my column, then all of my sculptures now active. When I play through, I'm now getting a frame rate somewhere in the order of 120 to 150 frames per second depending on where we are in the frame. And that is a pretty incredible speed up. Now, this is not the same thing on the screen, because if you look at the objects in the foreground, they're incredibly high resolution, but as you get into the background, you will notice that they look jagged in low polygon. That is the nature and the central trick of the level of detail object. But for situations where you can stand to have a lower level of detail in your editor, or when you're far away from an object, it's a huge speed advantage for high polygon objects. Let's take a look at this scene in a different style to make it a little bit clearer what's going on. At the very beginning here, I've got this sort of rich olive green color and that is the highest resolution version of my object. Off in the middle ground, I've got low resolution and then background I've got these very low resolution objects. Now, watch what happens to them as we move past them. The higher resolution objects are cycling on to the screen when we need them. So how do you set something like this up? Well, it's actually pretty simple. I'm going to go into a different scene file where I've prepared some different levels of detail. I've got my crab object here, and I've also got a couple of lower resolution versions that I created with the polygon reduction object. You just drag your object in and use current state to object. And over here at the far end, I've created an ultra abstract, ultra low polygon version which is probably what you want to use a lot of the time. So what I want to do is first get all of my levels of detail in the same location. So I'm just going to zero out their positions and now they're all occupying the same space. And it is important that all of their axis be properly aligned and in the same position so that when you animate things behave as you would expect. Next, I'm going to select all of my levels of detail and I'm going to hold down CTRL and option, and add in the level of detail object. Now, holding down those keys, added the LOD object and added them in as children, automatically. You could, of course, manually drag those in. Pretty easy to do that. Now, as I look at my level of detail object in the object tab here, I've got it currently set to LOD mode children, which means that each of these levels of detail is automatically being added in just by having a child object. And what I'm going to do is change the criteria here from user LOD level to screen size V. And this is the technique that's used by a lot of the game engines to determine which objects should be shown. It's looking at the vertical size of this bounding box and screen space, and as it gets smaller, it's switching to a lower level of detail. Now that I've got all of my different LOD levels and as I dolly in and out, I can see what's happening, I want to adjust the points at which this is occurring. So if I dolly all the way out here to LOD three, yeah, I'm pretty sure I'm not going to need this until it's really far away. I'm going to have a lot of objects in my scene. Next, as I'm getting closer, that's pretty good. And it's around this time where I'm going to want to have something with pretty reasonable fidelity. My lighting might become, you know, important around here. So what I can do is I can click more or less where I want that border to be. So see this little dot right here? This indicates the current camera's position, and clicking and dragging there will select the closest, allow me to manipulate that. So now, I'm cycling that off. And as I'm getting in tighter it is automatically fading to the object that I want right here. And maybe I really only need this highest level of detail when I'm totally maxed out, so I'm going to take this very close to the maximum value there. And it's only when this is really, really tight in frame that I need that highest resolution. So that is how you very simply set up different levels of detail. Now, what if you don't want to go through the trouble of modeling your own levels of detail? Well, what I can do is take my LOD object here, and I've simplified it down to just one of the levels, and I'm going to change the mode from children to simplify. And what simplify will do is it will take the top most object and then it will allow you to create your own custom display mode. So I can change it from full objects to something like a convex hull, or one of these other simpler modes. So I'm just going to click out a couple three different states that it can occupy, and clicking below the bar to add these levels, so that we can see these different options. There's decimated mode and I'm just going to have to dolly out so we can see what's happening here. Decimated will delete polygons until you've got no polygons left. And it does this based on the ID or the order of your polygon, so be careful there. If you've got a plain or a cylinder, it'll just happen in very linear manner which can be really great for motion graphics. Next up, is the convex hull option, and the convex hull option will create a simplified, sort of, shrink wrap around your object. And last but not least, is the bounding box mode which will create an even simpler representation of your object, where it will display it with the utmost of quickness. And I guess we can add one more right here which will be our null object mode. And you'll see that it is now replacing our object with a null when it is not visible. Now, if you just have this one object in your scene, you probably don't even need a level of detail object. But when you have multiple high resolution objects, a lot's going on, every little bit helps and it's worth the effort to build up an LOD stack like this. Now, I just want to show one last use case which is the same decimation mode that I showed you. But just playing through this on a scanned object, I want to show some of the really fun visual possibilities. It's taking a little while to do this because it's a multimillion polygon object, but it's slowly growing its way up the structure, deleting these polygons, and then it's going to find its way all the way back down, totally erasing our object off the screen. I just find that a really organic and beautiful looking effect. For projects where you're dealing with a lot of unique high polygon assets, the LOD object can dramatically speed up your viewport and keep you animating in real time. Thanks for watching. If you found this interesting or helpful, you may want to check out the rest of our "What's new in Cinema 4D Release 19" videos, here on Cineversity. You can subscribe, or stay tuned over the next few months for more quick tips and reference videos.
Resume Auto-Scroll?