Itoo Software Forum

Author Topic: Scripting Forest creation and setup?  (Read 2462 times)

jona

  • Newbie
  • *
  • Posts: 32
Scripting Forest creation and setup?
« on: September 16, 2011, 09:54:13 PM »
Can I script the creation and setup of multiple forest objects ?

Example:

I have 40 spline objects and I want to  write a script to create for forest objects, set their include splines and the custom objects and some other parameters..

Also.. is there any way to offset animations from their original starting frames?
« Last Edit: September 16, 2011, 11:42:55 PM by jona »

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3076
    • iToo Software
Re: Scripting Forest creation and setup?
« Reply #1 on: September 17, 2011, 10:48:24 AM »

Please, see this post. It includes some useful information and a basic creation script:

http://www.itoosoft.com/forum/index.php?topic=660.msg2321#msg2321

Also.. is there any way to offset animations from their original starting frames?

Yes, it is possible to randomize the animation offset for each item, setting the "Animation->Random Samples" mode:

http://www.itoosoft.com/forestpack/reference/refanimation.php

Carlos Quintero
iToo Software

jona

  • Newbie
  • *
  • Posts: 32
Re: Scripting Forest creation and setup?
« Reply #2 on: September 17, 2011, 04:10:34 PM »
Yes.. I found the randomize animation area but here's what I am trying to do..

I have 40 splines arranged in some kind of order..

there is a forest object on each spline.
They all use the same custom object which has a bend at .. say frame 45-50
But I want them to bend in a sequence, not at the same time.

The random feature works within the forest object which is fine but I am trying to avoid making 40 copies of the custom object and offsetting their animations manually.

Thanks!

Jona

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3076
    • iToo Software
Re: Scripting Forest creation and setup?
« Reply #3 on: September 18, 2011, 10:24:45 AM »

Sorry, but in the current version there is not any option to offset the animation globally. I will add it to the wishlist.

Carlos Quintero
iToo Software

jona

  • Newbie
  • *
  • Posts: 32
Re: Scripting Forest creation and setup?
« Reply #4 on: September 19, 2011, 06:26:47 PM »
That would be great!

Also.. it might be helpful in the distribution set up to have a non-map based random choice with a seed/density setting. I got around this in my multiple forest scene by scripting in random selections of the spread maps which seems to work ok..


iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3076
    • iToo Software
Re: Scripting Forest creation and setup?
« Reply #5 on: September 19, 2011, 07:11:27 PM »

Unfortunately it is not possible to include a non-map based scattering, because the Forest's core and most of its features are optimized to work with a map.

An easy way to create random distributions is to use a noise procedural map, modifying the phase. Also it is convenient to enable Transform->Random Translation to avoid the grid effect.

Carlos Quintero
iToo Software

jona

  • Newbie
  • *
  • Posts: 32
Re: Scripting Forest creation and setup?
« Reply #6 on: September 19, 2011, 07:21:09 PM »
Allright. Good info. I was having a little trouble with random rotations getting the animation to move in the proper direction but random x y transform should do it.

Going to try your suggestions.

I bought Forest Pro this weekend. This program has saved my bacon! It's great. Especially the support.

Thanks again!