Itoo Software Forum

Author Topic: Instance tool issue  (Read 708 times)

zeffs

  • Newbie
  • *
  • Posts: 28
Instance tool issue
« on: November 05, 2020, 10:06:31 AM »
Hi,
I'm having one issue with railclone...
Looks like instanciate tool could brake transformation of initial mesh. (though it could look clean and tidy inside of 3dmax). Rotation is very different, so I add increment +90 along X and Z axis.
And when I import that to game engine - it looks not same way as in 3dmax, stepped.
As my walkaround for the moment - standard 3dmax tool "Clone&Align". If I replace all railclone instances back to original mesh - everything looks just fine in game engine.

Hope there is a solution or some small fix could be applied to railclone. Thx!

Screenshots and stripped scene provided
scene download link - https://quickfileshare.org/1ROz/instance_issue.zip

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: Instance tool issue
« Reply #1 on: November 05, 2020, 10:39:57 AM »
Hi
Thank You for contacting us.
Would You please provide more information:
What game engine do You use and how are You exporting ? Maybe attach Your RC style as well ?
Rokas

zeffs

  • Newbie
  • *
  • Posts: 28
Re: Instance tool issue
« Reply #2 on: November 05, 2020, 11:16:53 AM »
Actually I'm using custom script for batch export.
Script reads coordinates and rotation for each instance one by one and creates TXT. Then game engine reads those data.
Looks like I need add Y increment for correction as well

rotation differences are as follows:
Xrot correction = 1.662+89.996 = 91.618
Yrot correction = 0.007+178.478 = 178.485
Zrot correction = 70.821+19.079 = 89.9

the style is very simple, you can find it in .zip.

zeffs

  • Newbie
  • *
  • Posts: 28
Re: Instance tool issue
« Reply #3 on: November 05, 2020, 11:24:10 AM »
looks like for each instance - those correction angles are different
don't know why...
so the only way for me now - replace all instances with Clone&Align tool

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: Instance tool issue
« Reply #4 on: November 05, 2020, 11:25:22 AM »
we need to reproduce Your reported error so we can give any advice or identify the problem to fix it . Would You share Your script and tell us, what game engine are You using.
Rokas

zeffs

  • Newbie
  • *
  • Posts: 28
Re: Instance tool issue
« Reply #5 on: November 05, 2020, 11:39:12 AM »
here is the script
the game engine I'm using is not public one (private custom)
YZ axis are flipped
there would be no issue if rotation of railclone instances matches rotation of replace clones.

here is the result - if I copy angles from original mesh to railclone instanced object

zeffs

  • Newbie
  • *
  • Posts: 28
Re: Instance tool issue
« Reply #6 on: November 05, 2020, 12:10:00 PM »
after couple tests looks like my custom mesh is causing the issue (somehow) - for some reason railclone overrides rotation angles
but I don't understand why it is happening  :-\
I cannot change pivot orientation, need to keep it as is - to be safe with original object in game engine
« Last Edit: November 05, 2020, 12:21:12 PM by zeffs »

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: Instance tool issue
« Reply #7 on: November 05, 2020, 01:28:27 PM »
Thanks for info. we will need some time to test on our side.
Rokas

zeffs

  • Newbie
  • *
  • Posts: 28
Re: Instance tool issue
« Reply #8 on: November 05, 2020, 01:41:05 PM »
Thanks! :)

zeffs

  • Newbie
  • *
  • Posts: 28
Re: Instance tool issue
« Reply #9 on: November 06, 2020, 08:50:01 AM »
updated scene - forgot to add railclone last time

zeffs

  • Newbie
  • *
  • Posts: 28
Re: Instance tool issue
« Reply #10 on: November 06, 2020, 08:55:07 AM »
I've done couple more tests - but that is not helping.
Setting segment alignment to 'automatic' or 'pivot' has no effect. Still rotation angles of instances are very weird if compare to original mesh.

zeffs

  • Newbie
  • *
  • Posts: 28
Re: Instance tool issue
« Reply #11 on: November 09, 2020, 03:55:20 PM »
one more example how generated instances were rotated if compare to original mesh
Clone&Align settings - almost perfect match


Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Instance tool issue
« Reply #12 on: November 09, 2020, 05:10:53 PM »
Would you mind trying to reset XForm of the source geometry before instantiating to see if that makes a difference? For me it seems to fix the alignment issues.

Many thanks,

Paul
Paul Roberts
iToo Software

zeffs

  • Newbie
  • *
  • Posts: 28
Re: Instance tool issue
« Reply #13 on: November 09, 2020, 05:53:48 PM »
Hi Paul!
Thanks a lot!!!
Resetting Xform solved the issue!  :D
Looks like original mesh had something wrong though all rotation angles were =0. Nothing changed visually, axes, angles after reset xform - but definitely that worked!

No more Clone&Align - hooray! )))

Thx!  :)
« Last Edit: November 09, 2020, 07:47:52 PM by zeffs »

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Instance tool issue
« Reply #14 on: November 09, 2020, 05:55:56 PM »
Great! Glad that helped out  :)
Paul Roberts
iToo Software