Itoo Software Forum

Author Topic: Scene Units > Integer > Float  (Read 394 times)

Dragan

  • Hero Member
  • *****
  • Posts: 1295
Scene Units > Integer > Float
« on: July 17, 2021, 09:50:25 PM »
Hi.
I don't have much time to troubleshoot this matter so it`s easier to just ask  ::)
I`m creating Generators for a specific client which workflow is based on Meters as Scene Unit setup.
I usually work in centimeters and now, during the opening scenes in different Unit setups, sometimes RC will not work as expected. 

What I noticed is using Integer as Scene Units parameters returns scaled results.
I want to use MatID (integer) as Segments Height (Scene units) and when I work in centimeters the ratio is 1:1 but when I work in meters the ratio is 1:100.

So, my question is: Is there some difference when using Scene Units as Integer/Float depending on Scene Unit setup, or do I just have an issue during the opening scenes in different Unit Setup?
Thank you.



« Last Edit: July 17, 2021, 10:39:03 PM by Dragan »

Dragan

  • Hero Member
  • *****
  • Posts: 1295
Re: Scene Units > Integer > Float
« Reply #1 on: July 18, 2021, 01:56:21 PM »
Also one more note:
The scene was done in centimeters and load it into the meter unit setup scene with Rescale option.
Marker_User_Data will go from 120cm to 12000cm. I think integer values stay intact but I don`t have time to test it at the moment.
 

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2828
Re: Scene Units > Integer > Float
« Reply #2 on: July 19, 2021, 10:33:37 AM »
Hello Dragan,

That's exactly correct. Integer values are not scaled, only scene units, and should you wire it to an input that is expecting scene units, then 1 integer unit = 1 system unit. This is deliberate otherwise all kinds of side effects could occur whereby styles were negatively affected by integers being converted when they shouldn't (for example when controlling material IDs, selector nodes etc.)

Perhaps instead you could bake in the system unit you wish to use like so:



Hope that helps,

Paul
Paul Roberts
iToo Software

Dragan

  • Hero Member
  • *****
  • Posts: 1295
Re: Scene Units > Integer > Float
« Reply #3 on: July 19, 2021, 11:12:15 AM »
Thank you Paul.
Yes, A did a macro already so I can keep track in a complex style.
But what about Marker_User_Data? If I set User_Data at 120cm in Centimeter scale after opening in Meter Scale that value should remain 1.2m and I think it will go on 120m.
I`ll try it again and make sure that is not on my side again but...  ::)

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2828
Re: Scene Units > Integer > Float
« Reply #4 on: July 19, 2021, 11:28:09 AM »
Hi Dragan,

Thanks for clarifying. I think I can reproduce what you are describing. We'll get it on our bugs list to investigate. Thanks for the report.

Paul
Paul Roberts
iToo Software