PDA

View Full Version : 2018 - Vertex Normal Map



BigHache
01-04-2018, 07:53 PM
"Although LightWave has no way of generating vertex normal maps internally yet, Layout can still work with them in objects obtained from other sources."

The problem for me is LightWave IS my other source. I'm trying to create game assets for Unity and I have no way to create/edit smoothing groups/vertex normals.

What are you guys doing for your workflow? Purchasing another full 3D program is not an option for me. Is there a tool that can be had for a few hundred that can assist? I haven't been rendering in LightWave for some time and unfortunately it seems like all the updates for 2018 are geared toward rendering within LightWave.

This makes 2018 a non-option for me and so my software budget will (hopefully) go toward a tool that allows me to do what I'm needing at the moment.

On a side note, what, if anything, has been updated for scripting (C++ SDK, LScript, Python)? This is the less sexy side of updates and I've looked but haven't seen any information that has delved into this at all yet.

gar26lw
01-04-2018, 08:00 PM
python has access to the sdk, i believe.

neglecting games dev is a very big mistake imho, blender?

BigHache
01-04-2018, 09:02 PM
Last I looked into the Python implementation it was not completely developed for all the hooks into LW. I've seen nothing to note that it ever has been completed. Not only that but the Python documentation was a bit lacking and required you to refer back to the C++ SDK. I feel like that defeats the purpose of Python and I might as well stick with C++ or LScript.

Last I looked at Blender it didn't even properly handle smoothing groups and required you to split the geometry. This is a terrible habit for a workflow especially as tools exist that do what's needed.

Well as I quoted from the 2018 online docs LightWave Group has implemented the functionality to see and select existing vertex normal maps so I wouldn't say game dev has been neglected it just hasn't been priority #1. The challenge for me as a customer is with no road map I have no idea when I can expect the functionality to create what I need within LW so I need something else for this one task.

Igu4n4
01-04-2018, 09:16 PM
Had this issue recently with some WebGL VR work. I couldn't find a work around. There are some independent programs that would take an FBX and let you set smoothing groups, but I could never get it to work. Unfortunately I had to take them into Max, set the smoothing, and re-export. I do think it's something that has been needed for a long time.

st3

BigHache
01-04-2018, 09:36 PM
I'd take a stab at some programs. What did you try? I've been researching but haven't even found anything.

Yeah we use Max at work and that's what I'm used to, but that doesn't help me at home.

CaptainMarlowe
01-04-2018, 10:43 PM
CHeck OD_tools 2018, they have a basic smoothing groups implementation :
https://vimeo.com/224008697

tburbage
01-05-2018, 06:37 PM
"Although LightWave has no way of generating vertex normal maps internally yet, Layout can still work with them in objects obtained from other sources."

The problem for me is LightWave IS my other source. I'm trying to create game assets for Unity and I have no way to create/edit smoothing groups/vertex normals.

What are you guys doing for your workflow? Purchasing another full 3D program is not an option for me. Is there a tool that can be had for a few hundred that can assist? I haven't been rendering in LightWave for some time and unfortunately it seems like all the updates for 2018 are geared toward rendering within LightWave.

This makes 2018 a non-option for me and so my software budget will (hopefully) go toward a tool that allows me to do what I'm needing at the moment.

On a side note, what, if anything, has been updated for scripting (C++ SDK, LScript, Python)? This is the less sexy side of updates and I've looked but haven't seen any information that has delved into this at all yet.

I really wish they would embrace full support for vertex normals, including allowing multiple normals per vertex (basis for smoothing groups) -- but somehow not optimistic we'll ever see it. I use Maya to harden edges and tweak vertex normals. AFAIK, neither ZBrush nor 3DCoat have tool support for them either, so maybe Blender?

Ztreem
01-05-2018, 07:49 PM
You can create vertex normals in modeler, itís just that its not a tool for it you have to do some workarounds, but still possible and you donít need 2018. Blender also have some tools for it...

