Brijesh Posted August 25, 2017 Share Posted August 25, 2017 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 ?? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 25, 2017 Share Posted August 25, 2017 Unfortunately no as the shader is not done like that BUT: what about having two objects? in this case you can have a specific HL for each with the colors you want Brijesh 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 27, 2017 Share Posted August 27, 2017 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. 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. Brijesh 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 28, 2017 Share Posted August 28, 2017 sure..if we need more than 2 colors, my solution will start to be expensive Really like your PG btw Let's Brijesh comments on what he really needs here Quote Link to comment Share on other sites More sharing options...
Brijesh Posted August 31, 2017 Author Share Posted August 31, 2017 Thanks @Deltakosh and @Wingnut. I will working on try both solution given by both of you. Thanks for helping me every time Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.