Itoo Software Forum

Author Topic: Instances to Forest  (Read 59 times)

VIZIOEN

  • Newbie
  • *
  • Posts: 31
Instances to Forest
« on: November 09, 2018, 11:41:02 AM »
I've asked this in the script topic but no answer there:

Does this still work with the latest Forest Pack? I've placed Instances of Xref Objects with object paint. When using this script it adds the right amout of instances to the forest pack but they are all at the same position (first instance placed).

InstancesToForest



This script looks in the scene to find instances of the objects in Forest Pack's item list. When it finds them they're added to FP, matching the position, rotation and scale.

To use this script:
- Create a new FP object
- Add an object/s to Forest Pack's items list, these are the things with instances in the scene that you'd like to convert to FP geometry.
- Change to Tree Editor mode
- With the FP object still selected, press Instance To Forest.

Here's a video of it working

<iframe width="560" height="315" src="https://www.youtube.com/embed/CuQbinj-U5Y" frameborder="0" allowfullscreen></iframe>


Note that this is an early version. At the moment the Forest Pack object must be at the world origin (the script changes this automatically though). I'd also like to add the ability to append the instances (at the moment it overwrites the current scatter),an option to automatically find instanced objects and add one of them to the items list (great for automatically converting large scenes), and an option to delete the original instances once added to FP.

I hope it's useful for some people.

Many thanks!

Paul.

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1166
    • iToo
Re: Instances to Forest
« Reply #1 on: November 09, 2018, 11:50:10 AM »
It works for me.


What is this object paint You use? Where are objects pivots?
If You could attach Your scene You are working I could check it for You.
Rokas
iToo Software

VIZIOEN

  • Newbie
  • *
  • Posts: 31
Re: Instances to Forest
« Reply #2 on: November 09, 2018, 12:10:34 PM »
So I've tested this again. With a simple scene. It doesn't work if you work with Xref Objects. The pivot points are where they should be.

The object paint is a build in functionality in 3ds max to paint objects on other objects. Reason I was using this is because I 'm working with surfaces that are above eachother. Forest pack doesn't allow placing of objects on surfaces that occupy the same UV space. I don't want to split them up and don't want to unwrap or similar. It's easier to place them with object paint and convert them to forest pack afterwards. But apparently the instances to FP script doesn't work with Xref Objects (probably because pivot points of Xref objects are relative to the scene's origin where they originate from or something).
« Last Edit: November 09, 2018, 12:14:32 PM by VIZIOEN »

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1166
    • iToo
Re: Instances to Forest
« Reply #3 on: November 09, 2018, 03:22:02 PM »
Xrefs works for me. You can see duplicated faces on some of the teapots:
« Last Edit: November 09, 2018, 03:24:05 PM by Rokas »
Rokas
iToo Software

VIZIOEN

  • Newbie
  • *
  • Posts: 31
Re: Instances to Forest
« Reply #4 on: November 09, 2018, 05:04:04 PM »
Well I must be doing something wrong because I can't get it to work.

https://youtu.be/7vlnr39dm-k

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1166
    • iToo
Re: Instances to Forest
« Reply #5 on: November 09, 2018, 05:06:54 PM »
I would blame Your xrefs but I can touch Your maxfile through Youtube.
Rokas
iToo Software

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1166
    • iToo
Re: Instances to Forest
« Reply #6 on: Today at 08:22:25 AM »
When creating Xref make sure Your Tracks: are Local
Rokas
iToo Software

VIZIOEN

  • Newbie
  • *
  • Posts: 31
Re: Instances to Forest
« Reply #7 on: Today at 10:30:51 AM »
Ahaaaa, well that seemed to have done the trick. Awesome! Thank you very much!