Sign in to follow this  
paleRider

Way to change intensity of highlight-layer on mesh

Recommended Posts

Hi everybody:

I wonder whether a direct-way of change the highlight-layer intensity exist, in order to progressively fade it in and out. I can't find info in the docs.

Best regards.

P.S. Of course it could be always done following a not-so-direct-way, tweaking the color values under a harmonic (sinusoidal) basis.

Share this post


Link to post
Share on other sites

Hi pR!  Perhaps the best way... is to use the blur sizes.  http://doc.babylonjs.com/how_to/highlight_layer#blur-size

https://www.babylonjs-playground.com/#25OYWL#1

Sinusoidal and not-so-direct, eh?  heh.  Sorry. 

You can always create a highlightLayer.setBlurSize(size) { set horz/vert blur size } function... make life easier for yourself. 

Heck, you could probably get that function approved by admin... for adding to core highlightLayer.  Maybe get your "I contributed to BJS core" shoulder patch and certificate!  YAY!

It's not an "intensity", but blur-sizing works okay.  :)  There could be other methods... but they would be more complex and involve alphaBlendingModes.  HighlightLayers are a post-process and don't handle depthRenders/alpha very well.  It is not a weakness/bug... just an expected characteristic for these types of effects.  Hope this helps.

Share this post


Link to post
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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.