Itoo Software Forum

Author Topic: Features I miss in Forst Pack  (Read 8360 times)

Ramboll

  • Jr. Member
  • **
  • Posts: 67
Features I miss in Forst Pack
« on: December 09, 2010, 01:58:58 PM »
Hi guys!

In our company we often generate forest based on Laser Data. When we have imported the laser data into 3ds MAX and converted it to a Forest object, we have a custom Forest object that has the right height and width of the trees. And then we have to chose trees that goes along with the parameters (height and width). The Forst Pack today is in my eyes the best plug-in for generating really good looking forests, but it I hope it can be even better when working with predefined heights and widths. So, I have a couple of features I really hope can be implemented into Forest Pack in the future. Here is my wishing list this christmas :):

 - In the geometry list it would be nice if the items also had a number instead of just color ID`s.  We often generate the different ID`s before we select geometry, and it would be a lot easier to look at the different numbers instead of counting your way to the ID number.

 - We often generate forest based on laser data(points), and then we often experience that many trees get a lot wider than normal, and that looks very corny if the tree is original slim in it`s shape. So it would be great if we were able to set ID`s based on the width and height. For example: "if tree is lower than x height then id =1" or example "if the height/width= less than 1,3 then id = 2". I hope you see where I`m going :)

 - It would be nice if we could select Exclude splines in Custom mode. It would also be cool if we could select multiple splines in the include and exclude selection. 8)

 - When you select an exclude spline, only the trees where the center of the tree is inside the spline is excluded. Is it possible to have it say that nothing(noe even branches) shall go over the exclude spline?


Hope this didn`t come off to hard to understand... It`s a bit difficult to explain when working with laser data...

It would be awsome if you could check out some of these issues!! ;D


Best Regards

Bjørnar Moland
visualisering.ramboll.no

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 4388
    • iToo Software
Re: Features I miss in Forst Pack
« Reply #1 on: December 09, 2010, 05:45:08 PM »
Hi, thanks for your suggestions ! ;)

Quote
In the geometry list it would be nice if the items also had a number instead of just color ID`s.

One of the changes that we like to introduce for next versions, is to improve the user interface for the Geometry List. This way, we could include the ID number, and other fields that currently are not easy to handle.

Quote
would be great if we were able to set ID`s based on the width and height

How do you set the width and height from the laser data, assigning it manually in Custom Edit mode ?
Would be very easy to set the ID using Maxscript. If you need a sample code, please tell me.

Quote
It would be nice if we could select Exclude splines in Custom mode.

I'm not sure if this is possible with the current distribution algorithm. We will take a look to it.

Quote
It would also be cool if we could select multiple splines in the include and exclude selection.

Well, we never had included this option because the splines always can be attached in a single object. This simplifies the interface and speed up the scattering process.

Quote
When you select an exclude spline, only the trees where the center of the tree is inside the spline is excluded. Is it possible to have it say that nothing(noe even branches) shall go over the exclude spline?

This feature is included in one of the latest betas:

- Boundary checking with Area splines can work in two modes: 'Point', checking only the item's position, or 'Size', using the item's width and its collision radius

Carlos Quintero
iToo Software

Ramboll

  • Jr. Member
  • **
  • Posts: 67
Re: Features I miss in Forst Pack
« Reply #2 on: December 10, 2010, 09:19:03 AM »
Thanks for quick response!

About the laser data:

When a laser scanning of an area is preformed by an airplane, it generates a point cloud. Then one of my colleagues seperates the trees from the ground and generates a file that contains cylinders, the cylinders represents each tree(height=height and diameter=width). Then we use a selfmade MAX script to generate a Forest object based on the cylinders. So now we have a Forest object of an existing forest with correct height and width. Then we manually have to seperate between broad-leaved and spruce, after done this we have for example; one broad-leaved-, one spruce- and one mixed forest object.
NOW comes the tricky part: for each forest object we have to set different ID numbers based on the height and width. For example; one broad-leaved forest object; one ID(tree) that is tall and slim broad-leav, one ID(tree) that is tall and wide, one ID(tree) that is normal, one ID that stands for short and wide and one that stands for short and slim. Now we have 5 different ID`s, but we only have one tree for each group, example tall and slim and we often want at least two different looking trees representing tall and slim (and all the others). So now we have 10 different ID`s, and this is just in the broad-leave forest. For the mixed forest we often want as many as 20 different ID`s.

