Home Technical Talk

Maya .obj import/export scale?

high dynamic range
Offline / Send Message
musashidan high dynamic range
I'm firing up Maya for the first time in a few years and cannot for the life of me find a way to change the scale in the options for .obj import/export. I've searched high and low with not even a single mention. Surely Wavefront who invented Maya and the .obj file format thought it might be a good idea to have a scale option???

The thing is I'm using the Styx plugin so I can have Max/Zbrush/Maya all playing nicely to scale. I have been using Styx for years between Max/ZB flawlessly. Styx is .obj based so .fbx is not an option. In Max I have the .obj import/export scale set up for a perfect match. Is this even possible in Maya?

Cheers.


Replies

  • oglu
    Offline / Send Message
    oglu polycount lvl 666
    OBJ does not care about scaling or units. It does export what evere unit is the scene.
    And there is no option in Maya todo a pre scaling for OBJ export.
    If you use the same units as in your target Software it should work.

    Work in cm and you get cm.
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    Max's obj import/export has a scale setting. I have it set for a 10x factor for ZB, so if I export a 2m cube to ZB it comes back to Max as a 2m cube, so even though obj doesn't acknowledge scale the importer/exporter converts the scale to/from Max. As you know, ZB doesnt work in cm so this isn't relevant. 

    Surely there's a Maya script that converts obj scale?
  • oglu
    Offline / Send Message
    oglu polycount lvl 666
    If you open the obj in a text editor. Are the values 10 times bigger if you use that scale thing in max?
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    No, it doesn't write any extra data. I'm guessing the importer/exporter is converting it independently.(sorry I mistyped above, I meant a scale factor of 100x)Here's Max's exporter:

  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    The problem with Zbrush is that the native scale is equal to a 1cm3 bounding box. So if I export a 1m cube from Maya it will be 100 times too big in ZB. Surely there's a way to sync Maya/ZB as you can with Max/ZB? My workflow with Zbrush/DCC involves iterating and jumping between the programs regularly. That's why Styx plugin is so useful. I don't use Zbrush as a stopping off point where I'm finished something and I export it and scale it to whatever in the DCC. I need scale to be consistent at all times. Hopefully this makes sense.
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    zbrush is 1 unit cubed,  not 1 cm cubed - an important distinction in this context.  

    To use max terminology I believe Maya has a fixed "system" unit size equivalent to 1 cm - the units option in the settings window appear to be equivalent to the UI units setting in max.  obj import/export appears to work on the "system" unit size so you're basically buggered . 

    that said, 
    I'd imagine it's not that hard to wrap a little scale script around the import/export calls from Maya  - I've not done it myself but that's not unusual behaviour so google can probably shed some light on the process (check TAO or CGSociety). 






  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    1 unit, yes, but it's identical to 1cm from Maya according to the tests I've been doing.

    What a nightmare. I just assumed Maya would have scale options with .obj considering they're both created by the same people.

    What on earth have Maya users been doing all these years to work between ZB? Pretty ridiculous actually. :)

    As for the scripts I've searched high and low. There only seems to be batch tools.

    I think you're right mate, I'm buggered. It's a pain in the arse alright.
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    Looks like GoZ might be the only viable option, even if it still involves fiddling with ZB's crazy scale.

  • oglu
    Offline / Send Message
    oglu polycount lvl 666
    If you export something from maya to z and back it does have the same size as before. I see no issue in that workflow. 
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    The problem is the scale factor in ZB. Real world scale is 100 times bigger in Max/Maya. ZB optimal scale is 2 units(equivalent to 2cm) All the tools are designed to work best at those units, so it's a broken workflow. 
  • oglu
    Offline / Send Message
    oglu polycount lvl 666
    I never had any issue with objects comming from maya in cm. What should happen if i work that way. 
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    Funnily enough, while searching for a solution I came across a thread from cgtalk from 4 years ago that I myself answered. 😁

    I've been using Styx so long that I forgot all about the solution I used to use. This thread explains it:

    https://forums.cgsociety.org/t/even-at-1000-brush-size-is-small/1693011
  • oglu
    Offline / Send Message
    oglu polycount lvl 666
    The issue is "just" there if you start in Zbrush. 
    Thats the takeaway from the thread you linked above, right.?
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    It's more about the 'back and forth' If you're working in one and sending to the other that's fine, but if the project assets are constantly moving between the 2 for iteration that's where the problem lies. So in that thread I set up the scale first before beginning the project. With Styx/Max/ZB tjis isn't even a concern. You set the scale of the .obj import/export one time and it's a click between programs with perfect scale every time. I haven't touched it in 3 years since getting Styx. Max/ZB are essentially a single program. 
  • Lou_
    Offline / Send Message
    Lou_ polycounter lvl 6
    @musashidan

    so for maya is there any decent way of trying to keep good scale, that isn't super time consuming? Would you say work in CM right until the low poly has textures then scale up? This has been bugging me for a while. 
Sign In or Register to comment.