Home Technical Talk

Zbrush Zmapper.. POS? Get Normals into Max?

polycounter lvl 18
Offline / Send Message
oXYnary polycounter lvl 18
Unless Im totally mistaken having spent the last hour messing in zmapper (and looking briefly in the zbrush forums).

A: You can't use your highest res as the projection. Which kinda defeats the point.

B: You can't create or modify a projection "cage" especially when dealing with models with different topologies. What makes this worse is simply trying to scale or push the lower topology model in zbrush doesnt work exactly. Not only are you "going by ear" with the scale and cage changes you need to make; unless I have been doing something wrong, zbrush resets the center point of any imported model (p seems to only "center" on the current selections center). So scaling a offset model will not scale in the same "center" as the high res.

Sooo..
In max what are your guys method to get it in? High res displacement and bump maps maps for each section and importing in as a cage? Then render to texture?

I though I might be able to get away with using the base cage mesh in zbrush and still use zmapper to capture the high res normal detail since they share the same topology. Export it, then burn that normal map in the diffuse channel of the in game version.

Replies

  • Joao Sapiro
    Offline / Send Message
    Joao Sapiro sublime tool
    i pick the highpoly , low poly , match them , and use cage projection with some manual edition of the verts . Worked fine so far ehehh...
  • Mongrelman
    Offline / Send Message
    Mongrelman polycounter lvl 18
    Or, export a mid range version of your high poly mesh into max and line your low res up with it. In Zmapper, go to the projection tab and store the model, it WILL use your highest subd level of the model you store. Then exit zmapper and import your low res, go back to Zmapper and back to the prjection tab. You can inrease the ray distance and change some other stuff, then generate the normal map.
  • oXYnary
    Offline / Send Message
    oXYnary polycounter lvl 18
    The problem is you cant see the ray distance effect until after you render (unless I missed a checkbox to show?). Unlike a cage in max. Zbrush or at least zmapper also imports models in a default generic size, so you cant create a cage in max, and expect it to line up unless you scale it inside zbrush in which case you get the pivot point error (zbrush seems to match the pivot point to the center of the object versus what the pivot point was set as when exported as a obj). So then if you do scale the cage you created in max in zbrush to be larger to eoncompass the projection, they aren't guaranteed to line up.

    Projection master again wont allow you to store your highest res, in fact its giving me a notice when I get above so many polyies (dont have program on this laptop.. something like 75 k it's giving me a warning?).

    If you know a work around for this pivot point problem and the scaling defaults of zbrush, then I could do what you say (in fact already have as I used a medium res to help topology in low res). Otherwise they wont line up.
  • James Edwards
    Offline / Send Message
    James Edwards polycounter lvl 18
    Working with XSI-ZB I would export the low rez base mesh from ZB, bring that into XSI, do a UV transfer from the XSI mesh to the imported ZB mesh, then send that back to ZB by reimporting it over the base mesh of the Ztool/sculpt. This effectively replaces your base resolution with an identical version that contains the UVs you need to obtain a normal map. No need to use projection baking at that point. Just generate a normal map using the sculpted mesh, which now has UV data to work with.

    I don't alter the transform properties of the ZB mesh while it is in XSI at all so it pretty much goes out the way it came in. I used this method specifically to get around the issue of incompatible vertex orders and/or sculpt meshes with no UVs in order to be able to create a normal map within ZB.

    This should be possible to do in max, assuming you can do UV transfers to/from meshes with different topologies.
  • FAT_CAP
    Offline / Send Message
    FAT_CAP polycounter lvl 18
    Chapter 3 in the ZMAPPER manual deals with scaling/ translation problems inside ZMAPPER, using two difeent objects with different topology. Its a pretty easy workaround to impliment but not something you would think of, off the top of your head.

    The centre of an object should be at the world origin not the object centre when importing into ZBRUSH also.

    About the cage issue - you dont use a cage as a projection object inside ZMAPPER as you would by default in MAX or other programs, you use Ray Distance. There is a configuration file for ZMAPPER for MAX 8 setting and this automatically sets the rays to fire much further than they do by default.
  • oXYnary
    Offline / Send Message
    oXYnary polycounter lvl 18
    Gwot, if there is I havent heard (anyone know of a uv topology transfer tool in max???!!!) . That would seem to be a great way! God, I wish XSI was more standard.

    Any idea though if I figure a way to do this to
    A:Have zmapper use the highest res.
    B:Stop complaining beyond a certain poly count (Im at 6 mill at highest). I cant subdivide again to use my current highest.

    [ QUOTE ]
    The centre of an object should be at the world origin

    [/ QUOTE ]

    I browsed that chapter originally fat, but since my pivots wouldnt match, I didnt know how I could apply it correctly.

    Hmm, well I assume its too late at this point to change that? The pivot is in a offset area thats neither the center point of the object nor the world center.

    I think max uses cages AND ray casting options together in max. There is a option to change the ray distance via a slider in zbrush, but you have no visual representation on the screen to match with. So you guess. But again, its still missing a cage function to use in conjunction. Who here hasnt had to tweak a cage to work around weird complex geometry beyond just pushing at some point?
  • James Edwards
    Offline / Send Message
    James Edwards polycounter lvl 18
    oXY: Hmmm, I could have sworn I've heard people discussing UV transfers in Max in #md - either through plugins or with later/current versions of Max. I haven't used it in a few versions myself though so sorry if I'm wrong there.

    As far as using the high rez mesh, this is exactly why I outlined the XSI->ZB method. Essentially you are transfering the UVs from the animation cage to the sculpt and using only the sculpt to create a normal map. I wasn't even sure if I could do that originally, but when doing projections in Zmapper didn't work for me (ZB would crash) I tried it as a last resort.
  • oXYnary
    Offline / Send Message
    oXYnary polycounter lvl 18
    Hmm Gwot, can you explain them what you mean by "Just generate a normal map using the sculpted mesh, which now has UV data to work with."

    I guess part of the problem is im only familiar with Zmapper with the method I have been trying thus far (two different meshes). When you go into zmapper with the lowest res model, it will automatically take the highest res to create the projection based around the polymeshes highest?
  • Mongrelman
    Offline / Send Message
    Mongrelman polycounter lvl 18
    Aye. Basically what I do is:

    Export mid level mesh to XSI and build low poly around it
    Export low poly
    In Zbrush I load the high poly tool, drop down a few levels then go into zmapper
    Go to projection tab and capture the mesh
    Exit zmapper and import the low poly mesh, then draw it on the canvas (not actually sure if you need to do that)
    Load zmapper then fiddle with settigns and generate the map
  • oXYnary
    Offline / Send Message
    oXYnary polycounter lvl 18
    Export mid level mesh to XSI and build low poly around it

    Check

    Export low poly

    Check

    In Zbrush I load the high poly tool, drop down a few levels then go into zmapper

    Check

    Go to projection tab and capture the mesh

    Check (notice your not capturing the highest detail though - what if your skin texture is at the highest?)

    Exit zmapper and import the low poly mesh, then draw it on the canvas (not actually sure if you need to do that)

    Check (dont even need to put it on the canvas, just select it)

    Load zmapper then fiddle with settigns and generate the map

    Error. (The setting you can fiddle with are too primitive. Epecially if your topologies start to greatly differentiate. Something the ability to cage would overcome as you could push pull vertex points versus only ray casting as a whole).

    If I could figure out gwots method for max, that would seem to provide the best system. A: Your using the base mesh of the subd model which means less cases of the topology differing too far. B: From what I understand of Gwots comment, zmapper will use the highest model resolution if its the same model.
  • Mongrelman
    Offline / Send Message
    Mongrelman polycounter lvl 18
    Zmapper will use the highest subd level of the mesh you caputure. I've taken a mesh over 2 million polys, dropped down to under 500k and captured it. Then when baking normals, the highest level of that mesh is used.

    Tried giving xnormal a shot? Should be able to import yourhighest zbrush mesh into that and use cages.
  • solar
    Offline / Send Message
    solar polycounter lvl 18
    I was also fairly sure zbrush uses the highest res version to bake the normals when using zmapper.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    I've baked normals in ZMapper from Max using completely different topologies - and it always used the highest res version of the ZBrush mesh when baking.

    Basically I just get my highest-res mesh ready in ZBrush, make sure the Max lowpoly version lines up with it in terms of general proportions (like someone said earlier, to check this you can just export a mid-level mesh from ZB and bring it into Max to tweak the new lowpoly mesh to match).

    Then I just export my lowpoly mesh from Max (I don't understand why you keep referring to "different topology" since it doesn't matter about topology between the low and high meshes, as long as the silhouette and forms are roughly the same), bring that into ZMapper after capturing the zbrush mesh, and then load some settings (i tend to use the default max8-style normals settings) and tell it to render... I've had very good results this way, with completely different topologies on the zbrush and max meshes.

    Also, I would never try to use the base mesh of the subd model as the lowpoly ... maybe use it as a base, but usually it needs editing a lot (I usually triangulate as I go too, if it's very low-res), to match it up to the general forms and volumes of the final sculpted mesh, while retaining maximum mesh optimisation.

    xNormal also works very well with ZBrush and Max meshes, I've done this quite a lot and had great results (see the head model on my site).

    From the sounds of things, it seems that your lowpoly mesh is differing in SHAPE (not topology, topology doesn't really matter) from your highpoly mesh, resulting in poor normal baking.
    As long as your lowpoly matches up with your highpoly fairly closely, I don't see why you need any more options than ZMapper gives.
  • James Edwards
    Offline / Send Message
    James Edwards polycounter lvl 18
    oXY: I don't use a second mesh in Zbrush. As a quck experiment, try just importing a mesh you've already UV mapped, then sculpt it and generate a normal map for it.

    mapper uses 2 methods for normal mapping. One for capturing the high rez sculpt and projecting that onto another low resolution mesh (this is the one that does not work for me). The second method only requires one mesh, so long as that mesh has UV data Zmapper will generate a normal map for that UV set based on the highest resolution. This is the easier, crash free way (for me).

    The reason I used it was because my original sculpt mesh had no UV data, but I had made significant topology alterations and UVs on an exported version outside of Zbrush.

    I couldn't use this version in Zbrush but I still needed the UV data so I exported the lowest resolution from Zbrush and brought that into XSI. Did a UV transfer using Gator between the two meshes, then exported the Zb mesh back out.

    Since it has the same vertex order as the ZB sculpt it came from I just loaded up the original high rez sculpt, switched to the base level and imported the newly UV'd version over top of that. This replaces the base mesh with an identical, UV'd version, retaining all my sculpt work at the higher levels and allowing me to generate a normal map now that I have UVs.

    Don't know if that really explains it any better, but I did manage to get a normal map that matches the animation cage I have in XSI... which is all that matters I suppose. =]
  • oXYnary
    Offline / Send Message
    oXYnary polycounter lvl 18
    I knew what you meant Gwot. Thats why Im jealous. Your method sounds like the best way. Unfortunately it looks like Max has no tool like that at all.


    [ QUOTE ]
    From the sounds of things, it seems that your lowpoly mesh is differing in SHAPE (not topology, topology doesn't really matter) from your highpoly mesh, resulting in poor normal baking.

    [/ QUOTE ]

    Thats exactly what Im saying. In order to get polycounts down enough, I really had to get liberal. So where some areas swooped in or out, the low poly is only mimicking (again realize I DID use a mid level zbrush export to help. I snapped vertices all over). Hell, I had enough problems with just doing the eye since the shapes were different. (Finally just exported it into max since I could make a cage).. So when I do burn, Im going to have to make a normal map in a variety of parts (this is a complete figure with clothing, so it has undercuts and cyndrical shapes). And might even had to render out more than one normal map of the same sub-object that show different areas and mask/feather them over one another in ps.

    OK I think I see where my confusion came in. I had the highest res of the zbrush model selected and that dialog popped up saying I had to have a lower selected. Then that dialog about a warning with my polys where over a certain limit. I assumed it was implying it would only be capturing detail from that current level, instead it was trying to make the real time preview faster.

    I have no idea what you are referencing with xnormal? is that like a linked model to a high res version? Realize this is a 6 million poly figure, so will even xnormal be able to handle this ?
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Umm, can we see your low-res game mesh, and your highest-res ZBrush mesh?

    I can't think of many situations where it'd be advantageous to bake the UV layout of the game-res mesh into the ZBrush low-res mesh.

    If your game-res mesh isn't matching up well enough to bake normals accurately, it sounds like it needs more work. You shouldn't have to use an interim step like this (although I can appreciate that for some situations, like Gwot's, it might be beneficial).

    I don't see why you can't just use the game-res mesh to bake onto. If it's a good mesh with good UV's, it should be fine.
    If you're really having problem areas, split them off and bake them separately then merge back the normals in Photoshop. Ideally for normal-map baking you should split off areas of the mesh that are drastically different or overlapping anyway.
  • James Edwards
    Offline / Send Message
    James Edwards polycounter lvl 18
    I should point out that I don't use this method consistently... it was more of an experiment that turned out well. It was a good test case for XSI's GATOR as well as ZB's ability to reimport UV data onto an existing ztool without mangling it. I just thought it might prove useful as an option if all else failed for you oXY. I was more surprised that it worked at all than anything. =D

    I'm going to give Xnormal a run this weekend myself. For a free tool I'm really impressed with all the features it boasts.
  • Mongrelman
    Offline / Send Message
    Mongrelman polycounter lvl 18
    Hmm, since xNormal can transfer texture between models (I think), you should be able to export your current mesh with texture, then your mesh with new uv map and transfer them.
    In theory anyway. So that might be a possible workaround if not using Gator.
  • Sage
    Offline / Send Message
    Sage polycounter lvl 19
    Hi Oxynary.

    The way I get models to line up in zbrush is to bring in the high version first. Luanch Zmapper go under the projection tab and press the Capture current mesh button. Then leave zmapper and go under tool tab in zbrush go under import. The model should match. I stress should because I have had instances when it doesn't. So if it did match up perfectly go to zmapper, Crtl G is the shortcut. Then hit the create normal map and that's it.

    When it doesn't match map the imported model is either bigger or smaller than what you had. When this happens I just go under deformation and press unify. You may have to do it a few times or just leaving zbrush and trying again fixes the problem. You might also have to go under the preview option in tool when it has the store button. Sometimes this helpes but you have to play with it.

    Make sure you always reset xform in max befor exporting to obj since that usually fixes this.

    Break down

    1. import high.
    2. store high in zmapper found under the projection tab. Button called store current state
    3. Hit the Clone button next to the Make Polymesh3D
    4. load low version with the Import option. You have to be in edit mode to do this to the best of my knowledge. Then find the low version and import it.

    5. go to zmapper and create the normal maps.

    Did you look at the zmapper video tutorial?
    Check it out here if you haven't
    http://www.zbrushcentral.com/zbc/showthread.php?t=31281


    Hope this helps.

    Alex
  • oXYnary
    Offline / Send Message
    oXYnary polycounter lvl 18
    SOunds like xnormal is my best option given max lack of the gator tool. Thats the one made by joshy?

    Anyhow Mop. I put one together. I know seeing makes it easier to understand but I hate doing these as it just seems a waste of time. This of course is only the eyeball, but having just these problems with such a simple shape and knowing how my low res model is full of "tricks", I will encounter the same problems in some areas (even if I cut the model into sections which I planned). ANyhow.

    raycasting.jpg
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Thanks for posting the image, oXYnary, it really helps. Picture worth a thousand words etc! IMHO it's always easier to just show people something than try to describe it (words have greater room for error in interpretation wink.gif )

    Hmm, that's really weird though.
    It should be fine... can you email me those eyeball high + low meshes, and I'll take a look at it?
  • Sage
    Offline / Send Message
    Sage polycounter lvl 19
    Hi Oxynary.

    I spent a few hours trying to figure out what was causing most of your problems. I modeled the high poly eye how I thought you did it from looking at your image. I was able to get rid of the normal map drawing problem in Zbrush by making the high poly eye one piece. I just rotated the sphere 90 degress and modeled the cornia out of the pole. Zbrush didn't seem to like the intersecting meshes that made up your high poly eye. I generated the normal map for the eye in max as well and had no problems. with none of the high poly eyes.

    The resizing thing that was happening to you in Zbrush was pretty annoying. The work around I found was to import the high, capture the mesh in zmapper, then import the low. Then you can hit unify under deformation and preview how the low lines up in zmapper. If the low is to big go under deformation and under the scale option scale it down a little. Then you need to hit the store button under the Preview tab. Do it a little at a time, then go back to Zmapper and see what happened to the low. After playing with it a little you'll get the two to line up. If Anyone knows a better way to do this feel free to share. I hope that helps.

    It seems the best way avoid the aligning problem is to use the poly tool, the star, and improt the meshes that way.

    You can download the meshes if you want.

    Evileye.zip

    Alex
  • oXYnary
    Offline / Send Message
    oXYnary polycounter lvl 18
    Thanks sage and Mop. I will post the meshes when I can (too much going on right now). Though I hope having intersecting meshes isnt too much a problem as parts of my main mesh are built that way,
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Good tips Sage.
    For some reason I never had the scale/alignment problem with ZMapper, I just captured the high mesh then imported the low (as per the PDF manual tutorial's instructions) and it lined up perfectly.
  • FAT_CAP
    Offline / Send Message
    FAT_CAP polycounter lvl 18
    Ah yeah - ZMAPPER doesn't seem to cope with overlapping meshes very well I have found. I have encountered the same sort of thing when capturing normals from a high-res ZBRUSH head mesh which has seperate eyeballs- onto a low-res head mesh which doesn't and is just one object.

    The only workaround I found was to just rebake the normals in MAX - which handles these areas fine - using the medium-res mesh and then to use PHOTOSHOP to combine the two maps (i.e use the eye area of the MAX normal-map and the ZBRUSH area for everything else)... not the most elegant of solutions but it works for those intersecting areas!
Sign In or Register to comment.