BigHache
01-05-2018, 08:26 PM
You can create vertex normals in modeler, it’s just that its not a tool for it you have to do some workarounds, but still possible and you don’t need 2018. Blender also have some tools for it...

I'm game to try, how? I've been looking for info and I'm not finding it. When I search all I find are others asking the same questions and no solutions.

hrgiger
01-05-2018, 10:45 PM
I'm game to try, how? I've been looking for info and I'm not finding it. When I search all I find are others asking the same questions and no solutions.

There's a hack/workaround where you can cut and paste a section you want with a hard edge split, export that as an obj (with write normal option checked in OBJ tab in general options), load it back into modeler, merge points and you will have a smoothing split. Its really a dreadful workflow. And lack of smoothing groups/vertex normal toolkit is probably the reason that set me off on a search for a modeler replacement about 4 years ago.

139210

BigHache
01-07-2018, 08:47 AM
Ouch. That is dreadful.

I emailed Oliver about his Create Smoothing Groups tool within OD 2018 Tool Set and he confirmed it exported in FBX and he was able to bring into a game engine so I'm going to work with that for the moment. I'll test it myself later today.

BigHache
01-07-2018, 08:52 PM
Ugh. I can't get this work work. It looks fine in LW. Substance Painter doesn't see it, and Unity gives me an error that tangents and binormals dont exist.

samurai_x
01-07-2018, 09:54 PM
Modo indie is a good cheap alternative.
Check out this gas cooker tut https://www.youtube.com/channel/UC5dRrOarPI6ufGWsabG28FQ/videos
He also uses the rounded edge shader effectively to use with substance painter.

Sensei
01-07-2018, 10:41 PM
Ugh. I can't get this work work. It looks fine in LW. Substance Painter doesn't see it, and Unity gives me an error that tangents and binormals dont exist.

I sent you PM.. Mine worked fine in Modo at least.. Write to me through regular e-mail (TrueArt > Contact).
Then I will send you files for testing,
and I will send you files for testing..

samurai_x
01-07-2018, 11:20 PM
What tool do you have sensei? Do you have a new plugin for lw?

Ztreem
01-08-2018, 01:12 AM
Ouch. That is dreadful.

I emailed Oliver about his Create Smoothing Groups tool within OD 2018 Tool Set and he confirmed it exported in FBX and he was able to bring into a game engine so I'm going to work with that for the moment. I'll test it myself later today.

Then I suspect its only smoothing groups and no vertex normals, if its not a new fbx exporter? The only way to get vertex normals to and from LW is with obj. Fbx in LW doesnít support vertex normals.
Sorry to say but LW for game assets isnít the best choice, you can do things with akward and cumbersome workarounds, but if you do it often you should look for a better tool.

samurai_x
01-08-2018, 01:29 AM
I would grab modo indie perpetual license while they're still offering it on steam.
Best modeller for the money until we get updates to modeller in 2025. :D

Skonk
01-08-2018, 01:56 AM
FBX export and then importing into Unity seems to respect the "Smooth" setting on surfaces now (multiple surfaces on the same mesh with different Smooth settings carry into Unity).

Otherwise I've always just used the cut/paste trick (or unwelding points as needed).

BigHache
01-08-2018, 02:07 PM
I sent you PM.. Mine worked fine in Modo at least.. Write to me through regular e-mail (TrueArt > Contact).
Then I will send you files for testing,
and I will send you files for testing..

Thank you. I saw this real quick last night but I was working through testing one method first. Will reply later today.


Modo indie is a good cheap alternative.

Thanks, I'll take a look.


Then I suspect its only smoothing groups and no vertex normals, if its not a new fbx exporter? The only way to get vertex normals to and from LW is with obj. Fbx in LW doesnít support vertex normals.
Sorry to say but LW for game assets isnít the best choice, you can do things with akward and cumbersome workarounds, but if you do it often you should look for a better tool.

