Page 1 of 4 123 ... LastLast
Results 1 to 15 of 49

Thread: LWO Importer on the Unity Asset Store

  1. #1

    LWO Importer on the Unity Asset Store

    Hi, I've just released a really useful tool for any Unity/Lightwave users out there: LWO Importer. Link here.

    Here's a link to the YouTube trailer.

    And some screenshots:
    Click image for larger version. 

Name:	Screenshot1.png 
Views:	128 
Size:	709.2 KB 
ID:	143174 Click image for larger version. 

Name:	Screenshot2.png 
Views:	113 
Size:	868.4 KB 
ID:	143175 Click image for larger version. 

Name:	Screenshot3.png 
Views:	105 
Size:	608.5 KB 
ID:	143176

    Unity's support for Lightwave files is... how to put this tactfully... lacking. So in order to get meshes into Unity the general process is to copy all your layers into a new object file, strip out any unwanted geometry like splines etc, triple your polygons, then export the file as an .fbx before finally importing into Unity. Then you'll find your mesh is 180 degrees rotated, so you need to add a parent GameObject to rotate it back. Things are generally pretty tedious and messy.

    Not any more!
    LWO Importer allows Unity to handle .lwo files directly. Any .lwo files within a Unity project will be automatically imported once this assert is installed. This means:
    - Immediate feedback. Save your object in Lightwave, switch to Unity and the mesh will update instantly
    - Support for NGons and Quads - so no need to keep triangulating your mesh.
    - Converts all Lightwave surfaces to Unity materials.
    - Layer names, hierarchy and pivot-points are retained. The model will be organised in Unity exactly as it is in Lightwave.

    Plus a bunch more features. For full details check out the Unity Asset Store

    Development is ongoing: I'm currently working on supporting Catmull-Clarke subdivision surfaces. After that, automatic vertex splitting over Lightwaves surface smoothing threshold.

    The feedback I've got so far has been overwhelmingly positive and I hope that if you should use it, then you find it very helpful.

    Also, if you have any other feature requests then please let me know.

    - Chris
    Last edited by escape_artist; 10-23-2018 at 01:50 AM.

  2. #2
    Thank you for making this. I'll definitely be picking this up.
    My opinions and comments do not represent those of my employer.
    www.ernestpchan.com
    www.zazzle.com/gopuggo

  3. #3
    Electron wrangler jwiede's Avatar
    Join Date
    Aug 2007
    Location
    San Jose, CA
    Posts
    6,504
    Quote Originally Posted by escape_artist View Post
    - Converts all Lightwave surfaces to Unity materials.
    Can you clarify what your approach is for converting materials, are only direct-attached nodes of the supported types migrated?

    What happens when it encounters a node it doesn't understand? Can it handle basic logic/math/invert nodes as well?
    Last edited by jwiede; 10-23-2018 at 03:11 PM.
    John W.
    LW2015.3UB/2019.1.4 on MacPro(12C/24T/10.13.6),32GB RAM, NV 980ti

  4. #4
    Registered User
    Join Date
    Aug 2016
    Location
    a place
    Posts
    1,843
    i already posted this for you here, if you look in this forum right below this thread

    https://forums.newtek.com/showthread...8-LWO-Importer

  5. #5
    Electron wrangler jwiede's Avatar
    Join Date
    Aug 2007
    Location
    San Jose, CA
    Posts
    6,504
    Quote Originally Posted by gar26lw View Post
    i already posted this for you here, if you look in this forum right below this thread

    https://forums.newtek.com/showthread...8-LWO-Importer
    Actually, I read that before posting, it didn't answer my main question -- what happens when it encounters a node it cannot convert?

    Does the whole export fail, does it just skip that channel/surface, or try to wire it up ignoring that node, or...?

    When it does fail for whatever reason(s), does it provide the user with a report of what object(s)/surfaces/etc. failed and why?

    Also, does it convert any UV or other maps present? If so, is it same limits as FBX or do its limitations/behaviors differ from FBX*?

    Thanks!

    *: Reason I ask is because we have various export options to control how LW exports certain aspects of objects. I'm just trying to understand whether those controls still apply, or do you provide equivalent settings?
    Last edited by jwiede; 10-23-2018 at 06:50 PM.
    John W.
    LW2015.3UB/2019.1.4 on MacPro(12C/24T/10.13.6),32GB RAM, NV 980ti

  6. #6
    Quote Originally Posted by jwiede View Post
    Can you clarify what your approach is for converting materials, are only direct-attached nodes of the supported types migrated?

    What happens when it encounters a node it doesn't understand? Can it handle basic logic/math/invert nodes as well?
    Hi. Those are good questions:
    Yes, only directly connected nodes to the material are used - so nodes any deeper than the first connection will not have any affect.
    Node types supported are:
    • 2D Textures>Image
    • 2D Textures>NormalMap
    • Layers>Color Layer
    • Constant>Scalar
    • Constant>Color

    It converts all this data to build a Standard Shader material in Unity. A Lightwave 'BSDF Material' will be converted to a 'Standard (Roughness Setup)' material in Unity, and a Lightwave 'Standard' material will be converted to a Unity 'Standard (Specular Setup)' material. Also, you don't need to use nodes - LWO Importer is happy to keep it simple and convert Lightwave's old-style (no nodes) materials, even if using LW2018.

    When it encounters a node it doesn't understand it will ignore it and convert as best it can without emitting any errors.
    No, it can't handle any math, as this would require it to convert the material into a bespoke shader - a huge task and something beyond the remit of the software.
    Obviously there are some tight limitations in converting Lightwave materials to work with Unity by using Unity's Standard Shader - but for any game-engine specific shader needs you have, it's a fairly simple process to replace the materials on any imported objects with your own hand-crafted ones.

  7. #7
    Quote Originally Posted by jwiede View Post

    When it does fail for whatever reason(s), does it provide the user with a report of what object(s)/surfaces/etc. failed and why?

    Also, does it convert any UV or other maps present? If so, is it same limits as FBX or do its limitations/behaviors differ from FBX*?
    If it does fail to import your mesh it should spit out an error in the Unity console, however I've tried to make it robust so it won't fail on little things like finding non-polygons (splines, skelegons etc).
    It doesn't require you to triple the mesh either - it does that for you.
    I've tried the importer with a wide variety of meshes downloaded from TurboSquid, as well as my own of course, and it seems stable. But any meshes that do fail I would be eager to get my hands on them, chances are good that I'll be able to get them working and improve the software in the process.

    Yes it imports UV maps, and Vertex Color maps. It does differ quite a lot from exporting as an fbx, in too many ways to list really. Is there some specific unwanted behaviour you've encountered when exporting as fbx? If so I can give you an idea on how LWO Importer deals with it.

  8. #8
    Quote Originally Posted by gar26lw View Post
    i already posted this for you here, if you look in this forum right below this thread

    https://forums.newtek.com/showthread...8-LWO-Importer
    Yeah I don't know how I missed that really, but anyway thanks!

  9. #9
    A.K.A "The Silver Fox" Gungho3D's Avatar
    Join Date
    Aug 2009
    Location
    Oztralia
    Posts
    419
    Quote Originally Posted by escape_artist View Post
    Hi, I've just released a really useful tool for any Unity/Lightwave users out there: LWO Importer. Link here.
    ...
    Hey Chris, great tool, once installed it magically does its thing and .lwo conversion (mostly) is as simple as copying the models and textures into the relevant Unity3D project folders (either via Explorer or via drag & drop directly onto the Unity3D project hierarchy).

    I've been pushing hard into getting Unity3D's HDRP "High Definition Render Pipeline" working for me, and in this realm sometimes your tool struggles a little (Unity3D 2018.2.0b9)
    - sometimes if I save a model straight out of Modeler, all of my materials are smoked in Unity3D and turn into an ugly hot pink
    - … what I mean is the LWO model has already been successfully imported into Unity, but I've gone back and made some changes and saved …
    - … thereafter even if I use the magic "convert selected materials" in Unity there is no change: same hot pink …
    - … but if I save the file in Modeler, switch to Layout and save the model again, I am able to recover from the dreaded hot pink to default surfaces via the magic "convert selected materials" button in Unity …
    - … the only problem being all of the previous material settings for the model in Unity have now been lost

    Bear in mind the above is happening under the Unity3D HD Render Pipeline. I'm on LW 2018.5.

    Still happy with the tool! Keep going, great job so far.

  10. #10
    Quote Originally Posted by Gungho3D View Post
    - sometimes if I save a model straight out of Modeler, all of my materials are smoked in Unity3D and turn into an ugly hot pink
    Ah ha you've found a bug. Yes it does the same thing on mine too with the latest version of Unity. Seems the HDR setup in Unity isn't playing nicely with the material shader setup I'm using. I have an idea on how to fix this... I'll look into it and hopefully get it working better for the next version. Thanks!

  11. #11
    A.K.A "The Silver Fox" Gungho3D's Avatar
    Join Date
    Aug 2009
    Location
    Oztralia
    Posts
    419
    Hey Chris - a few more things ...

    1. Your conversion materials come across as type "Specular Colour" in Unity 3D
    - I'm more comfortable / am getting better end results by selecting "Standard" as the type
    - but this is not a biggie as the ability to bulk change that material setting in Unity3D is easy

    2. Currently, bump maps are coming in as height maps?
    - this is tearing up textures across a given model (sorry no examples to show)
    - I get around this by discarding the references to height maps in Unity (or deleting them from the LWO)

    3. Materials reset
    - if I get "pink materials" in Unity (meaning a disconnect between model and textures/materials) ...
    - ... when that connection is re-established, any and all Unity3D materials settings are lost, reset to default
    - question: how possible is it for materials changes to be noted in Unity and have the option not to be over-written?
    - ... or maybe some means of saving out the current state of materials from within Unity which can then be restored to?

    SO, JUST IN CASE anyone is querying why I'm asking these things here, every bit of what I'm asking about is to benefit a smooth/speedy workflow between Lightwave 3D and Unity ... just sayin'

  12. #12
    Registered User tyrot's Avatar
    Join Date
    Mar 2006
    Location
    in lights
    Posts
    2,167
    THANK you again and again ! It is so awesome that it works flawlessly with 2017 unity .. (thanks for checking)

    How about hmmm ... "exporting unity object" to LWO in next update!??? )

  13. #13
    Quote Originally Posted by Gungho3D View Post
    Hey Chris - a few more things ...

    1. Your conversion materials come across as type "Specular Colour" in Unity 3D

    2. Currently, bump maps are coming in as height maps?
    - this is tearing up textures across a given model (sorry no examples to show)

    3. Materials reset
    - if I get "pink materials" in Unity (meaning a disconnect between model and textures/materials) ...
    1. In a low-dynamic range Unity project, Lightwave BSDF materials convert to the Standard (Roughness setup) material, and Lightwave's Standard Materials are converted to the Standard (Specular setup). For HDR conversion I will need to look into it and try and figure out the most natural mapping.

    2. I decided that the closest thing to a bump map in Lightwave were height maps in Unity. If there are tearing artifacts then perhaps the height map value is too large? This can be changed in Lightwave -here's a screenshot showing that in the Materials example that comes with LWO Importer, the Bump Height is at just 5%. Generally, low values are best here.
    Click image for larger version. 

