Jump to content

How to make a blur effect on polygon's edges ?


elkyu
 Share

Recommended Posts

Hi,

 

I have something like that (simplified version for the playground) :

 


 

But when we move the mouse over the hole, the user don't necessarily know that he can click on the hole. So what I would like is an effect to know that we can click on.

 

At the beggining, I thought to make a little zoom on the image which is behind the hole but i'm not convinced by this effect.

(http://www.babylonjs-playground.com/#272WDW#24 - But, nice work iiceman  ^_^ )

 

What I thought, would be that at mouseover, display a border all around the edge of the hole (inner side) with a little blur effect.

I don't find an exemple to illustrate what I say, I hope that what I say is understandable.

 

I know it's possible to enable the edges of a polygon (but i don't know how), so i think we can use that, but I don't find anything like this on the forum or the documentation

 

Thanks !

Link to comment
Share on other sites

Hi varomix,

 

Alpha map ? You mean a duplicate of my ground mesh which I place just behind my current ground mesh ?

I already think to that solution, reduce the size of the duplicate mesh and change its alpha value should work but I'm afraid with the two ground mesh,with all these polygons the animation becomes too weighty and start to lag, especially on mobile devices ...

Link to comment
Share on other sites

I think I can't use that.

I should have to be more precise about what I want to do.

The playground I make is just an example, in fact, I have several holes, number of hole can change, their position, their size and their form too. So I can't draw a precise texture like you do.

 

What I thought to do is to get back all the faces which are around the hole (I know how to do that). And for all that faces around the holes, find their side in contact with the faces which compose the hole, to finally enable a edge (border) on this side (inner side to the hole)

 

With code, this shouldn't be the easier part to realize, but I still think that it is the best solution so that I can adapt this effect on any hole

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...