Author Topic: library materials change value in Corona maps when used in different units scene  (Read 5123 times)

2016-04-26, 17:06:53

Juraj

  • Active Users
  • **
  • Posts: 4816
    • View Profile
    • studio website
I use SigerLibrary to store materials, but it's just UI that automatized the process, so the materials are still classic 3dsMax .mat file. Just putting it as disclaimer that it shouldn't have anything to do with Siger.

I use CM/CM (display/system) scenes across all projects, with rare exception of CM/M when large scope exterior. In .mat file, I have materials that use CoronaEdge map, set to 1cm. When this material gets imported into scene in meters, it translates into 100cm. I could understand this (unfortunate) behavior if it stored just abritrary units (i.e 1.0 in CM is 1cm and 1.0 in m is 1m) but it changes the actual value. From "1cm" it does "100cm" (both scenes use cm is show units).

Is this is AutodeskAPI-ness again or could this be corrected ?

« Last Edit: 2016-04-26, 18:26:37 by Juraj_Talcik »
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2016-04-26, 17:22:15
Reply #1

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
try the usual test - does it work with vray? (or scanline, mental)? Max *of course* does not allow you to specify defaults in any absolute units. A default of 100 means "100 of whatever". It is up to user to decide if it is 100 cm or 100 m by his choice of scene units.
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2016-04-26, 17:32:01
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13747
  • Marcin
    • View Profile
How are you changing the scene units?
Is it units setup > display unit scale > m/cm/... from the dropdown?
Or units setup > System Unit Setup button > then "1 unit = ..."?

The first one should just convert between different units/scale.
The second one means how one "unit" is interpreted, so if the scale changes in materials, I would say this is expected.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2016-04-26, 17:32:47
Reply #3

Juraj

  • Active Users
  • **
  • Posts: 4816
    • View Profile
    • studio website
Can I try it when it happens with CoronaEdge map namely ?

But I write it changes the value, not just the meaning of value.  'CoronaEdge' map specifies units directly in the field. The value isn't "1.0", it's "1.0cm". Nonetheless, between import, it changes into "100cm".  Is the 'cm' just visual overlay that doesn't get actually written in the file ?
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2016-04-26, 17:36:41
Reply #4

Juraj

  • Active Users
  • **
  • Posts: 4816
    • View Profile
    • studio website
How are you changing the scene units?
Is it units setup > display unit scale > m/cm/... from the dropdown?
Or units setup > System Unit Setup button > then "1 unit = ..."?

The first one should just convert between different units/scale.
The second one means how one "unit" is interpreted, so if the scale changes in materials, I would say this is expected.

No no, I am not changing anything, that is not implied in my message at all. I have two correctly setup scenes, but each with different units. I am not translating units once in them.

And because I write  X/X ( M/M), I meant Display/System, I thought it was obvious, sorry about it.. I corrected my OP for better clarity. The display units are always cm, just system units are based on scene scope (if my scene is kilometer big city, it just has to be in meters).
I am not dumbass who hadn't figured this out in 5 years of using 3dsMax :- )


And I last, I know interpretation changes, but I would consider that (I write it in my original message), to be by "design" if the value stayed the same (i.e 1.0 ) but had respective intepretation according to current scene units. But that doesn't happen, the value gets changed (from "1.0cm" into "100.0cm" ).
That's something I live with when using procedurals, but CoronaEdge map has units.
« Last Edit: 2016-04-26, 18:32:02 by Juraj_Talcik »
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2016-04-26, 18:16:32
Reply #5

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Hi. Just tried this in mental ray, and the result is exactly the same as you describe. For me the "normal" way to write units is System first then Display, so I needed a few minutes to figure out what was happening :)

It is APITA that a lot of things doesn't change scale correct, and one should have thought that since real world bitmap values do scale correct then of course rounded edges would do the same - but no. This is Max :(

Regarding the change from 1cm to 100cm then this makes perfect sense. Things aren't scaled on Display units base, but on System Units base. So 1cm with System set to cm, is translated to 1m when System is set to meter, and therefore displayed as 100cm if Display is set to cm.

I'm mostly working in meters, but do also work in mm and cm. And because of this "translation" mess (round edges is not the only case) I have several mat libraries in both meter and cm. It's time consuming to make, and a thing that I would wish companies like Siger would deliver as part of their libraries. One can only hope :)

2016-04-26, 18:27:23
Reply #6

Juraj

  • Active Users
  • **
  • Posts: 4816
    • View Profile
    • studio website
For me the "normal" way to write units is System first then Display, so I needed a few minutes to figure out what was happening :)

I corrected my OP, that was stupid assumption from my part :- ) I put Display first because it's higher lever window :- D

So 1cm with System set to cm, is translated to 1m when System is set to meter, and therefore displayed as 100cm if Display is set to cm.

I worried it would be this case :- (. But as you write, since real-world can keep units (same XYZ'cm' input instead of XYX arbitrary scale related to scene units), why can't that work here since CoronaEdge has also physical units ?

But that is kind of stupid on another level as well, if it can translate in inter-scene state (so 3dsMax has some information what that value is), why not across scenes ? I get the 'prehistoric API' but it's getting ridiculous.
« Last Edit: 2016-04-26, 18:30:59 by Juraj_Talcik »
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2016-08-21, 20:20:10
Reply #7

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
yep, 3ds max is here at fault. Everything in .max file is written just as numbers, with no info what units it is in. We could hack around it, but it would be a lot of work and also would probably break some parts of 3dsmax features (controllers, animations, ...)
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)