LightWave Importer for Unity

BeeVee

ex-LightWave documentation
And have you posted a feature request? Posts to the forum only get seen by other users, who can't help with a development request.

B
 

gar26lw

New member
Can you be more specific please? I'm not sure what you mean by transform script...

Sorry Chris,

Yeah, When an object is imported and then added to the scene, you will see that there is a script (which derives from a dll)
that's applies a transform and has something else regarding morphs or anim.
 
Sorry Chris,

Yeah, When an object is imported and then added to the scene, you will see that there is a script (which derives from a dll)
that's applies a transform and has something else regarding morphs or anim.

Right, got it. That would be the LWO Hierarchy component. It's not really possible to disable it as it's never actually enabled! By that, I mean that it doesn't execute at runtime because it doesn't contain any Start() or Update() methods, so Unity doesn't give you the ability to disable the component - it's simply used to store data regarding the hierarchy and any morph maps - extra data that the LWS Importer needs so that the same hierarchy can be rebuilt correctly when the scene is built.

Removing it from the imported object would mean that the LWS Importer won't be able to recreate the scene. This data needs to be stored somewhere and storing it on the imported Gameobject seemed as good a place as any. Because it's not executed at runtime, it shouldn't have any negative performance side-effects - it's there as a data container and nothing more.

By 'disable', do you really mean you want it removed? It may be possible to remove it after the scene has been built. Or it might be possible for me to look into alternative solutions. But I'd like to understand your needs as it's not a small job... and as I say, according to the the Unity docs, it shouldn't have a performance impact and it's memory footprint is negligible.
 
LightWave Importer Version 1.30 is out and it's got some goodies that some of you might find useful.
It features a few more options on the Object Inspector:
image002.png

Generate Lightmap UVs (highlighted) can be used to automatically create an unwrapped secondary UV map, for use with baked shadows and lighting.

Below that, I've added an option to disable the generation of Scene Hierarchy Data. This is data that is attached to the root GameObject of each imported lightwave object, and is used to correctly recreate any lightwave scenes that the model is part of. It's enabled by default, but if you are importing a model that you know is not going to be part of any scene then it can be disabled.

Hope you like the update!

-Chris
 

gar26lw

New member
thanks Chris, great stuff and awesome that you added lightmap UV support!

cheers


Edit : getting a mesh corruption when enabling generate lightmap uv's, will send you a test case LWO later on today to check out.
 
Last edited:
Edit : getting a mesh corruption when enabling generate lightmap uv's, will send you a test case LWO later on today to check out.

It looks like the built-in Unity function I'm using to unwrap the secondary UVs does not handle UV seams at all well.
I have an idea on how to fix it but it's going to take some time. Will keep you updated on my progress.
 
I've just been made aware of a pretty serious issue where LWO Importer is causing meshes to become corrupted. It doesn't affect all meshes (naturally) and is only happening in LWO Importer 1.71.
I suspect it has something to do with high-poly meshes and I'm working on a fix right now. Will keep you updated.
 
The fixed update has now been submitted to Unity. Until it goes live, if you're working with high-poly models and experience this corruption please drop me a mail and I'll send you the latest version manually. The support email is in the user guide.
 
Released a slew of minor updates recently, so I thought I'd summarise what's new. It's mostly bug fixes but there are also a few nice enhancements. These are the latest release notes for Lightwave Importer 1.34...
LWO Importer:
1.74
- Fixed Exception on reading a completely empty ImageBlock
- Fixed reading wrong number of bytes from a IUVI Block
- Improved logging by listing the names of any materials with unsupported texture mapping

1.73
- Added slider to increase distance between uv islands when generating shadow map UVs.
- Reduced minimum Unity version supporting generating light maps from 2019.1 to 2018.4.

1.72
- Fix for mesh corruption occurring during building of high-poly layers.
- When importing a high-poly mesh with Generate Lightmap UVs enabled and Index Format set to 16bit, the mesh will be created with an Index Format of 32bit and a warning will be displayed.
- Generate Lightmap UVs option is now limited to Unity 2019.1 and later.

LWS Importer
1.22
- Corrected the setting of some light properties: range and HD-Light area rectangular size.

1.21
- Fixed Scene importer failing to import scenes with one-line Blocks and non-standard blocks terminated with a ';' character, as found in some 3rd party plugins.
 

tyrot

New member
thanks for update.. I appreciate it.. One amazing thing about this LWOimporter it is almost faster than HUB :) what a cool thing..

I will buy LWS importer too but i want to ask something..

Please watch this video -
https://www.youtube.com/watch?v=M3P9v79TIY0&t=426s

It is LW to Unreal instancing support..

Do we have some functionality with LWS importer - This will be game changer for me..
 
thanks for update.. I appreciate it.. One amazing thing about this LWOimporter it is almost faster than HUB :) what a cool thing..

I will buy LWS importer too but i want to ask something..

Please watch this video -
https://www.youtube.com/watch?v=M3P9v79TIY0&t=426s

It is LW to Unreal instancing support..

Do we have some functionality with LWS importer - This will be game changer for me..

Hi Tyrot
Yeah that's a cool video. I guess the instances are instanced in Lightwave then Unreal sees them as such and references back to the single object file.
LWS Importer doesn't currently support this but I'll take a look into seeing how feasible it is.

The current work around (which doesn't actually need LWS Importer) is to drag the model you want instanced into your Unity scene and duplicate it a bunch of times there.
So long as the source mesh is very light (<300 vertices) then Unity will automatically batch all the instances together when it draws.
See this for more info: https://docs.unity3d.com/Manual/DrawCallBatching.html
 

gar26lw

New member
I guess you would want all instances to be pointed to a prefab. Going further, you could make use of unity's nested prefabs too.

You can get cloning tools , like max's (or any other 3d apps) clone tool, that will array and clone to instances on the asset store.
 
Top Bottom