We do this seperation by simple MAX scripting. First we set 3 different ID`s (one for high trees, one for normal and one for tall trees). Then we compare the height and width for each ID to seperate between the slim and wide trees.

Now you maybe see how much of a job this is :o I`m not sure if this can be done somewhat automatically ??? It`s a lot of work to do this by scripting and there is a LOT of things to keep track of while doing this!  :-\

So, is it possible to implement some of this in Forest Pack, I realize that it`s not an easy job!

Our goal is to create vegetation so much like real life as possible ;D And because of you guys we are getting really close  ;)
PS: I`ve attached some pictures that has trees from laser data

Best Regards

Bjørnar Moland
visualisering.ramboll.no



« Last Edit: December 10, 2010, 09:57:53 AM by Ramboll Mapping »

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 4388
    • iToo Software
Re: Features I miss in Forst Pack
« Reply #3 on: December 11, 2010, 10:42:19 AM »
Quote
NOW comes the tricky part: for each forest object we have to set different ID numbers based on the height and width.

But, why don't use Maxscript to set ID numbers ?

As example, if you have five elements in the Geometry List (slim1, slim2, wide1, wide2, other), this code can be used to set the ID automatically based on the width. For larger Geom.Lists, you can add more IF conditions:

if width > 4 then
   (
   fo.trees.setGeomID i (random 3 4)
   )
else if width > 2 then
   (
   fo.trees.setGeomID i (random 1 2)
   )
else
   (
   fo.trees.setGeomID i 5
   )


I've attached a functional sample, including code and a test scene

PD: Your images are impressive ! can we publish them in the Gallery ?

Carlos Quintero
iToo Software

Ramboll

  • Jr. Member
  • **
  • Posts: 67
Re: Features I miss in Forst Pack
« Reply #4 on: December 13, 2010, 07:54:13 AM »
Hi and thanks for the sample!

We allready use Maxscript to set ID numbers, it`s just a lot of work when working with up to 20 different tree types. But maybe we just need a better script.:)

I was hoping to have an interface to set these parmateres in Forest Pack, but maybe we are the only ones working this way... ??? I guess you don`t have a lot of users working like this ;) 

But anyway, we will try to make better scripting using your example as a base. 

PS: Of course you may publish them in the Gallery ;D I`ve attached the first two pictures with higher resolution. I also uploaded some of our work in the Image Upload forum ;)

Best Regards

Bjørnar Moland
visualisering.ramboll.no

George

  • Full Member
  • ***
  • Posts: 122
Re: Features I miss in Forst Pack
« Reply #5 on: January 11, 2011, 02:48:26 AM »
May I ask what the laser data is? Is it LIDAR? What resolution is it and what software do you use to manipulate it? Do you do it yourself or outsource it as part of your visualisation service?

After manually dealing which a huuuuge landmass, i'm looking at ways I could better deal with things in the future.

Ramboll

  • Jr. Member
  • **
  • Posts: 67
Re: Features I miss in Forst Pack
« Reply #6 on: February 24, 2011, 10:45:32 AM »
Hi, Steinar here, a colleague of Bjørnar.

According to our engineers, laser scans are received in the LAS format, which is closely related to the LIDAR format as far as I can tell? The identification of trees (and other editing and classification) is done with Terra Scan, an MDL application for Microstation. Triangulation of terrain is done with Terra Modeler or Bentley Inroads.

Back to Forest pack scripting; I'm in the process of making an improved classification script, but I have some questions and/or suggestions:

