ZBrushCentral

Rapid and Nice 32-bit Normal Maps in ZBrush

Caution: tested ONLY in ZBrush 3.1! Probably won’t work in 3.0!

This tutorial is designed for a quick workaround of having to set up the ZMapper in order to generate 32-bit Tangent Space normal maps (for stuff like 3ds Max, with MR suporting tangent normal maps, especially, and all those kick-ass new games that use them and come with editors, like Unreal 3, Crysis/Cryengine/Farcry, etc.)

Note (edited on later): this, of course, will work only for models with proper UV corrdinates. No texturing (no color, no displacement, no normal mapping whatsoever) will work without proper UV coords. Also note this is for Tangent normal maps, 32 bit color depth, so don’t forget to turn the “tangent” option on at step 9, as it is said there.

I did my best to make this as visual as possible and at the least wordy.

  1. Make sure you have a backup copy of your tool, and now, also make sure you are on the lowest subdivision level. If you don’t plan to apply your normal map onto the lowest level, go to the subdiv level you want it at (Tool Pallete -> Geometry rollout), and left-click “Del lower.”
    RZBrushNRMLtutorial-01-LowSubdivision.jpg

I hope that was helpful.

Attachments

ZBrushNRMLtutorial-02-StoreMT.jpg

ZBrushNRMLtutorial-03-Resolution.jpg

ZBrushNRMLtutorial-04-Displacement.jpg

ZBrushNRMLtutorial-05-HighSubdivision.jpg

ZBrushNRMLtutorial-06-Alpha.jpg

ZBrushNRMLtutorial-07-IntensityApplyDispMap.jpg

ZBrushNRMLtutorial-08-Switch.jpg

ZBrushNRMLtutorial-09-NormalMap.jpg

ZBrushNRMLtutorial-10-Export.jpg

thank for the tutorial, i tried but in the alfa window the map is empty ( it’sa purple pail color, but empty ) why???

thanks again

by

I am not entirely sure what has happened (I would be happy to have a look at screenshots of your model on the lowest subdiv level, the highest level, and also your UVs after you re-import the low poly mesh - then I’d have a clearer Idea.) However, I have a very good suspicion about what went wrong and how to correct it.
If you have a nice, detailed mesh in the high sd but are wondering why you have a plain grey color in the displacement map - my guess is that somehow, your UV coordinates (which you have previously set up in Max or Maya) have gotten messed up. There is a very simple way to fix this (if this is the case) -

  1. Export your model at the lowest sd (whichever one you are going to apply the normal map to) to an Obj file. You can do this from Tools Pallete -> Export. Dont forget to turn the “tex” and “mrg” settings on before you export - so you can have a better look at what happened to your coordinates later in max/maya.

  2. Fire up Max / Maya / your mainstream 3D app you used to set up UV coords. Open the file that you exported the base model from. Now, I understand, there is a possibility you’ve started to work in ZBrush right away, in which case you don’t have this file (or the UV coords set up on your model inside ZBrush.) Not to worry.

  3. Either: save the texture coordinates in a separate file (I know you can do this in max, more convinient than the next way) or import your ZBrush-edited model right away and copy the UV modifier from your base mesh to this one. Warning: if your base mesh is does not have the same polycount (meaning, your nrml-recieving model is not original 1st subidv), you have to first collapse the texture coordinates modifier (max) / history (maya), apply a subdivision algorithm (smooth proxy for maya, MeshSmooth for Max, with quad option) and crank the iterations/subdivisions up until the model has exactly the same polycount as your exported/imported ZBrush model.

  4. If you have no nice texture coords file whatsoever (case pure ZBrush workflow) you will have to set them up (there are plenty of tutorials on UVing in Max & Maya help files. You can’t do it in ZBrush.) In any case, apply the texture coordinates to your imported ZBrush model.
    Now, this is a woraround for a glitch in ZBrush - flip all the normals on your model in Max or Maya (to make the geometry seem hollow inside), then re-export it to obj.

  5. Close max/maya, switch to ZBrush again. Make sure you’re on lowest/nrml-target subdiv level.

  6. Go to the Tool Pallete -> Morph Target Rollout, then left-click “Store MT.”

  7. Import the obj with the correct UVs on it.

  8. Resume with the tutorial from the point where you wanted to set up your displacement map size and generate it. When you get to the point where you apply the displacement map, make sure your lower morph state is on the old mesh with bad UVs – you don’t want the good ones to get distorted. If that happens, well, just “Del MT” and do steps 6 & 7 again before you use the subdiv target with the correct UVs to generate the normal map.

I hope this helps. For the future: it is in your best iterest to UV your models at lowest subdivision in Max or Maya, then export/import/re-import to ZBrush and only then detail the mesh.

