Itoo Software Forum

Author Topic: Cleaning up a Forest object  (Read 5804 times)

JTP Vis

  • Full Member
  • ***
  • Posts: 122
Cleaning up a Forest object
« on: November 15, 2017, 12:01:59 PM »
Hi,

I am using a lot of forest objects for placing trees. When I have created the forest object I have added a large selection of trees from the library and started placing them. I have then been asked to replace certain tree locations with specific tree species, so I've added the specific trees from the library and swapped out the item in the tree editor.

How do I clean out trees that are not placed from a forest object?

Basically I think I have lots of trees (set to x-ref object) in the scene that just don't need to be there, and as the file takes ages to open, I'd like to reduce the number of objects that are loaded.

Cheers,

Bill

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: Cleaning up a Forest object
« Reply #1 on: November 15, 2017, 03:52:07 PM »
Hi Bill,

First let me mention, that there's advantage of using libraries to import assets - as mentioned here: "... Forest checks what objects in the template layer are not referenced, and delete them ..."

For the rest of objects, it's easily possible to select all related objects by marking the Select Influences option in the 3ds max's Select by Name tool and turn on Select - Select Influences - from there you should be able to invert the selection and isolate the rest of objects.

Hope that helps.

Best regards,

JTP Vis

  • Full Member
  • ***
  • Posts: 122
Re: Cleaning up a Forest object
« Reply #2 on: November 15, 2017, 04:14:07 PM »
Hello again,

All the objects that I am using are part of my forest library. Here is an example:

I have a blank scene. I make a forest object, and a surface to place trees (for instance) on. The forest object is set to "custom edit". I go into the library and select 5 different trees and add them to my forest object. I then edit my forest object and place 10 trees, but specify only 1 of the models that are part of my forest object, as I have decided that the other 4 are not correct. I therefore have 4 models referenced into the scene that don't need to be there.

In this particular case, I can very easily work out which trees are not in use, say by colour, or by just interrogating the forest object to find out what models are used.

Now imagine that there are 15 forest objects that have each been edited and added to by 3 different people in the office, and the file is now VERY heavy. There are 66 objects on the "Forest templates" layer, but I am almost certain that some of them are not actually used in the forest objects, as described above.

Does that help? How do I see if any of the models specified in a particular forest object is being used or not?

Cheers,

Bill

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: Cleaning up a Forest object
« Reply #3 on: November 16, 2017, 05:12:12 PM »
Hi Bill,

If those objects are still loaded under the Geometry list, these will be not automatically deleted even not placed, because of several reasons. A possible way to detect those in use within the Custom Edit mode, might be by a script using the getGeomID function - which can go through $.trees.getGeomID i and detect IDs in use. Hope that helps a bit.

Best regards,