Itoo Software Forum

Author Topic: script for finding not-used-geometry  (Read 292 times)

3DFLOW

  • Newbie
  • *
  • Posts: 10
script for finding not-used-geometry
« on: August 20, 2020, 01:39:06 PM »
For our workflow, we tend to create a lot of bush and grass proxies in a separate max file, create the forest pack and merge all this when ready, into the main max file.

At the end of the day, in our large scenes, we end up with a lot of unused proxies, sitting around in the hidden Forest Pack Pro layer.

Is there a way to create a script to find all unused geometry: proxy; mesh; poly; ... that is not being used in a Forest Pack Pro element ONLY within this auto-hidden Forest Pack Pro layer?

This would be a huge time saver. But theoretically, can this be scripted?

Grts

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2515
    • iToo
Re: script for finding not-used-geometry
« Reply #1 on: August 20, 2020, 02:11:47 PM »
You can select all dependancies and do selection sets subtract operation.

Anyway forstpack should be deleting non used geometry from its Layer automatically.

If that is not the case, let us know. Best if You could share a file and/ or steps how to reproduce it.
Rokas
iToo Software

3DFLOW

  • Newbie
  • *
  • Posts: 10
Re: script for finding not-used-geometry
« Reply #2 on: August 20, 2020, 07:11:47 PM »
"Anyway forstpack should be deleting non used geometry from its Layer automatically."

Wait... what? We have NEVER seen Forest Pack Pro do that, to auto-delete the geometry that is not being used to spread in Forest Pack Pro elements in the scene? Maybe you mean "not used" in loading geometry in the loading process before rendering?

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2515
    • iToo
Re: script for finding not-used-geometry
« Reply #3 on: August 20, 2020, 08:47:19 PM »
Hi

Here it is little graphical demonstration of the clean up process.
Rokas
iToo Software

3DFLOW

  • Newbie
  • *
  • Posts: 10
Re: script for finding not-used-geometry
« Reply #4 on: August 21, 2020, 05:45:57 PM »
is this forest pack geometry only?

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2515
    • iToo
Re: script for finding not-used-geometry
« Reply #5 on: August 24, 2020, 10:49:00 AM »
is this forest pack geometry only?
That is for Geometry added via ForestPack library browser.
Rokas
iToo Software

3DFLOW

  • Newbie
  • *
  • Posts: 10
Re: script for finding not-used-geometry
« Reply #6 on: August 26, 2020, 11:30:54 AM »
So we don't use those, we use alot of external (mainly Maxtree) proxies. The proxies to spread through the Forest Pack Pro elements are all in that hidden Forest Pack Pro layer. But in the end we have... ALOT of junk in there not being used anymore.

Would be handy to have a tool that detects all the "crap" in that layer, not being used by a Forest Pack Pro element, being deleted. ALSO the third party geometry, otherwise we would either be "obligated" to use the library geometry or manualy go through the forest pack elements and trace what's not being used. I think we all know this is a pain?

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2515
    • iToo
Re: script for finding not-used-geometry
« Reply #7 on: August 26, 2020, 12:05:18 PM »
Would You tell a bit more about Your workflow, how those proxies end up in the forest_templates layer?
Rokas
iToo Software

3DFLOW

  • Newbie
  • *
  • Posts: 10
Re: script for finding not-used-geometry
« Reply #8 on: August 26, 2020, 12:16:32 PM »
We set up a forest pack in an empty max files for speed. It's to slow in fully loaded scenes.

Once it's set up we put all the used proxies in the forest pack pro layer cause it's automaticaly turned off when rendering. Which helps our workflow: an automatic layer that's turned off when rendering.

Most projects are urban landscape 1km+ scale, so we end up using alot of forest pack pro elements to build up the landscape. With a lot of adjustments. The forest pack pro layer ends up with a lot of junk files due to the forest pack pro elements being deleted or proxies being changed within the Forest Pack Pro layer.

We are not going to browse through every Forest Pack Pro element (which uses a min of 6 proxies) to then redact the elements in the hidden Forest Pack Pro layer being used, to then delete the elements not being used. This would take hours.

So it would be easier to have a script detect the elements being used, select them so we can hide those, being left with the ones NOT being used. For deleting.

Make sense?


Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2515
    • iToo
Re: script for finding not-used-geometry
« Reply #9 on: August 26, 2020, 01:32:03 PM »
Thanks. Evertyhing clear up to this point:

So it would be easier to have a script detect the elements being used, select them so we can hide those, being left with the ones NOT being used. For deleting.

Make sense?
But they are already in forest_templates layer hidden. I could try to make a tool that will select unused items from that forest_templates layer.
Then You will be able to delete, move to other layer etc.
Rokas
iToo Software

3DFLOW

  • Newbie
  • *
  • Posts: 10
Re: script for finding not-used-geometry
« Reply #10 on: August 26, 2020, 01:34:09 PM »
I'm not sure, but I reckon the tool would be appreciated by a lot of people or am I standing alone here? It would help us alot :)

Dragan

  • Sr. Member
  • ****
  • Posts: 496
Re: script for finding not-used-geometry
« Reply #11 on: August 26, 2020, 02:56:11 PM »
Hi, not just the topic target but similar.
If your workflow considers a lot of hidden objects from the viewport and then you have a problem revealing it during rendering maybe trick I use can help you.
In Render setup, I keep `Render Hidden Object` always on. For the elements/segments that I need to remain hidden, I go to Object Properties and check off Renderable.
Both ForestPack and RailClone will override this and will render just fine but the original Segment remains hidden/non-renderable.  
note: FP/RC Object (Icon object) is Renderable on, just segment should be non-renderable.
Although I`m not sure if that will help not loading unnecessary geometry.

« Last Edit: August 26, 2020, 03:02:12 PM by Dragan »

3DFLOW

  • Newbie
  • *
  • Posts: 10
Re: script for finding not-used-geometry
« Reply #12 on: August 26, 2020, 03:19:08 PM »
thanks for the help, might be of help to others.

We're just looking for a fast way to detect and delete the geometry not being used in Forest Pack elements, to save file-size and screen-performance.

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2515
    • iToo
Re: script for finding not-used-geometry
« Reply #13 on: August 27, 2020, 08:21:07 AM »
Added these suggestion to ForestPack toolbox utility.
Rokas
iToo Software

3DFLOW

  • Newbie
  • *
  • Posts: 10
Re: script for finding not-used-geometry
« Reply #14 on: August 27, 2020, 02:01:14 PM »
woot, going to try it out immediately, ty