Sign in to follow this  
Brijesh

Apply highlight layer to custom mesh

Recommended Posts

Hi..

I created custom mesh using some points, and apply two different color to vertex, Now i want to apply some signing effect to that mesh.

I use highlight layer functionality, i can able to apply one color to highlight layer of custom mesh.

But I want to apply highlight layer in such a way that, if the vertex color is red than highlight layer color also set red and after some vertex if color change to green than highlight layer color also set green.

In short highlight layer color apply as per color of vertex of custom mesh.Is it possible ?? 

Share this post


Link to post
Share on other sites

Hi DK and Brijesh.  DK, I don't think that will work... if mesh has many colors-per-verts (colorKind). 

I was thinkin'... "What the heck is Brijesh doing-with a highlighter for a custom mesh?"

Then I said "Wingnut, it's none of your concern."  :)

But, WHAT IF... Brijesh is using the highlightLayer... for showing a user that a mesh is "selected" or "chosen" or "targeted"?

Then I asked myself... "What kind of systems do we have that COULD indicate "selected"... yet STILL honor a many-colorKind custom mesh?"

Aha... the particles-per-vertices demo, which some cool user coded for us, shoots particles from verts... using colorKind data for its particle colors!

So, I made me a little demo, using colored particles to indicate that a custom mesh has been selected or targeted.

https://www.babylonjs-playground.com/#2A4NUR#29

It looks totally goofy, and I think I should bail on this idea.  :D  I'm not sure that there is a future for indicating "selected"... using particles spraying from verts.  Perhaps timer-toggling .showBoundingBox or toggling edgesRenderer... are better ways to indicate that a mesh is selected.

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.