…you got the point!! it was uv’s bad layout in maya!!! thanks again, you’re very clearly in explain…

by
:wink:
mrc_o

hi there!
can you help me with somthing. In Tools menu, the displacement section i cant set DPRes and in NormalMap i cant set anything? why?

Sure, Paps, this is simple.
Go to your Tool Pallete -> Texture Rollout and make sure that you have the “Disable UV” option (DON’T actually click it if it’s available! You need the UVs) avaliable in bright white (and “EnableUV” is dimmed out.) That will show you whether your UVs are available or not (if you can disable them, obviously, they currently are - if not, they must not be available.)

Chances are - and this is really, really likely the case - you don’t have the UVs available. In this case, “EnableUV” would be the only button lit up.
If you are ABSOLUTELY sure that you had UVs on your model when you imported it into ZBrush (from another app where you made the UVs) and started working on the details, NO WORRIES > simply, click “EnableUV” and with a 95% probability your UVs will come back to life and - lo and behold - your Displacement Map resolution becomes lit and tweakable!

However, if you don’t have the UVs set up (either you started from scratch in ZBrush and never bothered to transfer the model to some place you can set up the texture coords == UVs, or you forgot to do them in your base-modeling app) then… You are in some trouble. But, don’t dispair!
You have two options:

  1. Follow some 7 steps that I posted for MRC_O, who had a similar problem.
  2. I will put this in the next post - see below.
  1. After re-uving your model, Instead of going through the pain of using the morph tools to plug it back into ZBrush is that you can use a small, yet increasingly convenient freeware program called xNormal. Here is the link:
    http://www.xnormal.net/Downloads.aspx
    Its 64 bit version is also very, very nice - if you have a 64 - bit system. If not, 32 bit has all the same features, just… Well… Doesn’t work as fast (as all 32 - bit verisons of stuff do.)

The drawback is that xNormal cannot handle meshes that are above around 7 million polys (I tried) Then, just export the new LOW-END model from maya AFTER re-uving. Mesh those two in xNormal (the tabs for hi- and low- res models are on the right-hand column, don’t forget to turn off any dilation or other filters, other than that - pretty self explanatory, just don’t forget to right-click on things for options like “load” and similar crap…) and generale your normal map. Shouldn’t take too long (don’t forget to turn all other apps off for this process - like ZBrush, for example) You can do all sorts of other good stuff (i.e. height/displacement maps, ambient occlusion maps, etc.) with xNormal.
Cheers

OOO thx alot! it was that EnableUV that wasnt enabled :smiley: now i can do the magic :wink:
thx!:+1:

I’m glad I could help.

well looks like i have same problem as MRC_O.
im new with zbrush so there is many things i dont know :slight_smile: for the moment im using trial.
there is one thing i want to ask you. once i make UV in max do i need to assign it as material or do i leave it in control panel above Editable Polly rollout before extraction?

this is my model:
crnc21.jpg

Good question (if I read you right.)
In max, when you finish setting up your UVs (with the, per se, Unwrap UVW map modifier) you will, usually, have them applied to the exported geometry (as long as you are actively on the Unwrap UVW modifier level during export - probably, the top level in your modifier stack in the control panel.)

However, if you want to get rid of the Unwrap modifer sitting there in the stack, you may do so without losing your properly assigned uvs. Warning: don’t ever discard or delete your UnwrapUVW modifier unless you want to discard all changes you’ve done to your UVs!

To do it without discarding or deleting, simply convert your geomerty (again) to editable poly. There are two effective ways of doing this - and, whereas you probably know one of them, there is another one, which you may know or or not. They are:

a) Right-click on the Unwrap UVW modifier level in your modifier stack and, in the emerged option menu, choose “Collapse To.” This method is my preference because you don’t necessarily have to collapse all of the stack when you’re doing that (per se, you have something else applied over your UnwrapUVW that you don’t wanna lose, like MeshSmooth or something.)

b) Right-click directly on your object in the viewport, choose “Convert To:” and choose “Editable Poly.” You will see that your Editable Polygon object will retain it’s geometry as editable poly, but the Unwrap UVW modifier will no longer appear.

After you do any of this, though you won’t see the actual Unwrap modifier anymore, the UVs will still be on the model. If you ever want to tweak your UVs again - simply aply a new Unwrap UVW modifier, and, lo and behold! Your formerly set-up UVs are still where you left them!

This is a GOOD way to ensure you’re exporting your model correctly, with the UVs on it.

Your model looks gorgeous, BTW.

Cheers

sounds like you guys know perfectly how to use z mapper
i have a character who (zb3.0) who is composed out of 22 sub tools 500 000 over polys each … so i want to texture him and generate a normal map but how to do that since i have no lower sub-div levels i have deleted them all most all of them i really tryed a lot of stuff but by my self nothing seems to work
so if you have any idea how to gen. a normal map 4 my man i will very much
appreciate it

hi megamorph, i followed your advise, so finally when in maya mental ray i do the render what came out was omething strange as you see!!! i tryed to reassingn in zbrush the uv with ( uvtiles ) but is the same, can you help me???
ps
personally i think the problem is in zbrush whwn it create the displacement file…

thanks a lot
mrc_O

Attachments

prova displ[1]..jpg

prova zb.jpg

Dear MRC_O,
you are right - there often is some sort of bug associated with the uv-fix process I sugguested the last time. However, it lies not in the displacement generator… Well, probably not… Anyway, I found a NICE WORKAROUND.
I could not find this in the help files, so it’s kind of amazing, but THIS DOES WORK- instead of using the morph tools try this:

  1. Make sure your tool is loaded (the one you exported from) and at lowest subd (one you exported from to fix the UVs.) If you actually used the initial Maya mesh to change the uvs - export the target subd from ZBrush to maya and find a way in maya to copy over the UV changes you’ve made (probably some option in the Hypergraph - sorry, I know for sure where in Max, I’m a Max user.) Then, export again.
  2. Be ABSOLUTELY sure that the geometry of your lowest subd is exactly the same as what you’re going to import (the one with proper uvs) in next step.
  3. Just use the usual import tool to import your corrected UV mesh.:smiley:
    :b2: Try your displacement render now and tell me if it works (it worked for me when I tried it, but there might be model-specific limitations.)
    I hope this helps,
    Megamorph

hi megamorph, i tryed all the procedure with a simple object created in zbrush ( a plane!!), i added some details then i have imported the displacement in maya and rendered it, all ok!!

but, let say i want to restart my orc model with high details from z brash, do i have to go to the lovest level and reassign the uv??? and the UVTILES are good?? or for a complex object i need a differt procedure to create uv???

i don’t know why with a simple obejts is ok and with my character is so complicate!!! ??!!?!?

thanks a lot
mrc_o

I’m glad it worked. Try it on the model - if you hadn’t altered the actual geometry (vertex/poly positions) in Maya of the lowest-level subdiv mesh you re-imported to Maya to just fix the UVs, you should have no problem. If you actually modified the uvs on the original Maya-Before-Export-Model, no worries! :cool: Export your lowest subdiv mesh from ZBrush into an obj file, import it into your maya file where you got the model with correct uvs, then use the polyTransfer UVs option in maya to copy the uvs from one object to the other.

I hope you haven’t tweaked the number of vertices while re-working the UVs, cause then you’re in trouble! That’s something you’re really not supposed to do after you finished the detail in ZBrush if you’re planning to ever re-import these UVs into there!

So, I’m gonna keep my fingers crossed that you haven’t, and we’ll see how it goes after you use this “new” import procedure I described earlier.
Piece of cake, right?:wink:

Also, let me take a look at your UVs render, if you can. I’d like to see what you have in there.

But hey, I hear you,- UVing characters is a b&#ch. GUV tiles are a REALLY basic way to UV things - completely automatic. To make UVs right on your character in Maya or Max, you need to manually do at least part of the process… Sucks, doesn’t it? But hey, if you wan’t a pointer to a better less-manual-&-more-auto UV-ing in a 3D app, try out Modo 301. Their auto-unwrap feature really does it well… Almost does all the character UVing for you, even with a complex mesh… Really nice stuff [if you know how to use it - which is simple].

thanks again megamorph, i just downloaded the pelting tool plug in fpr maya, i’ll try to make some nice uv map, and the i’ll try again :rolleyes:

by
mrc_o

Oh, I’m sorry, I guess I didn’t read you correctly the last time. I thought you already had the UVs nicely set up on the character.
But GOOD CALL, man, the pelting tools will definitely help you out with this (organic) sort of characters.

I’m sort-of amazed that the pelting tools don’t come by default in Maya… I would think Autodesk would have implemented it by now… Sort of a wierd thing - Max has these tools by default, no plugins necessary, and Maya doesn’t, whereas Max is around $3000 and Maya is around $7000 (commercial.)

HI MEGAMORPH, YOU ARE ABSOLUTELY RIGHT!!! SUCH A GREAT TOOL, IT’S QUITE STRANGE THAT IT DOESN’T CAME BY DEFAULT WITH MAYA:confused:
ANYWAY I’LL KEEP YOU INFORMED!!!

BY
MRC_O;)