OK this sounds like my suspect then. I wasn't aware that FBX export from LW didn't support vertex normals. That is problematic for files that have animation.
Yeah, I know LW isn't the best choice for game assets but it's what I have, and this is a hobby for me at home so I can't just go grab tools and bake the cost into a quote as there are no quotes. ;)


FBX export and then importing into Unity seems to respect the "Smooth" setting on surfaces now (multiple surfaces on the same mesh with different Smooth settings carry into Unity).

Otherwise I've always just used the cut/paste trick (or unwelding points as needed).

Yes you can import the "Smooth" setting from the mesh or Calculate a smoothing angle in Unity. Though the Calculate feature will effectively replicate the Smoothing angle already available within LW. No ground gained there.
Using multiple surfaces will suffice for a small project, but that won't hold you for long.

Thank you everyone for your input. More testing and research to be done.

hypersuperduper
01-08-2018, 02:19 PM
Is it feasable in your project to replace the mesh in the fbx with an obj mesh within unity? Should be a simple matter of swapping out the skinned mesh in the skinned mesh renderer module and saving it as a new prefab.

You would need to do two exports one fbx and one mesh, but it wouldn’t be that much of a headache.

BigHache
01-08-2018, 08:25 PM
Is it feasable in your project to replace the mesh in the fbx with an obj mesh within unity?

That's an interesting thought. In theory it sounds feasible, yes. How does Unity treat the build would be my question.

CaptainMarlowe
01-09-2018, 12:48 AM
I didn't try with unity. But crreating vertex normal maps with OD_tools and export fbx 2016 with smoothing groups enabled carry them in unreal engine.

hrgiger
01-09-2018, 07:30 AM
If youre on a tight budget, you should consider Blender which is a more game asset friendly app.

Ztreem
01-09-2018, 08:38 AM
That's an interesting thought. In theory it sounds feasible, yes. How does Unity treat the build would be my question.

Works good, done it several times in different projects. You can animate and save a fbx with only nulls and then in unity just drag and drop the obj meshes to the fbx hierarchy.

hypersuperduper
01-09-2018, 01:02 PM
If youre on a tight budget, you should consider Blender which is a more game asset friendly app.

Some of us actually enjoy working in lightwave though. And if it does what you need there is no reason not to use it. I don’t entirely like the way you just drop your .blend files directly into your unity project either. I’m sure it works fine, but something about it seems iffy to me. I like a nice one way workflow with clear distinctions between my work files and exported assets.

hrgiger
01-09-2018, 02:47 PM
Some of us actually enjoy working in lightwave though. And if it does what you need there is no reason not to use it. I donít entirely like the way you just drop your .blend files directly into your unity project either. Iím sure it works fine, but something about it seems iffy to me. I like a nice one way workflow with clear distinctions between my work files and exported assets.

Well I was just suggesting Blender because they actually provide tools which allow for easier workflow to game engines and its free. Part of the whole reason I moved to Modo for asset creation was because of game friendly features including Vertex normal tookit/smoothing groups, game units, dedicated baking toolset, Unity/Unreal export, excellent fbx support, top notch UV toolset, Unreal bridge, retopology and of course real time preview of PBR in viewport. And Blender also has similar offerings. Modeler has close to none of that.

Ztreem
01-09-2018, 04:26 PM
Some of us actually enjoy working in lightwave though. And if it does what you need there is no reason not to use it. I donít entirely like the way you just drop your .blend files directly into your unity project either. Iím sure it works fine, but something about it seems iffy to me. I like a nice one way workflow with clear distinctions between my work files and exported assets.

There is a plugin for reading LW files in unity as well. I think it followed with LW2015.
Just because you can read blender or lw files you donít need to use it.

BigHache
01-09-2018, 05:45 PM
There is a plugin for reading LW files in unity as well. I think it followed with LW2015.

Good call. Wouldn't have even thought to ask the question.
https://docs.unity3d.com/Manual/HOWTO-importObjectLightwave.html

It's worth testing at least.