-Maxscript access to trees is quite slow. I wonder if a "getTree" function (that returns a complete record of a tree) could perhaps be faster than having to call getWidth, getHeight, getGeomID etc.?

-The relationship between GeomID's and the "geometry list" seems a bit ill defined? I've also tried to generate new items in the geometry list, but so far I've only succeded in crashing MAX. I assume there is an intimate relationship between various arrays (namelist, geomlist etc.) that is disturbed by my crude attempts to add new items. Is there a mechanism for creating new items via maxscript? It would be more elegant if one could create, move or delete items without loosing the connection with the relevant GeomID.

-The tree methods should perhaps not include random transforms in their return values? Or optionally at least.
« Last Edit: February 24, 2011, 12:51:38 PM by Ramboll Mapping »

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 4388
    • iToo Software
Re: Features I miss in Forst Pack
« Reply #7 on: February 24, 2011, 05:38:49 PM »
Hi Steinar,

Quote
Maxscript access to trees is quite slow. I wonder if a "getTree" function (that returns a complete record of a tree) could perhaps be faster than having to call getWidth, getHeight, getGeomID etc.?

I don't know if it could be faster, probably yes. Currently, there is a function to set the properties of a tree (trees.edit), but not to read all values. We will add it for next release.

Quote
The relationship between GeomID's and the "geometry list" seems a bit ill defined? I've also tried to generate new items in the geometry list, but so far I've only succeded in crashing MAX.

The GeomID property is an index to the geometry list. If you delete a item from the list, that changes the distribution. Unfortunately, we cannot change this without affecting drastically the behaviour of the plugin. The right procedure should be to set the geom list, and next to create the trees.

To generate new items in the geom list, you must add new values to all "list" arrays (except "surflist", that is the list of surfaces added in 3.4). If the number of items in the arrays is not coherent, Max crashes. I've attached a sample Maxscript that you can use as template.

Quote
The tree methods should perhaps not include random transforms in their return values? Or optionally at least.

You may disable random transform before reading the values. This way:

$.appyscale = false
$.getWidth 0
$.applyscale = true

Carlos Quintero
iToo Software

Ramboll

  • Jr. Member
  • **
  • Posts: 67
Re: Features I miss in Forst Pack
« Reply #8 on: February 25, 2011, 11:09:53 AM »
Thanks for the tips. I still feel that a different indexing scheme between trees and the geometry list would be more elegant, but I understand that the design has to work for both generate and edit modes, and that it is perhaps not an easy fix for this reason.

Your example helped a lot as I'm now able to maintain an updated geometry list while I split ID's into different classes.

Btw, in order to update the actual list in the modify panel, I'm currently doing the following (ugly hack):

...
setCommandPanelTaskMode #create
setCommandPanelTaskMode #modify
...


Do you know a better way to do this?
« Last Edit: February 25, 2011, 11:14:21 AM by Ramboll Mapping »

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 4388
    • iToo Software
Re: Features I miss in Forst Pack
« Reply #9 on: February 25, 2011, 08:17:58 PM »

No sorry, i cannot find any function to redraw the command panel, although my knowledge of Maxscript is limited.

Carlos Quintero
iToo Software

Ramboll

  • Jr. Member
  • **
  • Posts: 67
Re: Features I miss in Forst Pack
« Reply #10 on: March 02, 2011, 10:19:28 AM »
I've discovered another issue; in order to speed things up, I create an array of all trees (with geomID, width and height) upon initialisation. I then use this array for subsequent testing/classification. However, when I execute your code to add geometries, it appears to "jumble" the tree indexes so that my array is no longer syncronized to the list? I guess I can get around this by not updating the geometry list until I'm done editing the ID's, but just thought I'd mention it.

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 4388
    • iToo Software
Re: Features I miss in Forst Pack
« Reply #11 on: March 02, 2011, 12:45:23 PM »

Yes, we sort the array of trees by geomID when the list changes. This is required to achieve some internal optimizations.

Carlos Quintero
iToo Software