Name:	Screenshot 2018-10-25 at 10.04.19.png 
Views:	63 
Size:	197.9 KB 
ID:	143208

    3. Yeah this is a limitation I'd like to fix but I'm not sure exactly the best way to do it right now. As you have noticed, the materials are 'locked' - greyed-out - when they come into Unity. Converting them to HDR I think makes copies of all the materials, just as you can do manually be selecting the material in the Project view by finding it under the imported model and duplicating it (cmd/ctrl - D), then re-assigning this duplicate material to the mesh in the scene. But this change doesn't survive importing the model again, as doing so will overwrite this.
    I think the fix is likely to be similar to Unity's .fbx import option where imported materials can be remapped to pre-existing materials in the assets import options. However this isn't a small job to implement so I'll need some time to determine how best to do it, and if it's definitely worth it.


    And I'm very happy to get feedback, thanks, so keep it coming!

  14. #14
    Quote Originally Posted by tyrot View Post
    THANK you again and again ! It is so awesome that it works flawlessly with 2017 unity .. (thanks for checking)

    How about hmmm ... "exporting unity object" to LWO in next update!??? )
    ha, yeah there's an idea. If you do need to get stuff from Unity back to Lightwave there's a free fbx exporter on the store.
    provided by the Unity team.

  15. #15
    Registered User tyrot's Avatar
    Join Date
    Mar 2006
    Location
    in lights
    Posts
    2,167
    oh that one - has so many errors ... i am spoiled already by LWO importer

Page 1 of 4 123 ... LastLast

Tags for this Thread

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
  •