PDA

View Full Version : Empty Layers lose their names in Layout?



Linear
02-19-2018, 02:31 PM
Hey guys, I'm not new to Lightwave, but I'm new to the forums... not sure if this is the right place to ask, but I have an irritating issue.

I'm using Lightwave 2015.3 and I setup my layer stuff (names and parent layer references) in Modeler so that when I send my objects to Layout, the layers sort themselves into a nice hierarchy. One thing I've noticed though is that if I have an empty layer (no geometry), no matter what I name the layer, Layout renames it to "Layer1", "Layer2", etc. Then, in Layout, the layer names aren't editable for some reason so it stays like that. I typically use empty layers as parent layers that group multiple layers that do contain geometry. It's just neater that way when I export to Unity.

I tried some workarounds like putting a single vertex at origin. This forces Layout to keep the layer name, but then Unity's all like "bro, there's a vertex here and it's not connected to anything" and generally isn't happy about it.

As a hack I can create Nulls in Layout and setup my layer hierarchy that way, but I'd prefer to keep that information with the LWO if I can help it.

Is there anything clever I can do here?

jeric_synergy
02-19-2018, 03:18 PM
Yeah, you've found a shortcoming of the LWO format.

I dunno how Unity will react, but LW supports "one point polys", which can be created in Modeler. So, possibly that would work: it's still one point, but it's also a poly. In LW at least.

The other thing you could do, and this is lame/more work is make a teeeeeensy little triangle at the origin, with a Surface that will make it forever invisible. Now it's a legit poly, so that should work.

To ease this task, look up... dangit... user IanR (?) made a script that allows you to convert any mesh into "a primitive" via LScript: iow, his script generates another script that when invoked creates an arbitrary mesh in LWM. I can't remember how Surfaces are handled. As you might imagine, it's fairly slow for any complicated mesh, but for generating a teensy triangle it's pretty much instantaneous.

(The idea was: any given modeler might find him/herself habitually starting with a simple shape, like a "quadsphere", that isn't natively/anywhere supported. By making arbitrary SIMPLE meshes available at the push of a mapped button, you could have your favorite "starter shape" instantly.)

I believe he even posted an uncompiled version so you can tweek to your heart's content. Maybe not.

Anyway, hope that solves your problem. Worse case: make a small triangle with an invisible Surface.

wingzeta
02-19-2018, 04:04 PM
Making a null in layout is the right thing to do. Your needs may be more complicated, but you do the same thing in other apps like Max or Maya when exporting to a game engine. Attach object to a null. You can easily make a hierarchy with nulls if you need it. Your .lws is the file you will be exporting to fbx for an engine, not a .lwo. Check out this thread. http://forums.newtek.com/showthread.php?156142-LightWave-to-Unity-Quickstart Read the short pdf.

gar26lw
02-20-2018, 07:56 AM
Making a null in layout is the right thing to do. Your needs may be more complicated, but you do the same thing in other apps like Max or Maya when exporting to a game engine. Attach object to a null. You can easily make a hierarchy with nulls if you need it. Your .lws is the file you will be exporting to fbx for an engine, not a .lwo. Check out this thread. http://forums.newtek.com/showthread.php?156142-LightWave-to-Unity-Quickstart Read the short pdf.

it’s a shame we can’t use the hierarchy mode in modeller layers panel to do this, or can we? have to check

tburbage
02-20-2018, 10:09 PM
Try adding a point to the layer (+). Not exactly intuitive, but it works...

jeric_synergy
02-21-2018, 06:38 PM
The OP explicitly stated Unity didn't like that.

PetGerbil
02-21-2018, 10:06 PM
Isn't there a difference between 1 point poly's and a point ? I thought layout treated 1 points as nulls and 1 point polygons as 1 point polys.

jeric_synergy
02-22-2018, 12:31 AM
How Layout treats it isn't so important as how Unity regards it. EG, one point polys may be "illegal" in Unity.

BigHache
02-22-2018, 02:09 PM
How Layout treats it isn't so important as how Unity regards it. EG, one point polys may be "illegal" in Unity.

This. When dealing with a game engine, all polys should be triangles.

You can bring quads into Unity, but Unity will convert them to tris. I don't think this applies to ngons or any other variant of poly, just quads.

With a 1 or 2-point poly there's no surface to render so that should make the engine throw a nasty error your way. Haven't specifically tried it but haven't wanted to either.

jeric_synergy
02-22-2018, 07:38 PM
Thanks for that. So, a weensy triangle, with a stealthy Surface/Material/wutevz is the simplest route to try.

One thing: it MAY be simple to create a Unity script that would replace tagged tris with nulls. So, you might be stuck with them for the export/import, but can easily replace them in Unity. I dunno, but it's an approach.

BigHache
02-22-2018, 08:58 PM
Thanks for that. So, a weensy triangle, with a stealthy Surface/Material/wutevz is the simplest route to try.

One thing: it MAY be simple to create a Unity script that would replace tagged tris with nulls. So, you might be stuck with them for the export/import, but can easily replace them in Unity. I dunno, but it's an approach.

I think mucking with an FBX like this in Unity is not an awesome workflow and could introduce mistakes/errors, especially if you ever had to make a change to the geo, re-export, bring back into Unity. Typically I would say once you've brought your FBX in you don't want to mess with the hierarchy.

I did just try a test flipping to Hierarchy in the Layers palette in Modeler (which I did not know about), naming layers and organizing there. The layer names retained in Layout and with the FBX in Unity. So gar26lw theorized correct.

Lewis
02-23-2018, 01:07 AM
it’s a shame we can’t use the hierarchy mode in modeller layers panel to do this, or can we? have to check

Yes we can, there is List (default) and hierarchy mode in modeler layers browser panel. Just not nulls but parenting/hierearchy any geometry is visible. Click that down arrow near an Eye icon.