Itoo Software Forum

Author Topic: Correct unwanted twisting with gimbal rotation  (Read 411 times)

UB8512

  • Newbie
  • *
  • Posts: 28
Correct unwanted twisting with gimbal rotation
« on: April 04, 2018, 09:30:05 AM »
Hi,

it is possible somehow set gimbal X rotation to 0 for every segment to suppress unwanted twisting?
I can correct this only after instantiate RC object and apply this script to all instances.
Thanks.

Code: [Select]
max rotate
set coordsys #gimbal
toolMode.coordsys #gimbal
for o in (selection as array) do(
rotate o (angleaxis o.rotation.x [-1,0,0])
)


Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 527
Re: Correct unwanted twisting with gimbal rotation
« Reply #1 on: April 04, 2018, 10:42:44 AM »
Hi,

I would suggest to try using different segments deform settings:
In particular - "vertical" option.



Let us know if that helps.

UB8512

  • Newbie
  • *
  • Posts: 28
Re: Correct unwanted twisting with gimbal rotation
« Reply #2 on: April 04, 2018, 11:01:11 AM »
Hi Rokas,

thanks for replay. Bending and slicing is also unwanted for me especially when I am making garden curbs (image in attachment) in hilly terrain or 0,5m/1m long road curbs (turns in hills).

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 527
Re: Correct unwanted twisting with gimbal rotation
« Reply #3 on: April 04, 2018, 11:41:55 AM »
Could You please attach max scene to check it?

UB8512

  • Newbie
  • *
  • Posts: 28
Re: Correct unwanted twisting with gimbal rotation
« Reply #4 on: April 04, 2018, 05:15:48 PM »
Scene is in attachment, max2014.
If I turn bend ON and set mode to vertical, I will get mesh deformation in some places and also polygons which were flat are not flat anymore which could cause shading issues.
If I could set for every segment X rotation in gimbal space to zero, then all segments will have correct alignment to line like in real world  => no bending.


Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 527
Re: Correct unwanted twisting with gimbal rotation
« Reply #5 on: April 05, 2018, 04:08:13 PM »
Hi

I have another style for You. This time without bending. ;)
This time another helper surface is used (dynamically linked loft also works- so no messy spline and surface managing :'( )



Let me know if that achieves Your expectations.

UB8512

  • Newbie
  • *
  • Posts: 28
Re: Correct unwanted twisting with gimbal rotation
« Reply #6 on: April 06, 2018, 10:24:49 AM »
Hi Rokas,

thanks for another solution. It is not bad, but it brings additional work.

Everything around curbs (road or garden) is just simple task for railclone, but the banking/twisting is annoying. So if will be possible put to RC this small feature for correcting banking/twisting, I will be very thankful  ;) If not, I will stay with my script solution.



My expectations  :) (using constant as exported parameter, or locked rotation using some arithmetic expression) :


iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3246
    • iToo Software
Re: Correct unwanted twisting with gimbal rotation
« Reply #7 on: April 06, 2018, 02:12:40 PM »
Hi, this feature is in our to-do list.  But unfortunately there is not a simple solution, because banking cannot be determined from the spline.

Ideally we would like to include some kind of editor using a gizmo, so banking can be precisely defined at any point of the spline.
It could be implemented easily with a Curve (as "Loft" does), but i think that approach it not enough precise for RailClone.

Carlos Quintero
iToo Software

UB8512

  • Newbie
  • *
  • Posts: 28
Re: Correct unwanted twisting with gimbal rotation
« Reply #8 on: April 07, 2018, 07:43:36 AM »
Thank you for clarification.