Home Technical Talk

[3DS Max] Turning Materials into Vertex Colour

polycounter lvl 5
Offline / Send Message
Pinned
Dan Powell polycounter lvl 5
Hi Polycount,

I prefer using XNormal to bake my textures, and require a Colour ID texture. Therefore, I'm baking one from my high poly object.

Inside of 3DS Max 2016, I have assigned various materials to different parts of the high poly object, acting as the Colour IDs. The screenshot below shows my high poly object with the various Material colours assigned to it.



From there, I go to the Display Panel, and turn on Vertex colours. Everything is white, as expected, because nothing currently has any vertex colours applied to it.



I now use the "Assign Vertex Colours" Utility, which is supposed to take the colour of your materials on the objects, and apply them to your object's vertices as vertex colours. I have set the Light Model to "diffuse only" because I want flat colour in a colour ID map - no lighting information is required. The other settings are default.



Now, I click "Assign to Selected". Which produces the following:



You can see that a lot of the materials have been converted to vertex colours - however,large areas of my object are still purely white. Furthermore, the vertex colours on the object are somewhat different to the colours of the materials . Why are some of my objects still white after assigning vertex colour, and why are the colours so different?

Cheers. :)

Replies

  • kary
    Options
    Offline / Send Message
    kary polycounter lvl 18
    Any better if you use assign by Vertex instead of Face?
  • Dan Powell
    Options
    Offline / Send Message
    Dan Powell polycounter lvl 5
    kary said:
    Any better if you use assign by Vertex instead of Face?
    Hey Kary,

    Nope - in fact the result is considerably worse, and appears with artefacts, etc.

    I have noticed that using higher saturated colours produces a better result, but the colours themselves are still different values.
  • marks
    Options
    Offline / Send Message
    marks greentooth
    If you're just trying to make a colorID texture, you can bake a "diffuseMap" in max and it will use the object colour as the colour of the render. eg you wouldn't have to move the object colour into vertex colour, it should just work.
  • Dan Powell
    Options
    Offline / Send Message
    Dan Powell polycounter lvl 5
    marks said:
    If you're just trying to make a colorID texture, you can bake a "diffuseMap" in max and it will use the object colour as the colour of the render. eg you wouldn't have to move the object colour into vertex colour, it should just work.
    Hey Marks, :)
     
    Yeah - I'm aware you can bake them inside of 3DS Max. :) I was exploring the process of using XNormal to create the ColorID instead of 3DS Max.

    I have baked a ColorID with Max to work with, though I am interested in comparing the results of XNormal and Max 
  • rodpv
    Options
    Offline / Send Message
    rodpv polycounter lvl 10
  • rodpv
    Options
    Offline / Send Message
    rodpv polycounter lvl 10
    This happened to me a few days ago, I was under tight deadline so I simply finished the IDs in Photoshop.
    I usually polypaint ID in Zbrush as it's quicker.

    Try this: instead of using edit poly, convert it to edit mesh. See if this takes care of the bug.

    As a second option try to separate each element (corresponding to each ID) into a separate object. You can use this script to do that: http://www.scriptspot.com/3ds-max/scripts/detach-by-material-id   or if you didn't setup IDs in Max simply this: http://www.scriptspot.com/3ds-max/scripts/detachelements

    A slight difference in color it's normal but it shouldn't be so drastic.
  • Dan Powell
    Options
    Offline / Send Message
    Dan Powell polycounter lvl 5
    Hey RODPV, :)

    Cheers for the post - will give it a go when I have a moment.

    Essentially, I did the same; just used a different method to get the IDs done whilst faffing around with this bug. Aforementioned above, I just baked the Materials to Diffuse colour, instead of Vertex Paint projecting and exporting to XNormal.


  • monster
    Options
    Offline / Send Message
    monster polycounter
    https://gist.github.com/monsterblues/5cc668001a7cf16ec500

    I've got this function laying around. It's part of a much larger tool set. Let me know if it doesn't work for you. It's complex because you have to detach by Material ID, and then hunt through multi sub object materials.

    To use the objects should be edit polys or meshes. Then go to MaxScript | Run Script and pick the file.
  • Dan Powell
    Options
    Offline / Send Message
    Dan Powell polycounter lvl 5
    Cheers Monster, will give it a look at. :)
  • akaChris
    Options
    Offline / Send Message
    akaChris polycounter lvl 6
    I`m also using the assign vertex color method in 3dsmax and had the same issues initially. It`s been a while so I don't remember how exactly I arrived at this solution but this is what I use now to get it working: place a skylight, set the sky color to pure white. use assign vertex colors with default settings (Lighting+Diffuse). for me that solves the issues of incorrectly translated colors and matches one to one to the input color of the material
Sign In or Register to comment.