Results 1 to 8 of 8

Thread: Exporting UV maps with OBJ

  1. #1
    Founding member raymondtrace's Avatar
    Join Date
    May 2003
    Location
    Ohio
    Posts
    517

    Exporting UV maps with OBJ

    https://docs.lightwave3d.com/display...8/Export+Group

    ^^ This page shows a principled BSDF surface when preparing UV maps for OBJ export.

    https://docs.lightwave3d.com/downloa...0321000&api=v2

    However, I'm only finding success when the material is standard. For the successful export, the UV map images are applied in the texture editor but they do not appear in the node display.

    Nothing passes through to the OBJ/MTL files as principled for me. When exporting with principled material, the status message at the bottom of the window states:
    (Please note: Exporting this object to OBJ format will lose any node-based materials applied to surfaces.)

    Are the docs wrong? Or me? Why are they showing a node set up if node-based materials don't work?
    Last edited by raymondtrace; 09-14-2018 at 01:53 PM.
    LW7.5D, LW2015.3, LW2018.0.x running portably on a USB drive on an Amiga 2500 running Wine.

  2. #2
    Dreamer Ztreem's Avatar
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    3,980
    If you read the text, it says: That no node materials will be transfered with obj files and if you want the UV to follow with the object you need to put a uv texture to the color channel. (That is what the node tree is showing)

  3. #3
    Founding member raymondtrace's Avatar
    Join Date
    May 2003
    Location
    Ohio
    Posts
    517
    Right. The node tree example in the docs and my own are identical...but no UV maps are exporting on my end as principled.

    My setup for Principled (no image file referenced in the exported MTL file):

    Click image for larger version. 

Name:	me.png 
Views:	16 
Size:	32.7 KB 
ID:	142816



    LW Docs example:

    Click image for larger version. 

Name:	lw.png 
Views:	12 
Size:	86.4 KB 
ID:	142817



    My setup for Standard (image file properly referenced in the exported MTL file). This is the only way that works for me:

    Click image for larger version. 

Name:	me-success.png 
Views:	14 
Size:	40.2 KB 
ID:	142818
    Last edited by raymondtrace; 09-14-2018 at 03:37 PM.
    LW7.5D, LW2015.3, LW2018.0.x running portably on a USB drive on an Amiga 2500 running Wine.

  4. #4
    Dreamer Ztreem's Avatar
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    3,980
    It’s right. It will not export the texture by doing so it will only export the obj with the UV map data(vertex map). With no texture node it will skip the UV data and the UV map will be lost. I know it is not a great workflow and it would be better as an export option but this is the LW way.
    Last edited by Ztreem; 09-14-2018 at 04:09 PM.

  5. #5
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,622
    In LW 2015.3 and earlier, to export UV inside of OBJ file format, there is needed way to tell which UV Map we want to export (because LWO supports unlimited quantity of UV maps, but OBJ just one!).
    To do it, there is needed to click on Color channel T button in Surface Editor (in LW 2015.3!), change projection to UV, and pick up our UV map from drop-down list.
    OBJ Exporter is this way informed which UV map should be exported.

    To export texture map, there is needed to bake it first, using Surface Baking Camera (it has some quality issues), or Batch Baking Camera http://batchbakingcamera.trueart.eu
    LightWave Plugins
    Global Materials for LightWave 2018!
    Custom plugin writing. Request a quote.

  6. #6
    Electron wrangler jwiede's Avatar
    Join Date
    Aug 2007
    Location
    San Jose, CA
    Posts
    6,018
    Quote Originally Posted by Ztreem View Post
    It’s right. It will not export the texture by doing so it will only export the obj with the UV map data(vertex map). With no texture node it will skip the UV data and the UV map will be lost. I know it is not a great workflow and it would be better as an export option but this is the LW way.
    I think you might be missing the point. At least here, LW exporting pBSDF even with texture & UV set for Color is neither stuffing the UV data into the OBJ file nor the MTL file (examined the OBJ and MTL in text editor to verify), and the MTL file created is basically corrupt (it isn't a valid texture reference to the original texture, and whatever it does contain isn't correct). "The LW way", indeed.
    Last edited by jwiede; 09-22-2018 at 07:17 PM.
    John W.
    LW2015.3UB/2018.0.5 on MacPro(12C/24T/10.13.6),32GB RAM, NV 1080ti

  7. #7
    Dreamer Ztreem's Avatar
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    3,980
    Quote Originally Posted by jwiede View Post
    I think you might be missing the point. At least here, LW exporting pBSDF even with texture & UV set for Color is neither stuffing the UV data into the OBJ file nor the MTL file (examined the OBJ and MTL in text editor to verify), and the MTL file created is basically corrupt (it isn't a valid texture reference to the original texture, and whatever it does contain isn't correct). "The LW way", indeed.
    That might be right. I just assumed based on my knowledge from LW2015 and the text fron the 2018 manual that it would work that way. I don’t have lw2018 and never will so I can’t test or verify anything. As far as I know neither obj or fbx can hold any pbr information so that would be a dead end trying to get that working.

  8. #8
    Electron wrangler jwiede's Avatar
    Join Date
    Aug 2007
    Location
    San Jose, CA
    Posts
    6,018
    Quote Originally Posted by Ztreem View Post
    That might be right. I just assumed based on my knowledge from LW2015 and the text fron the 2018 manual that it would work that way. I don’t have lw2018 and never will so I can’t test or verify anything. As far as I know neither obj or fbx can hold any pbr information so that would be a dead end trying to get that working.
    Which would be fine, if handled properly, but what's happening here is not proper handling/UX.

    First off all, LW should either not produce a surface/texture at all, or produce a proper one. Second, if LW knows it's going to drop info on the floor, it should at the very least specifically enumerate the info being dropped on the floor. LW should list map-by-map and surface-by-surface the specific asset textures and related info that will and will not be saved, so the user knows in advance precisely what info will and will not make it into the OBJ file. Just making a statement about not writing out nodal textures to the OBJ isn't a clear or accurate enumeration of what's being lost in this case -- not only is the surface texture dropped, but so is the UV info, and that's not mentioned (nor, as this discussion shows, it is an automatic conclusion that not producing a texture definition means not including the UV info either).

    As is so often the case with these LW failure scenarios, all that's really needed is a simple informative dialog explaining the situ and asking user to confirm, but instead LW chooses to just "wing it and fail", leaving it to the user to determine manually precisely what LW did and didn't put in the OBJ. A poor approach, wasteful of users' time.

    A much better approach, on top of citing the specific info to be saved and dropped (can even be part of the same dialog), would be offering to save the object as an LWO as a "backup" to ensure the info is not lost, as well as offering to cancel the export altogether (in case the user decides instead they need to use a format that doesn't drop so much info). A "gold-star-plus" UX would actually suggest/offer formats that would save everything, besides LWO. And of course, that should be the "standard" object export flow in all cases, not just OBJ.

    This whole "LW leaving it to the user to figure out what LW did" nonsense must end. Software is there to assist the user, not take a direct task and turn it into a bunch of additional diagnostic work where the user must determine what actually did and did not occur.
    Last edited by jwiede; 09-23-2018 at 02:43 PM.
    John W.
    LW2015.3UB/2018.0.5 on MacPro(12C/24T/10.13.6),32GB RAM, NV 1080ti

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •