nicktendo Posted July 6, 2017 Share Posted July 6, 2017 Are there any examples of how to apply a texture to an individual vertex as is described in this tutorial: http://babylonjsguide.github.io/advanced/Facets Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 6, 2017 Share Posted July 6, 2017 Ping @jerome Quote Link to comment Share on other sites More sharing options...
jerome Posted July 6, 2017 Share Posted July 6, 2017 Aaarf this is not my guide, but JohnK's one Quote Link to comment Share on other sites More sharing options...
nicktendo Posted July 6, 2017 Author Share Posted July 6, 2017 @JohnK Any ideas? Quote Link to comment Share on other sites More sharing options...
JohnK Posted July 6, 2017 Share Posted July 6, 2017 Check this part of the guide http://babylonjsguide.github.io/advanced/Custom#color Just checked out the PG which I am sure did a graduation of colors. It was what I used to get the pictures in your first link. On mobile currently. You could try 4 values for the colors instead of 3, ie red, green, blue and alpha. A pattern of 4 in the example does do the vertices as red. Will test and edit tomorrow. nicktendo 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted July 7, 2017 Share Posted July 7, 2017 Really shouldn't try to answer questions on my mobile when I'm in the middle of something else. I was already using color4 but forgot that the color explanation was part of a full description of of creating a custom mesh and lighting and normals and so there are two triangles present one you cannot see face on and remains black when you rotate camera because of light direction. Also the instruction was " In the playground below see what happens when you make the vertices on the red facet different colors. " So I had made the triangle red and left it to the reader to alter. Have added PGs now where both triangles are lit but still can only be seen when looked at in direction of lights and one with graduated color. Also re-reading your question it is about textures not color. see http://babylonjsguide.github.io/advanced/Custom#texture and http://www.babylonjs-playground.com/#VKBJN#14 I expect you read on and already found it. GameMonetize, nicktendo and jerome 3 Quote Link to comment Share on other sites More sharing options...
jerome Posted July 7, 2017 Share Posted July 7, 2017 excellent PG tutorial 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.