Source code for the latest version on GitHub

Download the latest version here
(ZIP file; 375,286 bytes)

At the moment some of the Small, Far Away plug-ins are only compatible with release 18 of Cinema 4D. (Specifically, the ones that allow variable numbers of “levels” to be added: the Object Controller, the Instance Controller, the Shading Mode/Style Controller.) This is because of the way the Python Cinema 4D SDK works. It is possible to have versions which will work on lesser versions, and it’s on my list of things TODO. With the exception of the three aforementioned controllers, all the others should be fine on earlier versions.

Other TODOs:

All versions of the tags for before R18 (see the note above).

Different icons for all the different controllers. At the moment the same icon gets used for them all in the Object manager, and sometimes it makes it impossible to tell what’s going on.

Falloffs. At the moment, any of the plug-ins which calculate a value inbetween a minimum and a maximum (eg: the Polygon Reduction controller, the Level of Detail controller) use a linear falloff. I was thinking about this, and messing around with some experiments in my viewport, and it seems to me that sometimes a different falloff might be better: lesser falloff when close to the camera, then quicker as distance increases.

Small, Far Away for Cinema 4D – a suite of utility plug-ins for Maxon’s Cinema 4D, providing basic level of detail functionality

(Similar to the kind of thing you get in Unity and Autodesk Maya.)

An exasperated Father Ted, a puzzled looking Dougal, and some little cows

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:

The Autodesk Maya User Guide – LOD (Level of Detail) pages.

(I think the Object Controller tag is still closest to the way the Maya version works.)

The tags which are added to the Cinema 4D Object manager’s tags menu

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

Object Controller tag properties panel The Object Controller tag as it appears in the Object manager

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

Instance Controller tag properties panel The Instance Controller tag as it appears in the Object manager

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

Visibility Controller properties

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

Polygon Reduction Controller tag properties panel The Polygon Reduction Controller tag as it appears in the Object manager

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

Polygon Reduction Controller tag properties panel The Texture Controller tag in the Object manager

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

Shading Mode/Style Controller tag parameters

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

Level of Detail Controller tag parameters

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.)

All the Python source code files, resource files, stringtables etc for Small, Far Away for Cinema 4D are available on GitHub.