Excluding not seen objects by script or method


I am struggling with huge product scenes on a daily basis. I scripted some stuff to put small stuff on layers and of course from time to time I have the nerve to go through the scene and delete stuff manually.

But with more than 8000 parts this is quiet cumbersome.

So does anybody have a better idea how to (mark, exclude, delete) unseen parts from a complex model (e.g. cog wheels, electronics, cables inside).

hope somebody has a practical solution.

kind regards.


if you want this to be dynamic, i hardly doubt that you will get any viewport speed
imporvements out of it, because the calculation of the culling will most likely consume
all the drawing speed improvements or even exceed them.

you would have to use c4d.utils.GeRayCollider to check if an object is inside or outside
of a list of objects you consider as your view culling border. there are also some methods
in c4d.BaseView, which let you determine, if a point in camera/screen/world coords is
within the drawn area of an editor view. but they do not provide ways to do any object

practically this will get quite complicated, as you will have to respect the normal direction
of your hull objects. you could use a camera based approach or a polygon based approach.
however, i personally do not think, that it is worth the effort, when you already have a
working layer based solution.


The solution you’re looking for depends a lot on your personal work habits.
The layer system is generic way to handle object management. And so are the search options at the top of the OM. They give you all kinds of ways to filter things.

If none of these work for you. Then you require a more personalized solution that nobody can solve unless you give us more specific information about your exact workflow. And exactly how you want the solution to occur.

For example
You could write these actions into a script:

This kind of thing can also be made into a tool plugin. So when you enable the tool you can interactively execute the hiding and unhiding stuff with your mouse buttons.
But without knowing exactly what you want. And exactly how you want it to to work. It’s very hard to give you a good solution.



You are both right and I already was drooling over the raycolission thing but my programing skills are more copy and paste python scripting.

Anyway I want to execute a Plugin/Script which works out which parts are seen from the outsider (spherical) -> so putting a camera on a sphere and getting all the seen parts on a spezial layer and the not seen stuff on another layer would work for me …

after that i could delete the stuff manually or for backup save me two files. That’s no problem at all.

I also was thinking if baking some environmental map to the parts and the selecting them by color (automatically) would work but probably this is not a good idea with this amount of parts.

thanks for your detailed answers appreciated your time, perhaps this thread leeds to something
kind regards


hey just as an idea, the mograph volume effector does more or less exactly what
you want, there might be a way to use this to your advantage :slight_smile: a pure mograph/
xpresso setup might be a bit clunky for every days wok, but you could use the
effector just inside a script/tag and then read the mograph clone visibilty data back
into your objects. but you should check first if the respective matrix array is
being returned correctly by python. some of the matrix arrays for mograph.MoData
are broken/ do not contain the correct data.


I don’t have mograph at work. I only have visualize. Anyway good idea if it works.

kind regards mogh


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.