Jump to content

HighlightLayer lets all meshes glow (BABYLON 3.2.0 + 3.3.0-alpha)


hollow
 Share

Recommended Posts

Hello together,

in PG https://www.babylonjs-playground.com/#1KUJ0A#104 you can see an default scene with an additional sphere outside the view (sphere_boycott) with renderingGroupId=1.

Until now all looks good.

If you focus the rendering window/side and press 'cursor key down' to get an larger distance with the actual camera position - or rotate the view to the right side - the added sphere will be shown and the tittled glow-effect fills up the whole sphere.

I think, this is not the expected behavior?! Are more information needed?

 

regards and thank you all for the great work and help

 

edit 3 -- (start additional information)

there is anonther (for me) unexpected behavior:

in PG http://www.babylonjs-playground.com/indexstable#B73AIM (opacity on HighlightLayer) are 2 more cases, where the HL not correct works:

The 1st 2 spheres are from an material example.

there, the 2nd (middle) and over that the 3rd (right) added from me (example 1) has an opacityTexture (tree) over the grass diffuseTexture - both don't show the HL

the 4th sphere (front) is added like the sides of the cube with dog-puzzle-piece, the tree.png with hasAlpha=true and looks beautiful, like expected.

-- (end additional information)

Edit (link string to link)
Edit2 (2nd try)
Edit3 (additional information about 8hrs after post)

... thanks for reading

Link to comment
Share on other sites

Hello,

About the second playground it is all expected as the Highlight Layer does not support transparency: https://doc.babylonjs.com/how_to/highlight_layer#default-use-case

About the first example I would say it is almost expected ? What happens is as you are using a separate rendering group you are erasing the required info for the highlight to work (this requires the stencil buffer) so you could prevent this like here:

https://www.babylonjs-playground.com/#1KUJ0A#105

Or rely on separate cameras to achieve the same effect easily: https://doc.babylonjs.com/how_to/highlight_layer#multi-camera

The fact that it does not directly happen is the result of amazing optimization in the engine where out of focus meshes are not rendered making harder to understand.

Link to comment
Share on other sites

Hello and thanks for your reply, but I'm still stuck on this.

here https://doc.babylonjs.com/resources/transparency_and_how_meshes_are_rendered under 'Opaque or Transparent?' are 4 cases described:

Depth pre-pass meshes - I think that's here not relevant, right?
Opaque Meshes - will be the 'left' sphere from my first PG?
Alpha Tested Meshes - seems has the possibility to be highlighted (it could be the 'front' sphere) , right?

but only 'Alpha Blended Meshes' are not possible to highlight?

And would it right to say, all what is visible for the depthRenderer is highlightable?

a little bit offTopic:
in this doc is the screenshot of an greyscaled depthRenderer picture, and the link to the PG here: https://www.babylonjs-playground.com/#1PHYB0#6 there the view is broken by pressing F9 in 3.3.0-alpha and an error (fireProcMaterial) for 3.2.0 (stable) is thrown
(i will understand how the greyscale image is produced, I'm only able to create an BW-texture on a plane without Shaders)

thanks in advance

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...