Itoo Software Forum

Author Topic: Introduction to Forest Effects  (Read 1277 times)

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1490
Introduction to Forest Effects
« on: June 01, 2016, 09:16:54 AM »
Post here your questions and comments about the Introduction to Forest Effects tutorial.
Paul Roberts
iToo Software

Rokas

  • Sr. Member
  • ****
  • Posts: 401
Re: Introduction to Forest Effects
« Reply #1 on: June 01, 2016, 09:23:34 AM »
link please ! anxious to see this one.

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1490
Re: Introduction to Forest Effects
« Reply #2 on: June 01, 2016, 10:04:24 AM »
Hi Rokas!

Should be up later today. It's going to be an introduction to using, importing and organising existing effects rather than creating new ones. That'll be in a new tut a little bit later, but if you're interested in creating your own now, we have some thorough documentation here.

Cheers!

Paul
Paul Roberts
iToo Software

DM5847

  • Newbie
  • *
  • Posts: 21
Re: Introduction to Forest Effects
« Reply #3 on: June 10, 2016, 12:30:10 PM »
Hi Paul,

Regarding the edge to boundary effect, it has an edgeliststart and edgelistend parameter. I'm assuming this refers to the geometry you want to use whereby the value (0, 1, etc) refers to a selection of 3d geometry. However I can't find how I can link the geometry to the value.

To give some context, what I want to do is use the effect for a grass field whereby I can add smaller glass clumps, stones, deadgrass, etc to the edge of a spline boundary within a value of 0.5m-1m.

If you could let me know what I'm missing it would be great, thanks!

Dean

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1490
Re: Introduction to Forest Effects
« Reply #4 on: June 10, 2016, 01:03:35 PM »
Hi Dean,

This effect uses fpItem.geomID which allows you to change items using the the index number of the objects in the Geometry list. The index starts from zero at the top of the list, so the order of items is important.



Basically this effect involves you splitting the geometry list into two parts. The first part is used for the main area, and the second part is used only for the edges. Here's the example with 4 items:



To achieve this the main area could use something like fpItem.geomID = randomInt(0,1); and the boundary areas would use fpItem.geomID = randomInt(2,3);

I hope that makes sense. Please let me know if you have any further questions.

Cheers,

Paul
Paul Roberts
iToo Software

DM5847

  • Newbie
  • *
  • Posts: 21
Re: Introduction to Forest Effects
« Reply #5 on: June 10, 2016, 01:42:04 PM »
Hi Paul,

Thanks for the quick response, I'm afraid it's not completely clear.

This is the base expression;

###boundary falloff###
real probability = randomReal(0,DistanceToEdge);
Int innerEdge = randomInt(0,EdgeListStart-2);
Int outerEdge = randomInt(EdgeListStart-1,EdgeListEnd-1);
fpItem.geomID=if(fpItem.areaIncDistance<DistanceToEdge,if(Probability>fpItem.areaIncDistance,outerEdge,innerEdge),InnerEdge);

Where do I add the expressions you wrote above? (fpItem.geomID = randomInt(0,1)). And how does this relate to the edgelist value?

Thanks!


Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1490
Re: Introduction to Forest Effects
« Reply #6 on: June 10, 2016, 02:43:18 PM »
Apologies, I thought you were asking how the effect works. Forget my previous message, you don't need to edit the effect if you just want to use it.

To add debris at the edge of an area with this effect try the following:

1 - Add the normal grass objects to the first half of the geometry list, let's imagine that you have a couple of grass clumps. So these would be the first two items in the geometry list
2 - Add the glass clumps, stones, deadgrass, etc underneath these in the list. Note the point in the list at which these items start and end. For example these would start at position 3 and if there are 5 items, end at position 7
3 - Import the effect and enter 3 for EdgeListStart and 7 for EdgeListEnd to match the items in the geometry list
4 - Adjust the Distance to control the falloff.

I've attached a sample file with this setup.

I hope that helps, please let me know if you have any further questions.

Many Thanks,

Paul


« Last Edit: June 10, 2016, 03:16:00 PM by Paul Roberts »
Paul Roberts
iToo Software

DM5847

  • Newbie
  • *
  • Posts: 21
Re: Introduction to Forest Effects
« Reply #7 on: June 10, 2016, 02:49:08 PM »
Ah, thanks!

Now I get it. Thanks for the file.

Dean