Home Marmoset

Does TB have problems displaying black vertex colors?

polycounter
Offline / Send Message
Justo polycounter
So according to this thread Joe said to use FBX when using vertex colors, but I'm running into some issues when trying to display stuff (in TB2). Does TB have issues when displaying black or other colors that I'm not aware of? If I paint a portion of a mesh black, in TB it'll darken the whole mesh. Why is this? 



EDIT: It's not just black; I can't understand why white wouldn't display the mesh in a lighter tone either...

Replies

  • EarthQuake
    Vertex colors multiply (darken) the albedo value. If you want to set the color explicitly with the vertex color values, you should have a white albedo.

    A while will result in no change or darkening of the material. The math works like this:  
    0.5 (albedo value) * 1 (vertex value) = 0.5 (no change)
    0.5 * 0.5 = 0.25
    0.5 * 0 = 0
  • Justo
    Offline / Send Message
    Justo polycounter
    @EarthQuake Thank you for replying; I did not know the math that was behind that. However, shouldn't that be applying only to the vertices being painted? 

    As you can see from my Maya screenshot, painting one small portion of the mesh black (value 0 I assume) automatically tints everything that doesn't have a defined vertex color (like the red and white areas). Shouldn't vertex values, be it 1s or 0s, be limited to the area those values were set to when initially painted? 
  • EarthQuake
    Justo said:
    @EarthQuake Thank you for replying; I did not know the math that was behind that. However, shouldn't that be applying only to the vertices being painted? 

    As you can see from my Maya screenshot, painting one small portion of the mesh black (value 0 I assume) automatically tints everything that doesn't have a defined vertex color (like the red and white areas). Shouldn't vertex values, be it 1s or 0s, be limited to the area those values were set to when initially painted? 
    From the screenshot it looks like the default vertex value is 0.5 or so, so if you don't want any color change, make sure its 1/white.
  • Justo
    Offline / Send Message
    Justo polycounter
    @EarthQuake Sorry Joe, but I don't see how that answers anything. Maybe I didn't explain myself well enough. 



    1-When I create a polygon primitive in a 3d app like Max/Maya, I assume the RGB value each vertex can contain is empty by default. 
    2-That's why when I load something like the LeftSphere in TB2 and set it to Vertex Color, no visible change happens, because the mesh has no vertex colors.
    3-When I flood everything with white, and then paint/replace on top with another color, I get the RightSphere result, because just like you explained with that behind-the-scenes math, the white is keeping the rest of the colors intact. 
    4-The MiddleSphere is what I don't understand. If I paint on an empty-vertColor sphere a small portion, in TB it'll tint everything else with black.  

    Why is this? Shouldn't only the altered vertices change? Does TB run a check first to see if there are vertColors in the mesh, and if not it'll skip the calculations and leave it like LeftSphere, but if it does detect stuff it'll assign empty vertColors to 0, thus tinting everything that wasn't painted like MiddleSphere? 
  • EarthQuake
    Toolbag loads the vertex data from the file and doesn't alter it in any way, so the result that you're seeing is because your 3D app has saved the data in that way. Unless there is some sort of bug, but it seems unlikely because when you implicitly set the all the colors it seems to be working as expected.

    When you're saving vertex color data, there is no "empty", if one vertex has color data, all verts must have color data. So, for the verts that you haven't implicitly painted on, those get whatever default color your 3D app assigns to them. So, if you want to make sure that only the areas that you specifically paint are affecting the end result, make sure to flood fill all the verts white before you start painting.
  • Justo
    Offline / Send Message
    Justo polycounter
    I see, that makes sense :) Thank you Joe. 
Sign In or Register to comment.