Itoo Software Forum

Forest Pack => Forest Pro (*) => Topic started by: Shawn Olson on December 05, 2016, 09:57:01 PM

Title: Feature Request: Offset Options
Post by: Shawn Olson on December 05, 2016, 09:57:01 PM
Right now the Z offset feature is generally OK but is lacking. I would like to have a Z-Offset Mode that changes how the offset works:


These modes should be available per model.

A use-case is to help keep props from floating away from the surface in different scenarios.
Title: Re: Feature Request: Offset Options
Post by: Paul Roberts on December 06, 2016, 03:54:55 PM
Hi,

Thanks for the suggestion. If we expose the Offset value I think that this might be possible with Forest Effects. I'll add it to the suggestions list. However you should find that Surface Normal is possible now by setting the Normal Direction in the Surface Rollout to 0, although this will be an issue if you still want to keep the trees upright whilst offsetting them along the surface normal.

Kind regards,

Paul
Title: Re: Feature Request: Offset Options
Post by: Shawn Olson on December 09, 2016, 05:46:10 PM
In my current task, forcing sets of props pointing upward is a requirement.
Title: Re: Feature Request: Offset Options
Post by: Paul Roberts on December 14, 2016, 04:54:12 PM
Hi Shawn,

Just to follow up on this. Attached is a Forest Effect that allows you to offset along the surface normals while keeping the objects upright. It uses the index in the items list so that you can choose which objects to affect. We're also looking at ways to access the item's offset value in effects for future releases.

(http://i.imgur.com/9hub4ur.png)

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

Many Thanks,

Paul
Title: Re: Feature Request: Offset Options
Post by: Shawn Olson on December 15, 2016, 04:57:56 PM
Thank you Paul. I will give this a test shortly. Much appreciated!
Title: Re: Feature Request: Offset Options
Post by: Shawn Olson on December 15, 2016, 05:41:20 PM
Paul, this effect was really helpful. I'd not messed with effects previously except in basic passing and when I did it didn't stick in me.

So I modified the script thus:

Code: [Select]
fpItem.position = fpItem.position + fpItem.surfNormal * if(fpItem.geomID >= From_ID && fpItem.geomID <= To_ID, (if(UseRadius==0,Z_Offset,fpItem.collisionRadius * -1)), 0);
And added a new parameter UseRadius.

I want to be able to offset the object based on the radius of that object after scaled, but I don't see how this is done via effects. fpItem.collisionRadius is a percentage, so it doesn't work how I need. Is the dimension of the fpItem accessible to the script? None of the Attributes seem to be what I need.

In the example scene, if you turn on random scaling and then want to offset the object so that the base is submerged into the surface area just enough to make sure it's bottom is submerged, how would you do that? The reason is that if the objects are scaled, a static value might not work appropriately as small objects might just get placed entirely below the surface.

Again, thank you for your help.