Hello,
I’m trying to draw the outline of a selected mesh.
As shown in the image below captured in Blender, I want to draw the border of the mesh as is, even if it is obscured by the mesh in front.
I tried two things: https://playground.babylonjs.com/#KRYSHR#1
(1) Using the renderOutline property: Outlines hidden by other meshes are not drawn.
(2) Using HighlightLayer: Outlines surrounding the visible part are drawn, excluding the hidden part.(Comment out line 21 and uncomment line 24)
Is there anyone who can help me?
HiGreg
November 8, 2024, 2:37am
2
If you’re ok with all edges showing, you can clone the box, then on the clone make alpha zero, turn on edges, and set renderingGroupId to 1.
Edit: or a similar technique with the highlight layer:
Edit2: renderOutline obeys the material alpha. It’s not immediately obvious to me how to get a transparent box with an opaque outline.
1 Like
HiGreg
November 8, 2024, 3:06am
3
here’s a good thread with more iptions:
[Newbie]
Newbie
0
Posted 2 minutes ago
Hi everybody, so i’m trying to create an online game using Babylon.js but have run into a problem thats got me a little stumped so hoping someone here would be willing to help me out. Please bear with me on this one, i’m a complete newbie with babylon as i’ve only every worked with THREE.js. Right now my game consists of a scene compromising of multiple meshes with multiple users represented as avatars (created from basic circle geometry for t…
@HiGreg
Thank you
Your answer is very helpful. I was able to achieve the solution using target mesh cloning, renderingGroupId and visibility attribute.
This forum is really awesome!
3 Likes