Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: UB8512 on April 04, 2018, 09:30:05 AM

Title: Correct unwanted twisting with gimbal rotation
Post by: UB8512 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])
)

(http://images.bzucko.sk/rcTwisting.jpg)
Title: Re: Correct unwanted twisting with gimbal rotation
Post by: Rokas on April 04, 2018, 10:42:44 AM
Hi,

I would suggest to try using different segments deform settings (https://docs.itoosoft.com/railclone/style-editor/segments#Segments-Tocreatesteppedsegments):
In particular - "vertical" option.

(https://i.imgur.com/Ik16Fl6.png)

Let us know if that helps.
Title: Re: Correct unwanted twisting with gimbal rotation
Post by: UB8512 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).
Title: Re: Correct unwanted twisting with gimbal rotation
Post by: Rokas on April 04, 2018, 11:41:55 AM
Could You please attach max scene to check it?
Title: Re: Correct unwanted twisting with gimbal rotation
Post by: UB8512 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.

(http://images.bzucko.sk/rcTwisting2.jpg)
Title: Re: Correct unwanted twisting with gimbal rotation
Post by: Rokas 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 :'( )

(https://i.imgur.com/FM2GyJF.png)

Let me know if that achieves Your expectations.
Title: Re: Correct unwanted twisting with gimbal rotation
Post by: UB8512 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.

(http://images.bzucko.sk/rcTwisting3.jpg)

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

(http://images.bzucko.sk/rcTwisting4.jpg)
Title: Re: Correct unwanted twisting with gimbal rotation
Post by: iToo 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.

Title: Re: Correct unwanted twisting with gimbal rotation
Post by: UB8512 on April 07, 2018, 07:43:36 AM
Thank you for clarification.