Itoo Software Forum
Forest Pack => Forest Pro (*) => Topic started 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:
- Default: works how z-offset works now.
- Local Normal: In this mode, the prop is offset in it's own local Z access after all rotations are applied.
- Surface Normal: In this mode, the offset is determined by the surface normal where the prop spawned.
These modes should be available per model.
A use-case is to help keep props from floating away from the surface in different scenarios.
-
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
-
In my current task, forcing sets of props pointing upward is a requirement.
-
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
-
Thank you Paul. I will give this a test shortly. Much appreciated!
-
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:
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.