Home› Technical Talk

Baking Zbrush matcap materials to texture

mixeh
polycounter lvl 8
Offline / Send Message
mixeh polycounter lvl 8
Hi all,

I'm pulling my hair out trying to figure out how to bake matcap materials to my high poly model, so I can bake it into the diffuse of my low poly in max. Can anybody please help?

I used zapplink to get what I thought was the matcap in the texture, which kind of worked, but there's no way to bake zapplinks textures to the high polys auv tiles.

arghhh!!

Replies

  • wailingmonkey
    Options
    Offline / Send Message
    googled for your pleasure

    (1st link is Sebcesoir old-school, but still applicable...3rd link is newer 3.1, I think)
  • mixeh
    Options
    Offline / Send Message
    mixeh polycounter lvl 8
    Ah that just links me to googles home page :/
  • wailingmonkey
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    I used zapplink to get what I thought was the matcap in the texture, which kind of worked, but there's no way to bake zapplinks textures to the high polys auv tiles.
    Zapplink, once brought back into zbrush, should throw the results onto the polypaint. This could be converted to a texture like normal. There's also a new way in ZB4 to export the document, load the result into spotlight, and then paint it back onto the model. But I think the quickest way is the displacement/imageplane method above.
  • dtschultz
    Options
    Offline / Send Message
    dtschultz polycounter lvl 12
    Did you try this tutorial by Joseph Drust?

    http://www.pixologic.com/blog/2009/06/352/

    Although, this method has uvs already placed on the highpoly.
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    Although, this method has uvs already placed on the highpoly.
    Should still work. Import the lowpoly if it's topology is different, subdivide to a suitable number of faces, and project the detail from the highpoly onto it. Then you can bake the displacement to the UV's you need. Or you could just use an external program to do the displacement map as well, I think that's the key element to the technique.
  • mixeh
    Options
    Offline / Send Message
    mixeh polycounter lvl 8
    Thanks everyone for responding, I'm finding the problem to be the AUV tiles, it just never seems to work properly, especially when I go up in subdivisions. I ALMOST HAD IT, as in i had a texture applied to the uvs in zbrush, then when i exported it to max, they all messed up.

    I don't want to lay out proper UV's for the highpoly as that would be a nightmare, I just need something good enough for it to read in max for my low poly bake.

    When I do the displacement map trick, I don't get a nice displacement map filled with little squares, instead i get just horizontal lines running across it, like the uv's are messed up and it's being stretched.
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    I ALMOST HAD IT, as in i had a texture applied to the uvs in zbrush, then when i exported it to max, they all messed up.
    What exactly is your workflow, and are you taking into account zbrush's tendency to flip textures vertically?
  • mixeh
    Options
    Offline / Send Message
    mixeh polycounter lvl 8
    Thanks cryrid for trying to help.

    I first AUV tiles my high poly, then use zapplink, then the color > texture function. (process can be found here: [ame]http://www.youtube.com/watch?v=vWRsUkPiSK4[/ame] ) Everything works well, as in zapplink correctly bakes the material to the texture, I can change the material to say white, and the baked bronze texture remains.

    EXCEPT when i do color to texture and then everything goes crazy. Pics are of the resulting map from col > texture, and the model with the texture applied.

    zapplinkcoltotexture.jpg
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    The UVs look accurate for AUVs. I just gave it a test myself and it worked without flaw externally as long as you flip the exported texture vertically. Internally you'd want to keep the texture flipped to zbrush's liking, and with a flatcolor matcap.
    matcap_to_texture.jpg
  • mixeh
    Options
    Offline / Send Message
    mixeh polycounter lvl 8
    cryrid thanks for your help I really need to figure this out. the screenshot I posted was the model IN ZBRUSH, with the texture applied. How it doesn't work I don't know. I'm thinking my AUV tiles setting may be wrong. I might actually bother to film my process so you can see where I'm going wrong, as this is getting very frustrating.
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    I know it was in zbrush, that default gradient is recognizable a mile a way. But didn't you want to 'bake it into the diffuse of your low poly in max'? If it looks correct in Max then there would be no problem. I'm very certain it's just a matter of your texture not matching the UVs because you're not flipping it vertically. Zbrush requires this. Otherwise the texture you posted looks like the expected result for AUVs, and if it isn't flipped to match them inside zbrush then you will see a bunch of mismatched squares exactly like what you're posting. Perhaps a recorded video would be beneficial: the only way I can recreate this problem is to flip the UVs or the texture to make them mismatch.
  • mixeh
    Options
    Offline / Send Message
    mixeh polycounter lvl 8
    I'm uploading my process to youtube, it'll be done in 5 :P.

    I get worse results with zbrush 4 (which will be shown in the video). The screenshots above were done in zbrush 3.1, but I'd rather not have to switch programs like that, and just nail zbrush 4.
  • mixeh
    Options
    Offline / Send Message
    mixeh polycounter lvl 8
    Okay SURELY we can figure it out with this:

    http://www.youtube.com/watch?v=eZF4871b4UU
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    Aha, I see what you're doing now. Delete the UVs, set the UV border to a higher (try 2), and then recreate the AUVs. Do a new texture from polypaint and it should be fine.

    Explanation: The UV border acts like padding around the UV shells. If you set it to 0 it is going to cram them together in a way that it will put UV (verts?) directly on the 0 or 1 UV coordinates, which causes zbrush problems in other areas as well (blank maps in the case of multi map exporter). Set the UV border to 2, and UVs get spaced more, including around the outermost border (so instead of a UV landing on the 0 coordinate, the padding will cause it to be on the 0.1 value instead).

    You can check the UVs for errors using the new texture from UV check. UVs from 0:1 cause problems (I think it tries to split into multiple textures at this point), 0.001:0.999 is fair game.
  • mixeh
    Options
    Offline / Send Message
    mixeh polycounter lvl 8
    Okay it kept saying I had to raise the UV Map size or lower the UV map border. It worked with a uv map border of 2 and a uv map size of a wopping 8192 :/. Anyway it's looked as though it's worked, the only problem is there's no option to export the texture?

    Edit: Oh wait got it.
  • mixeh
    Options
    Offline / Send Message
    mixeh polycounter lvl 8
    Okay, so everything looks good in zbrush, which im happy about, now all thats left is getting it working in max. I've tried mirroring the UV's and flipping them vertically, to no avail. Anything else I can try?
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    Odd that the default value was 4 and not 2. But even a value of 1 should work fine (and allow for a smaller texture res). You might even get away with using a uv border of 0 if you'd export the tool, import into max, quickly scale the UV's a tad bit so nothing touches the 0 or 1 border, and the load those UVs back into zbrush before doing the col>texture.

    But yay that that part works now.


    Edit Max Problem: what does it look like in Max? Usually at that stage you can leave the UVs alone, and just flip the texture you exported from zbrush (this may depend on what your preferences>importexport settings are. It could be different from mine, as your UV border's default was)
  • mixeh
    Options
    Offline / Send Message
    mixeh polycounter lvl 8
    I find flipping the uv's inside of max isn't taking into account the negative space on the 0-1 ratio, so it's flipping them not correctly. You think this could be the problem?

    ARGHHHHHH. Give up have to go out, i'll try again later
Sign In or Register to comment.