Page 1 of 3 123 LastLast
Results 1 to 20 of 48

Thread: The LWO import-export project.

  1. #1
    Member paleajed's Avatar
    Join Date
    Feb 2005
    Location
    Boom, Belgium
    Posts
    1,319

    The LWO import-export project.

    Hi,

    For those following the .lwo export craze of last few days : I have taken it upon me to create the ultimate .lwo import and export experience (as much round-trip as possible).

    This first post will hold links to the most recent importer and exporter version I created:

    Importer download

    Exporter download

    It is wise to use these two addons in tandem for the best porting experience. (I will put both addons in one file later but focus is now on development).

    This first post features an importer based on the old one, featuring as extras : importing of multiple textures per material (only UV projection), proper handling of ngons and separate layers being collected as objects parented to a central empty (instead of just multiple objects in the scene as before).
    The exporter doesnt feature multiple textures per material yet, but material properties saved have been matched to those supported by the importer.

    Also now:
    - (split) vertex normals implementation
    - possible to save the vertex normals created by the "Recalc Vertex Normals" addon
    - multiple textures in exporter

    This is a work in progress, so comments/bugreports/ideas are more than welcome, also since I have very little time for testing myself (expect bugs...).

    Work to be done the coming days :
    - support for other texture projections + other than color maps in importer and exporter
    - maybe skelegon export (have to look at it)
    - anything you people might propose

    There will be no .lws support.


    This project has been made possible because of some donations people made to support development. Please consider making a small contribution yourself here if this effort benefits you.


    Have fun.


    Oh yeah, the exporter is idTech compatible by now.
    Last edited by paleajed; 15-May-14 at 22:21.
    Don't feed your ego, feed the duckies...

    my work: www.ewocprojects.be



  2. #2
    Member Herbert123's Avatar
    Join Date
    Apr 2009
    Location
    Vancouver
    Posts
    1,436
    Thanks so much for your work on this!

    I tested some more models, and the importer fails on this model:
    http://www.scifi3d.com/details.asp?i...tID=10&key=592

    It cannot import the images, and chokes on them.
    /*----------------------------------------------------*/
    System: Win7 64bit - i7 [email protected], p6t Deluxe v1, 48gb (6x8gb RipjawsX), ATI 7970 3gb, EVGA 590 3GB, Revodrive X2 240gb, e-mu 1820. Screens: 2 x Samsung s27a850ds 2560x1440, HP 1920x1200 in portrait mode



  3. #3
    Member Greenlaw's Avatar
    Join Date
    May 2014
    Location
    Los Angeles, CA
    Posts
    2
    Yes, thank you for doing this. Will test it as soon as I am able to.

    G.



  4. #4
    Member Desert_Dude's Avatar
    Join Date
    May 2014
    Location
    Tucson
    Posts
    6
    Hi, another thank you!

    I have a question about exporting with edited vertex normals. I have been experimenting with the Addon "Recalc Vertex Normals" found in this thread:

    http://blenderartists.org/forum/show...Vertex-Normals

    I can push the normals to all point outward, but no matter the export format, bringing the model into LightWave recalculates the normals. I have tried this exporter with Recalculate Normals checked and unchecked...no luck.

    Is this a LightWave thing, or a Blender thing upon export? I could easily be doing something wrong...

    Thanks again



  5. #5
    Member paleajed's Avatar
    Join Date
    Feb 2005
    Location
    Boom, Belgium
    Posts
    1,319
    Originally Posted by Herbert123 View Post
    Thanks so much for your work on this!

    I tested some more models, and the importer fails on this model:
    http://www.scifi3d.com/details.asp?i...tID=10&key=592

    It cannot import the images, and chokes on them.
    First off all move the .lwo file one directory up. Then create a "Textures" directory in the "Images" directory and copy all textures into it. Thats the right setup for the importer to find all files (setting up texture location correctly is important for the importer to work).

    Then first download the latest importer from above (slight changes but it should work with the version you have too; but do download!).

    Now the next problem is this object is heavy, and Python is slow... With "apply subds" checked loading took me 8 minutes(!) and the resulting scene took 9Gb of memory, without it takes 5 minutes and 2.5Gb RAM.

    The good news? It loads. Dare anyone to throw something even heavier at it!

    Didnt try to re-export yet; to be honest I dont dare.
    Don't feed your ego, feed the duckies...

    my work: www.ewocprojects.be



  6. #6
    Member paleajed's Avatar
    Join Date
    Feb 2005
    Location
    Boom, Belgium
    Posts
    1,319
    Originally Posted by Desert_Dude View Post
    Hi, another thank you!

    I have a question about exporting with edited vertex normals. I have been experimenting with the Addon "Recalc Vertex Normals" found in this thread:

    http://blenderartists.org/forum/show...Vertex-Normals

    I can push the normals to all point outward, but no matter the export format, bringing the model into LightWave recalculates the normals. I have tried this exporter with Recalculate Normals checked and unchecked...no luck.

    Is this a LightWave thing, or a Blender thing upon export? I could easily be doing something wrong...

    Thanks again
    I just discovered the latest .lwo format does support vertex normals (its not in the official docs) but its not supported by the importer/exporter yet. Will soon be added though.
    Last edited by paleajed; 15-May-14 at 14:54.
    Don't feed your ego, feed the duckies...

    my work: www.ewocprojects.be



  7. #7
    Member Michael W's Avatar
    Join Date
    Nov 2007
    Location
    UK
    Posts
    4,992
    Now the next problem is this object is heavy, and Python is slow... With "apply subds" checked loading took me 8 minutes(!) and the resulting scene took 9Gb of memory, without it takes 5 minutes and 2.5Gb RAM.
    Interesting! I'd be curious to know if an object in lightwave is sub d could the importer add a sub d modifier? and for export if a blender object has the sub d mod can it come in to lightwave as a sub d object?
    Mike Williamson
    www.cowtoolsmedia.co.uk



  8. #8
    Member Michael W's Avatar
    Join Date
    Nov 2007
    Location
    UK
    Posts
    4,992
    also is the importer smart for textures/materials? ie does it work with both cycles and BI?
    Mike Williamson
    www.cowtoolsmedia.co.uk



  9. #9
    Member paleajed's Avatar
    Join Date
    Feb 2005
    Location
    Boom, Belgium
    Posts
    1,319
    Originally Posted by Michael W View Post
    Interesting! I'd be curious to know if an object in lightwave is sub d could the importer add a sub d modifier? and for export if a blender object has the sub d mod can it come in to lightwave as a sub d object?
    When importing, there is indeed the option to add subd modifiers for lightwave subpatch objects. The subdivision level isnt set, since as far as I know it isnt saved with the .lwo file.

    Exporting is more tricky, since the subd modifier(s) could be anywhere in the modifier stack. At the moment the exporter automatically applies modifiers. This maybe should be made an option. Then another option could be to add a subd modifier to the exported .lwo file whenever theres one in the objects modifier stack...
    Don't feed your ego, feed the duckies...

    my work: www.ewocprojects.be



  10. #10
    Member paleajed's Avatar
    Join Date
    Feb 2005
    Location
    Boom, Belgium
    Posts
    1,319
    Originally Posted by Michael W View Post
    also is the importer smart for textures/materials? ie does it work with both cycles and BI?
    It only works with Blender Internal and doesnt interpret Lightwave material node trees (that would be hell to implement, since obviously, Lightwaves node trees arent really like BI or Cycles nodes at all, and not being able to translate even one node in the node flow would render the whole node tree meaningless).
    Of course you could always use this material conversion script to convert the imported BI materials to Cycles materials. If you people think it would be added value, I could even try incorporate this scripts code into the importer so materials would be added for Cycles automatically.
    Don't feed your ego, feed the duckies...

    my work: www.ewocprojects.be



  11. #11
    Member Desert_Dude's Avatar
    Join Date
    May 2014
    Location
    Tucson
    Posts
    6
    Originally Posted by paleajed View Post
    I just discovered the latest .lwo format does support vertex normals (its not in the official docs) but its not supported by the impoter/exporter yet. Will soon be added though.
    That is so awesome! Thank you so much for your efforts!! (I just sent you some financial aid)



  12. #12
    Member paleajed's Avatar
    Join Date
    Feb 2005
    Location
    Boom, Belgium
    Posts
    1,319
    Just added support for vertex normals and split vertex normals to the importer and exporter, or rather:

    - exporting works like the FBX exporter: sharp/smooth edges are converted to split vertex normals that load into LightWave (since smoothing is a material and not a mesh property in LightWave, you'll have to set the material Vertex Normal Map to "vert_normals" in Lightwave before smoothing will appear)

    - importer converts (split) vertex normals into polygon smoothing in Blender


    Download in first post.
    Last edited by paleajed; 15-May-14 at 14:54.
    Don't feed your ego, feed the duckies...

    my work: www.ewocprojects.be



  13. #13
    Member paleajed's Avatar
    Join Date
    Feb 2005
    Location
    Boom, Belgium
    Posts
    1,319
    Originally Posted by Desert_Dude View Post
    Hi, another thank you!

    I have a question about exporting with edited vertex normals. I have been experimenting with the Addon "Recalc Vertex Normals" found in this thread:

    http://blenderartists.org/forum/show...Vertex-Normals

    I can push the normals to all point outward, but no matter the export format, bringing the model into LightWave recalculates the normals. I have tried this exporter with Recalculate Normals checked and unchecked...no luck.

    Is this a LightWave thing, or a Blender thing upon export? I could easily be doing something wrong...

    Thanks again
    Ok, I looked into this... The vertex normals set by the "Recalc Vertex Normals" addon are not exported in any format because the addon saves the normals in its own spot and format. So when exporting, Blender just happily auto-calculates all vertex normals again (as Blender always does) and exports none of the settings you made. What I could do, if this really matters to you, is add a checkbox to the .lwo exporter options thatll make the exporter access the information created by "Recalc Vertex Normals" and export it in the .lwo file.
    Don't feed your ego, feed the duckies...

    my work: www.ewocprojects.be



  14. #14
    Member Desert_Dude's Avatar
    Join Date
    May 2014
    Location
    Tucson
    Posts
    6
    Originally Posted by paleajed View Post
    What I could do, if this really matters to you, is add a checkbox to the .lwo exporter options thatll make the exporter access the information created by "Recalc Vertex Normals" and export it in the .lwo file.
    Yes, that is precisely what I am looking to achieve. Thank you!



  15. #15
    Member paleajed's Avatar
    Join Date
    Feb 2005
    Location
    Boom, Belgium
    Posts
    1,319
    @Desert_Dude :

    A new importer version is downloadable with support for exporting the "Recalc Vert Normals" addon data added. Its an option you have to check before exporting.

    At your service and thanks for the donation.
    Don't feed your ego, feed the duckies...

    my work: www.ewocprojects.be



  16. #16
    Member Desert_Dude's Avatar
    Join Date
    May 2014
    Location
    Tucson
    Posts
    6
    Wow, a quick test worked! I was slamming my head against the keyboard for the past week. I will have more time to test this week end. This is so cool!!

    Thanks, and Cheers paleajed!



  17. #17
    Member paleajed's Avatar
    Join Date
    Feb 2005
    Location
    Boom, Belgium
    Posts
    1,319
    Ok, now we have multiple texture per material support for the exporter. Download and enjoy!
    Don't feed your ego, feed the duckies...

    my work: www.ewocprojects.be



  18. #18
    Member Herbert123's Avatar
    Join Date
    Apr 2009
    Location
    Vancouver
    Posts
    1,436
    Unfortunately there are still some strange issues with the millenium falcon object.

    The first screenshot is from an older version, while the bottom screenshot was taken after opening the object with the latest importer.
    In both cased the stern area is missing parts, and in the second version textures are missing.


    Untitled.jpg
    /*----------------------------------------------------*/
    System: Win7 64bit - i7 [email protected], p6t Deluxe v1, 48gb (6x8gb RipjawsX), ATI 7970 3gb, EVGA 590 3GB, Revodrive X2 240gb, e-mu 1820. Screens: 2 x Samsung s27a850ds 2560x1440, HP 1920x1200 in portrait mode



  19. #19
    Member Desert_Dude's Avatar
    Join Date
    May 2014
    Location
    Tucson
    Posts
    6
    I did a quick test and...it worked! That is so cool, paleajed! I will have more time to test this week end.
    Thanks, and cheers!



  20. #20
    Member paleajed's Avatar
    Join Date
    Feb 2005
    Location
    Boom, Belgium
    Posts
    1,319
    Originally Posted by Herbert123 View Post
    Unfortunately there are still some strange issues with the millenium falcon object.
    New importer version online seems to solve these issues. Take care, this model has 34 UVMaps on the main object. Normally Blender only safely supports 8 of these, and its only because of a hole in the Python API that loading all UVMaps is possible with the exporter. In normal use, keep your UVMaps to 8 maximum per layer in Lightwave before saving your .lwo file.
    This amount of UVMaps also slows down loading quite a lot (for reasons too complicated) but youll be happy to hear I sped up the code loading UVMaps to the point loading this model now only takes 2 minutes instead of the 5 minutes before.
    Don't feed your ego, feed the duckies...

    my work: www.ewocprojects.be



Page 1 of 3 123 LastLast

Posting Permissions

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