BigHache
01-10-2018, 03:39 PM
I didn't try with unity. But crreating vertex normal maps with OD_tools and export fbx 2016 with smoothing groups enabled carry them in unreal engine.

I'm still running LW 2105 and use the built in FBX exporter, which I think is part of my issue.


If youre on a tight budget, you should consider Blender which is a more game asset friendly app.

If I don't get this solved I may have to do that. I'd like to use the tools I bought and paid for... :/


Works good, done it several times in different projects. You can animate and save a fbx with only nulls and then in unity just drag and drop the obj meshes to the fbx hierarchy.

I tried and yes it works. I was chatting with a guy a work and he was not 100% positive, but is leaning toward this still requires the engine to load both meshes. I think this may unnecessarily bloat the size of the project.


I did not get the LW->Unity package to work last night, which is not really a big deal. I'm sure it's something simple that I missed but wasn't a feature I was exactly looking for.

BigHache
01-11-2018, 05:38 PM
Got the LW->Unity package working. The doc page from Unity didn't seem to document the final step.

This package adds a LightWave menu to the menu bar in Unity and you just have to Choose LightWave Install Path.

Now I just need to update to 2018 it seems to get the correct Vertex Normals to export for FBX. Progress.

Morgan Nilsson
01-11-2018, 06:10 PM
As a recent LW adopter, my solution to not having any way to modify normals in LW is just to use support loops, it works fine and isn't cumbersome to do. Using the inset in the N panel settings for the bevel tool for example.

BigHache
01-11-2018, 07:11 PM
Are you exporting out to a game engine though? If keeping within LW, your workflow should be just fine.

Morgan Nilsson
01-12-2018, 02:20 AM
Should work in game engines as well, no reason it wouldn't.

samurai_x
01-12-2018, 07:07 AM
Should work in game engines as well, no reason it wouldn't.

So you import those models with support loops and actual bevels directly into a game engine?

jwiede
01-13-2018, 12:45 AM
So you import those models with support loops and actual bevels directly into a game engine?

Sure, and then just apply/activate subdivision on the model within the game engine, right? ;)

samurai_x
01-13-2018, 01:06 AM
Sure, and then just apply/activate subdivision on the model within the game engine, right? ;)

shhhh..quiet...:D

Morgan Nilsson
01-13-2018, 02:44 AM
So you import those models with support loops and actual bevels directly into a game engine?

Yes! And no, you don't apply subdivision on it like Mr. Funny guy suggested.

http://polycount.com/discussion/154664/a-short-explanation-about-custom-vertex-normals-tutorial this thread mentions both methods, it is a preference thing, or in LWs case, only one method available.

samurai_x
01-13-2018, 08:20 PM
Ah you're talking about medium poly modelling workflow. I posted about it a while back. Learned from this guy.

https://www.youtube.com/watch?v=-L151VmMpIk
It has a certain look, Star Citizen pioneered it afaik.

Haven't tried it in modeler because I still end up needing smoothing groups to fix shading errors like that yt video. How do you edit normals in modeler like this?
http://i.imgur.com/b0D8z0B.jpg

BigHache
01-14-2018, 08:11 AM
Haven't tried it in modeler because I still end up needing smoothing groups to fix shading errors like that yt video. How do you edit normals in modeler like this?

This is the reason I started the thread. LW does not seem to have that functionality yet.

OD Tool Set has Create Smoothing Groups, which provides a simple method with no UI to create a vertex normal map.
However it seems you need LW 2018, which has an FBX exporter more recent than 2014, to get the information into an FBX.

