Announcement

Collapse
No announcement yet.

Vertex Color VS UV channel to store vertices data

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Vertex Color VS UV channel to store vertices data

    Hi all,
    I have a question for you about a material I'm workin on.
    I must store in my meshes a couple of float values for each vertex and use them in the material to drive some stuff.
    At the moment I have 2 ideas, both needs a DCC software workaround before importing into UE4:

    1- Use vertex color (for example R and G channel) to store this values and in UE use a VertexColor node in the material to retrieve them
    2- Add a new UV channel and place vertices in specific position of the UV space, then access the values with a TextCoord node.

    My question is: are both method comparable in terms of performance/memory usage or is one better than the other?
    Almost every, big mesh of the level should use this feature.

    At a first glance I'm oriented to the vertex color solution, but I'm not so sure

    Thanks a lot in advance

    Daniele

    #2
    you should use VertexColors then, since they do not add any cost ontop of your performance (They are part of the existing Vertex Data). Using another UVChannel would mean adding a new DrawCall to your rendering. Which reduces performance.

    Comment


      #3
      Originally posted by Raildex_ View Post
      you should use VertexColors then, since they do not add any cost ontop of your performance (They are part of the existing Vertex Data). Using another UVChannel would mean adding a new DrawCall to your rendering. Which reduces performance.
      Yes, I suppose you're right: an extra draw all is surely more expansive
      But does the added channel cost 1 draw call even if I don't use it for a texture? (but just read it for other purpose).
      And what about additional channels not used at all in a material?

      Sorry for my question shooting

      Thanks!
      Last edited by berna; 07-04-2018, 08:41 AM.

      Comment

      Working...
      X