Itoo Software Forum

Author Topic: Feature Request: Offset Options  (Read 1364 times)

Shawn Olson

  • Jr. Member
  • **
  • Posts: 92
  • Wall Worm
    • Wall Worm
Feature Request: Offset Options
« 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.
Shawn Olson
Product Management Team @ Autodesk for 3ds Max
Developer of Wall Worm Tools

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Feature Request: Offset Options
« Reply #1 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
Paul Roberts
iToo Software

Shawn Olson

  • Jr. Member
  • **
  • Posts: 92
  • Wall Worm
    • Wall Worm
Re: Feature Request: Offset Options
« Reply #2 on: December 09, 2016, 05:46:10 PM »
In my current task, forcing sets of props pointing upward is a requirement.
Shawn Olson
Product Management Team @ Autodesk for 3ds Max
Developer of Wall Worm Tools

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Feature Request: Offset Options
« Reply #3 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.



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

Many Thanks,

Paul
Paul Roberts
iToo Software

Shawn Olson

  • Jr. Member
  • **
  • Posts: 92
  • Wall Worm
    • Wall Worm
Re: Feature Request: Offset Options
« Reply #4 on: December 15, 2016, 04:57:56 PM »
Thank you Paul. I will give this a test shortly. Much appreciated!
Shawn Olson
Product Management Team @ Autodesk for 3ds Max
Developer of Wall Worm Tools

Shawn Olson

  • Jr. Member
  • **
  • Posts: 92
  • Wall Worm
    • Wall Worm
Re: Feature Request: Offset Options
« Reply #5 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.
Shawn Olson
Product Management Team @ Autodesk for 3ds Max
Developer of Wall Worm Tools