Myagi
01-16-2018, 03:39 PM
If anyone is up for testing I have a beta here (win32/64, LW9.5+) (http://www.blytools.com/download.php?file=PB_VNormalTools-win.zip) of a smooth-group (to vertex normal map) plugin.

The core algorithm is something I've been using in a propriety plugin for a couple of years. However I had a slightly different (more cumbersome not-fit-for-public-use) way to assign smooth groups than in this standalone plugin. I've been wanting to put it into a for-public-use plugin for quite a while, if I could make group assignments a bit more sane.

If there are some volunteer testers and there aren't any reported issues, I'll put up on my plugin page (as a free plugin), but for now only the download link in this post exists.

gar26lw
01-16-2018, 04:28 PM
If anyone is up for testing I have a beta here (win32/64, LW9.5+) (http://www.blytools.com/download.php?file=PB_VNormalTools-win.zip) of a smooth-group (to vertex normal map) plugin.

The core algorithm is something I've been using in a propriety plugin for a couple of years. However I had a slightly different (more cumbersome not-fit-for-public-use) way to assign smooth groups than in this standalone plugin. I've been wanting to put it into a for-public-use plugin for quite a while, if I could make group assignments a bit more sane.

If there are some volunteer testers and there aren't any reported issues, I'll put up on my plugin page (as a free plugin), but for now only the download link in this post exists.

thanks. I will endeavor to give it a workout and get back to you with any findings

samurai_x
01-16-2018, 06:57 PM
Will try to test it, too.

BigHache
01-17-2018, 07:19 PM
Thanks! Will test this out over the next couple of days.

MarcusM
01-18-2018, 02:12 AM
If anyone is up for testing I have a beta here (win32/64, LW9.5+) (http://www.blytools.com/download.php?file=PB_VNormalTools-win.zip) of a smooth-group (to vertex normal map) plugin.

The core algorithm is something I've been using in a propriety plugin for a couple of years. However I had a slightly different (more cumbersome not-fit-for-public-use) way to assign smooth groups than in this standalone plugin. I've been wanting to put it into a for-public-use plugin for quite a while, if I could make group assignments a bit more sane.

If there are some volunteer testers and there aren't any reported issues, I'll put up on my plugin page (as a free plugin), but for now only the download link in this post exists.

Thank you. So many people wanted this in LightWave and you give it like that :) It need only more user friendly workflow/interface.

My tests:
- working in Modeler 2015.3 64bit
- smoothing groups looking good in Layout 2015.3 64bit
- saving and loading good from *.lwo
- NOT working in Unity 2017.2 when object exported as FBX201400 from Layout 2015.3

- working in Modeler 2018.0.1 64bit
- smoothing groups looking good in Layout 2018.0.1 64bit
- saving and loading good from *.lwo
- WORKING in Unity 2017.2 when object exported as FBX201600 from Layout 2018.0.1 - with turned OFF Smoothing Groups and Unity 3D Mode in exporter
- WORKING in Unity 2017.2 when object exported as FBX201600 from Layout 2018.0.1 - with turned ON Smoothing Groups and Unity 3D Mode in exporter

- WORKING udno/redo

139558

Myagi
01-18-2018, 03:12 AM
It need only more user friendly workflow/interface.

Polishing the UI code, mac version, adding some PDF or html doc with images to describe the passive group feature in a more digestible form and maybe add some more tools (based on ideas I have and/or suggestions) is certainly on the table. I had to restrain myself and first see if it works as it should and if anyone is interested, before putting more time into it.

Was there anything in particular you had in mind? The basic concept of the group buttons, similar to 3ds, would presumably remain the same. Stuff that right now I know are iffy are for example things like button drawing/looks, because I was forced to use the legacy LW Panel API in the SDK, and that the window position isn't remembered (I think).


- NOT working in Unity 2017.2 when object exported as FBX201400 from Layout 2015.3

- WORKING in Unity 2017.2 when object exported as FBX201600 from Layout 2018.0.1 - with turned OFF Smoothing Groups and Unity 3D Mode in exporter
- WORKING in Unity 2017.2 when object exported as FBX201600 from Layout 2018.0.1 - with turned ON Smoothing Groups and Unity 3D Mode in exporter


Those results are what I was expecting based on BigHache's findings earlier in this thread. The FBX exporter has to support Vertex Normal maps. Any exporter that takes vnormal maps into account should in theory work fine, as the smooth group assignments are only relevant during vnormal generation for this plugin.

(Disclaimer: I'm not familiar with what's inside the FBX format, so I don't know how and what gets exported there.)

Thanks for testing.

MarcusM
01-18-2018, 03:31 AM
Polishing the UI code, mac version, adding some PDF or html doc with images to describe the passive group feature in a more digestible form and maybe add some more tools (based on ideas I have and/or suggestions) is certainly on the table. I had to restrain myself and first see if it works as it should and if anyone is interested, before putting more time into it.

Was there anything in particular you had in mind? The basic concept of the group buttons, similar to 3ds, would presumably remain the same. Stuff that right now I know are iffy are for example things like button drawing/looks, because I was forced to use the legacy LW Panel API in the SDK, and that the window position isn't remembered (I think).



Those results are what I was expecting based on BigHache's findings earlier in this thread. The FBX exporter has to support Vertex Normal maps. Any exporter that takes vnormal maps into account should in theory work fine, as the smooth group assignments are only relevant during vnormal generation for this plugin.

(Disclaimer: I'm not familiar with what's inside the FBX format, so I don't know how and what gets exported there.)

Thanks for testing.

First idea what I have is:

- Opened plugin window all the time
- All options in one window
- Under groups numers should be smoothing value with possibility to change
- In the same panel, button to refresh/update smoothing values (if not possible to see result in real time during changing values in upper option)
- Maybe + and - to add smoothing group and delete
- Button to online help as pdf :]

Check also this:
https://www.blend4web.com/en/community/article/131/

Myagi
01-18-2018, 03:50 AM
I was actually thinking of a non-modal window while I was making it, but unfortunately I'm limited to what the SDK allows me to do. I wanted group buttons to reflect group assignments of the selected polygons, in order for that to work in a non-modal window, the plugin would need to be able to track selection changes (which AFAIK isn't possible).

I guess I could make a non-modal alternative command, that only allows assigning without showing assignments of the current selection (or a "refresh" button that updates the buttons based on the selection). Better than nothing. I'll add that to the todo list.

As for smoothing values, I'm not entirely sure what you are picturing there The smoothing settings are per-(LW)-surface, and not one global value or associated with a particular group.

MarcusM
01-18-2018, 04:08 AM
I was actually thinking of a non-modal window while I was making it, but unfortunately I'm limited to what the SDK allows me to do. I wanted group buttons to reflect group assignments of the selected polygons, in order for that to work in a non-modal window, the plugin would need to be able to track selection changes (which AFAIK isn't possible).

I guess I could make a non-modal alternative command, that only allows assigning without showing assignments of the current selection (or a "refresh" button that updates the buttons based on the selection). Better than nothing. I'll add that to the todo list.

As for smoothing values, I'm not entirely sure what you are picturing there The smoothing settings are per-(LW)-surface, and not one global value or associated with a particular group.

I can only tell what is good to work with. I am not familiar with SDK and it's limits but maybe in some areas LW developers can allow you more if you ask them... They should appreciate your effort becausa missing smoothing groups is big argument to depreciate LightWave by other software users.

And words like "LightWave is enjoyed worldwide as a complete 3D production solution for... game development..." will be not only empty words.

graviel
01-18-2018, 06:04 AM
windows only?

Myagi
01-18-2018, 06:18 AM
Yes for the beta test. If it goes into "production" I'll likely make an osx version, I've roughly prepared for it at least.

graviel
01-18-2018, 06:49 AM
cool, very much apreciated. :)

Lewis
03-07-2018, 11:37 AM
Hi Myagi,

I'm testing/using this on real project and beside non modal panel (i know it's problem to do it other way) what i miss is selecting all applied smooth groups buttons at once. Is there chance you could add that ?

I made quick mockup but there might be better place idea where to put button or just put "all" near select...

Thanks

Myagi
03-07-2018, 02:59 PM
If you don't mind I'll follow up over in the other thread (http://forums.newtek.com/showthread.php?156026-Smooth-Group-Plugin-beta).