Implemented as tags using the Cinema 4D Python SDK. Some can be applied to any object type, others only work when applied to particular object types, some only work when there is a Cinema 4D “Display” tag applied.
I think the level of detail tools in Unity and Autodesk Maya are generally pretty good. So I got all excited when I read that Cinema 4D was going to get some LOD functionality as well. I then quickly got very un-excited when I fired it up and saw the way that it had been implemented. That was when I knocked up the first very basic version of this plug-in, using Cinema 4D’s C.O.F.F.E.E. scripting system. It was bascially as close as implementation as I could manage (at the time) of the Maya version:
(I think the Object Controller tag is still closest to the way the Maya version works.)
As with the Unity FBX export helper plug-in, I eventually learnt Python and got around to re-doing it properly, and then slowly added the polygon reduction controller, the instance controller, and the display tag controllers as they appeared in Cinema 4D (and were exposed to the Python SDK).
The full suite of tags currently (as of fall 2016) consists of:
Object Controller Tag
You specify a default object name, a tracking object, and then you add as many object name/distance levels as you need beyond that. (Refer to the screenshot to the right for a rough idea of how all this looks in action.)
Distance is calculated between the object the tag is applied to and a tracking object. (Usually this would be your active camera, if you are interested in things being swapped in/out depending on distance from the render view. But it doesn’t have to be: you can use any other scene object as the tracking object and control the LOD that way. Sometimes it can be useful to make the tracking object a null, animate the null position, and drive your level of detail that way.)
Depending on how you’ve defined your levels (and the distance ranges for each of them), the tag works by enabling/disabling child hierarchies of the tagged object. (Specifically it turns editor and render visibility on/off and enables/disables generators.)
(Please note that the controller only looks at the first level of children of the parent object. It also only enables/disables the exact hierarchies that you specify. Any others are left unmolested. This lets you mix and match the items that you want controlled and the items that you don’t: some geometry can be made distance-dependent, other common geometry can be shared across all levels.)
The tag doesn’t pay any attention to what the actual content of the child hierarchies being enabled/disabled is, so for it to function as a true level of detail utility it’s up to you to set up your default geometry/levels so that the closer items are the higher polygon counts and the ones further out are the lower count versions.
Most of the time you would probably put the object controller tag onto a null object, and then set up your meshes as child hierarchies. (Probably organised under their own null groups.) But it still works if applied to other object types: basically if you can have it in the Object manager, you can put this tag on it and it will work.
Instance Controller Tag
Pretty much as above, but can only be applied to a Cinema 4D instance object. It then works by changing the source for that instance. (Source hierarchies must all be stored under the same “container” null. Thinking back to it, I’m not quite sure why I designed this one this way, although I suspect it was an attempt to force a certain degree of organisation upon myself: making me keep all my source hierarchies all together in the same place and at the top level of my scene.)
Visibility Controller Tag
Can be applied to any object type. Turn off generators/visibility as objects get further away from the camera. You can specify what you want enabled disabled: visible in editor, and/or visible in render, and/or generators.
Polygon Reduction Controller
Use this to apply an increasingly aggressive polygon reduction strength as distance between object and camera increases, ie: as the object gets further away from the camera its polygon count is automatically reduced.
Can only be applied to the built in Cinema 4D Polygon Reduction deformer/modifier. (As you can probably guess, this tag is basically a driver for the reduction modifier’s strength parameter. I think this makes the polygon reduction modifier a lot more useful than it is otherwise. The only draw backs tends to be that reducing the polygon count inherently messes up any carefully set up UVs you might have. So it tends to work best with meshes that only have the simple built in Cinema materials applied.)
Texture Controller Tag
Allows you to turn off material/texture display as objects get further away from the camera. Needs a Cinema 4D Display tag on the same object/hierarchy.
You can have a Texture Controller and an Enhanced OpenGL Controller (below) on the same object, but set to different distances.
(You can use quite a few of the controller tags with each other in various combinations to exactly fine tune your viewport the way that you want it. Don’t forget that thanks to the hierarchical way a lot of the Cinema 4D tags/modifier objects work, you can also have multiple Small, Far Away tags applied at various levels of a hierarchy, set up with different combinations of parameters. There’s not much you can’t achieve with a little messing around.)
Enhanced OpenGL Controller Tag
The same as the Texture Controller tag, but lets you turn off enhanced OpenGL features for objects more than a certain distance away from the camera. As with the Texture Controller this tag needs the Cinema 4D Display tag on the same object/hierarchy.
Shading Mode/Style Controller
Like the Texture Controller and the Enhanced OpenGL Controller (above) this tag also requires the Cinema 4D Display tag on the same object/hierarchy. Allows simpler/faster shading styles to be applied to objects as they get further away.
I always seems to end up using this one. It really helps with cutting out the clutter of all the background far away geometry and with focussing on what’s close by.
... And finally: last but not least ...
Level of Detail Controller
Also needs an object/hierarchy with a Cinema 4D Display tag. Sets objects further away to display with a lower level of detail.
This was the Cinema 4D feature that caught my eye when it first came out a few releases ago (having used it heavily when putting stuff together in Maya).
But it turned out to be a bit of a disappointment: although it’s not bad, it just doesn’t go far enough ... or at least, that’s the way it seemed to me at the time. (And still does today.)