Jump to content

Apply different texture or color between to point of tube


Recommended Posts

I create a tube mesh using many vector array.

Now i want to apply different color or texture to tube such as 

Example : If there are 10point that make a tube than from point 1 to point 3 red color, point 3 to point 7 green color and from 7 to 10 blue color so at last i got a tube with three color.

plzz help me..!!

Link to comment
Share on other sites

Hi B!


That is ONE way.  Maybe not best way.  Three tubes with different materials... all parented to same "gizmo"... so it LOOKS like they are single mesh.

Positioning is very important, of course.  You might not want to use .clone() in YOUR project (for tube2 and tube 3).  *shrug*

Could this method work okay for you?  I hope so.  Others may comment with better ideas.  Be well, party on.

Link to comment
Share on other sites

I am update the tube mesh as data come from server, when i get new vector array from server i update the mesh.

So if some point is out of some range than display some different color for connecting such a point.

If vector value for x around 2 and in some time if i got x value around 5 for some points than i want to draw RED color tube mesh for such a connecting point.

Link to comment
Share on other sites

Hi again B.  I still think my method would be the best.  Just create another Tube segment... from previous ending place, to new point... EACH TIME a new point arrives.  Make that new tube-section any color you wish.  No multiMaterial or subMesh work at all.  Can you tell me why this would not work?  (thx)

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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...