NME outline shader

Thank you for taking time to answer this issue and adding to the docs! :sunglasses:

However, I would like to elaborate a bit more about the “real use case” I have and which has left me, a shader noob, a bit baffled.

I am building a game where I’ve had a question; what would the game and the assets look if I had some sort of toon shading on them? Would it look cool? Time to investigate; soon I found the toon shader tutorial in Babylon Youtube channel, which used the NME and I thought that it would be a nice learning exercise for me. After finishing creating the shader in NME, I was eager to attach it to my 3d models… But exactly how would I do that? For example, I have this character in the game: https://playground.babylonjs.com/#S7E00P#49

How would I approach in giving the character, which consists of many different meshes, a shader? Trying to put the hypnosis shader to it somehow breaks the animations :smiley:

Also if I try the toon shader in similar way, it doesn’t work out of the box. Maybe there are some stuff that I have missed shader-wise… I had a thread about this a while ago: Applying node material editor shader to glb models

In the thread I used the wall/floor meshes of the game as test meshes, but if I try the same process with the real character, it doesn’t work at all: https://playground.babylonjs.com/#S7E00P#168 Ps. Sorry for the missing clothing :sweat_smile:

Anyways, after trying a while with the toon shader, I gave up and decided to look into it later :smiley: So that is my rocky road with NME… I think other users might have these problems as well, if they are newbies like me, or try to add shaders to complex models…

So all in all, these are my “pressure points” and questions with NME and applying shader to a mesh:

  • In general, applying a shader to a complex model seems really complicated
  • If the model has a PBRMaterial, can you “just replace” it with a NodeMaterial? If the model has, for example, normal data/texture, does it break?
  • Also a minor note, would it be possible to store the json in a regular javascript/typescript object and ask it from there instead of loading it async from server? I would prefer this to be ready without async waiting in my game, for example… Maybe it can be already done, but I haven’t found the right part in docs.

Thanks for reading :heart:

1 Like