Home Technical Talk

Blender Zbrush Workflow / Normal Maps

polycounter lvl 2
Offline / Send Message
CrisisMode polycounter lvl 2
Hi everybody,

I have been 3D modeling in Blender for a few months now.  I recently started importing my models to ZBrush in order to make the "high poly version" for normal mapping.

My workflow this far as been:  Blender model low poly -> unwrap low poly -> export to ZBrush -> sculpt -> import to 2nd layer in Blender -> Create the cage on layer 3 -> Create normal map and AO map

At this point I would typically create a 3rd image and paint the model in Blender.

I have been exporting the low poly model and applying the maps in Unity as a test and they repeatedly seem to come out strangely.  It just doesn't look right.



Is it possible I am missing steps?  Is my workflow bad?  I have adjusted the 'Sampling' in Blender from 100 to 400 and I am getting pretty much the same results.  I have tried lots of different things and I've searced for anwers, can't seem to find anything helpful.

Thank you!


Replies

  • CharacterCarl
    Options
    Offline / Send Message
    CharacterCarl greentooth
    It would be useful to mention which software was used for the baking. Was Blender also used for baking? As far as I know, it is not possible to specify a tangent basis that is synced to a game engine like Unity in Blender. Hence, apps like xNormal are usually a better option in this case.
    Apart from that, the normal map seems to be lacking edge padding which produces the jagged edges on areas like the blade.
    Furthermore, the center piece displays some very harsh edges. Without seeing the high poly it looks like projection errors due to a distance-based raycast instead of an averaged projection cage, which is a little confusing as you mentioned that you in fact created a cage.
    Also, it appears more resolution is necessary in order to avoid some of the jagged edges that appear on the model:


  • CrisisMode
    Options
    Offline / Send Message
    CrisisMode polycounter lvl 2
    Hi,

    Thanks for your response and help!  I worked on it a bit more this morning and adjusted the cage out further.  These jagged edges seem to have gone away.  I am using Blender for baking, xNormal seems to give me trouble for often than not.  It either works or gives me errors.

    The cage I am using is just a duplicate of the low poly model that is then scaled up.  As far as resolution goes, the hi poly model has 1.6 million tris; the low poly has 580.  I have tried subdividing the low poly mesh a couple times as I thought maybe it was to low but that didn't change anything as far as I could tell.

    Here is the ZBrush sculpt:



    When I put the low poly in ZBrush the first thing I was doing was subdividing and then applying the ZRemesher which was giving me strange lines and details.  I did it again this morning without the remesher and the results really didn't change much.
  • CharacterCarl
    Options
    Offline / Send Message
    CharacterCarl greentooth
    The cage I am using is just a duplicate of the low poly model that is then scaled up. 
    I suppose you mean "scaled up" as in "pushed out" along the normals because that is what you want a cage to be in order for the raycasting to be accurate.
    As I don't use Blender for baking, I can't be of much help there. Have you tried finding an option to increase edge padding so far? Because it looks to me like that would get you far in solving your problem.
    When I put the low poly in ZBrush the first thing I was doing was subdividing and then applying the ZRemesher which was giving me strange lines and details. I did it again this morning without the remesher and the results really didn't change much.
    ZRemesher is usually used as a method of quickly retopologizing high poly meshes. I don't see why you would use it on your low poly as it is supposed to already have the topology it needs. ZRemesher also removes your UVs as new topology is created. So, you would have to unwrap UVs again before baking.
    Also, showing your UVs would help because there are some mistakes involving UVs that can lead to baking seams/errors too, such as not splitting UV islands where hard shading/edges occur.
  • CrisisMode
    Options
    Offline / Send Message
    CrisisMode polycounter lvl 2
    Yes, the cage is the duplicate of the low poly.  I highlight the cage and the high poly and wireframe.  That way I can see both models.  I then begin to pull the cage in the appropriate places in order to make it larger then the low/high poly models.  It isn't vastly larger, just enough to enclose everything.

    I did read yesterday that ZRemesher is typically for organic modelling as well.  I tried to subdivide much less and then apply the DynaMesh which seems to be what a lot of people do for hard surface models.  The results really aren't much different though in Unity.

    Here is a sword I threw together this morning for testing, cut in half, and unwrapped.  I will mirror it before importing into Zbrush.


  • CrisisMode
  • CrisisMode
    Options
    Offline / Send Message
    CrisisMode polycounter lvl 2
    So I redid all of this and used xNormal to create my normal map and AO map.  Now it looks way better.  So I am not sure what was causing the problem... It must have certainly been an issue with Blender?  It still looks like there might be some resolution issues, but its a vast improvement?


  • CharacterCarl
    Options
    Offline / Send Message
    CharacterCarl greentooth
    Very nice. A vast improvement indeed!
    I did notice some issues in your normal map above but it seems to have been fixed in your most recent post. Just for the record: Areas with hard transitions like these indicate that there are hard edges in the shading but no UV splits:  This will always result in seams, so either cut the UVs or use smooth/averaged normals on the low poly. xNormal let's you control whether to use the shading embedded in your model or, alternatively, average or harden all normals.

    Scaling parts of the model and moving elements not along the direction of the normals is something you want to avoid though when creating your cage as it will lead to projection errors. I'm not that proficient in Blender but have you tried this option?

  • CrisisMode
    Options
    Offline / Send Message
    CrisisMode polycounter lvl 2
    Thank you for all of your help and advice!  I really appreciate it and it has been very helpful.  Sorry I didn't get back to you quicker. Here are my latest 3, I think they are decent?  I must have been doing something wrong with the cage, I did try changing from 'global' to 'normal' but I do not think that it is referring to normal mapping.  I'd have to look into that function of Blender a bit more.

    Thanks again!



  • JedTheKrampus
    Options
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    The best way to get a quick cage in Blender is to duplicate your lowpoly mesh, then use Alt+S (or shrink/fatten) to inflate the model all at once. If certain areas need to be less inflated you can make a shape key for the cage inflation, then use a vertex group and weight painting to morph those areas back towards the model. These steps should work pretty well for all but the lowest polygon budgets.
  • CrisisMode
    Options
    Offline / Send Message
    CrisisMode polycounter lvl 2
    Wow this is great!  Thank you so much.
  • FourtyNights
    Options
    Offline / Send Message
    FourtyNights polycounter
    Or you can use the Displace modifier non-destructively on your cage mesh. Just use the Midlevel value to adjust the inflation.
  • CrisisMode
    Options
    Offline / Send Message
    CrisisMode polycounter lvl 2
    Thank you FourtyNights!  I have just run into a problem which I did not notice before.  I just had a set of swords go up on the Asset Store and when I worked on those I don't remember seeing any seams at all.

    Now on this new model I have this:



    There are nasty looking seams everywhere.  I bake out normal and ao maps with xNormal.  Is this an issue with the cage or the low poly?
Sign In or Register to comment.