Hi! How to make black borders in meshes like in this game

here link DiStraction

here link PG


Thank you bro

It’s somehow not beautiful :sleepy: :kissing:

Gee, you Guys are having a slick conversation :grin: Not sure I can follow the vibes :crazy_face:
Let me try: :sweat_smile: :joy:

"Here, check: Toon shader from NME. You can likely use as a base. For more info: @Lun "

It’s just two objects! Each object will have to make a black copy . this is not a solution

If so, may be you could explain us the technical meaning of ‘somehow not beautiful:thinking:
I’m not sure how to relate this to a method or even visual aspect.

try playing with the outlineWidth

ground.renderOutline =true;
    ground.outlineColor = new BABYLON.Color3(0,1,0);
    ground.outlineWidth = .005

I think it is the solution.
Furthermore you may want to try and fiddle with these settings:

1 Like

ugly because the edges are open there

Ok, I think I got you now. You mean when the mesh has sharp edges, the outline does not follow the vertices (and makes a cut on the edges), yes?
This is a known issue with the outline that has been discussed here (among others)

You can quite easily solve it if you have a volume (like i.e. a cube), but the fix doesn’t work on a plane.

May be lower in the thread or in another/newer thread somebody has a solution for it.
Basically, the bug occurs when you don’t have soft edges.
I hope this helps and answers your question.
Meanwhile, have a great day :sunglasses:

thank you very much for your advice. I appreciate it. But I think this is somehow solved with the help of post processes. for all objects. Now I’m studying shaders, if I solve the problem, I’ll let you know here

1 Like

look for all active Meshes in the scene ( i think )
or just scene.meshes[i]
it’s an array