Jump to content

Apply Texture to Vertex


nicktendo
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

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