Author Topic: good looking displacement maps  (Read 7996 times)

0 Members and 1 Guest are viewing this topic.

Offline Rach

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
good looking displacement maps
« on: January 29, 2012, 11:24:26 PM »
hey mudbox/maya users.

After much trial and error, here's a few good tips for getting your displacement maps looking 100% accurate in Maya.  Directly imported they often look lacking in detail because some of Mayas default settings. This is a good list to follow for good looking results.

1- extracting maps from mudbox often ends up with unwanted spikes ALL over your maya rendered version. Lowering the search distance value in the map extraction in mudbox will get rid of them. The lower the value, the lower the spikes. Make sure there is no overlapping UVs

2 - Add the displacement map to your model, then select the model and make sure you ad a sub div approximation to it. window > rendering editors > mental ray > approximation editor. Under subdivisions, select derive from maya and click create. You will now have a mentalraySubdivApprox node, select it and change the Approx method from parametric to spacial (important for detail). This node sub divides your model, adding more detail at render time (not in the view port), so the higher you set the min and max sub divs, the better the displacement will look. At the cost of render time of course, frown. The max sub div should match the maximum level you reached in your mudbox sculpt. I usually leave the min about 2-3.

3 – Select your model. Go into its shape node ( objectnameShape1 ) go to the displacement map section and uncheck feature displacement . This is one of Mayas many annoying filters that smooth things out. We do not want this on, we want max detail! So uncheck it.

4 – Go into the file node of your displacement map. Under File attributes, set the filter type to Off. Filters smooth out detail so nothing to do here.

5 – Again in the file node for the map itself, go to colour balance. The alpha gain is what tells Maya how much displacement is being caused by your map. Bumping up the number will add more detail, and lowering it will make it less noticeable. Play around and bump up if your displacement is still not 100% detailed.

6 – go into your render settings. In the features tab under extra features, make sure displacement shaders and displacement pre sample is checked.


7 - Ad a bump map too for little details on the skin like pores or pimples. This should be different from your displacement map. I find a grayscale version of the colour map looks good if you have skin details on that. Play with the levels in photoshop to give different bump strengths.

8 – If you want the easy way out just export a normal map. There is a reason they are used for games, they are quicker to render, but they will never give you the same detail as displacement. Avoid normal maps unless you plan on making games you nerd.  ::)


some examples of them working properly on faces. The base models are very simple so its a great technique.








« Last Edit: January 29, 2012, 11:38:51 PM by Rach »

Offline rowan

  • Hero Member
  • *****
  • Posts: 1679
    • View Profile
Re: good looking displacement maps
« Reply #1 on: January 30, 2012, 10:53:20 AM »
Thanks for taking the time to put this up to help people out, and I'm sure this workflow works, but there is much more efficient ways to deal with the sculpting workflow, and I disagree with pretty much everything you've said except for point 3.

As it came up on Facebook, you'll get aliasing artifacts like a moire pattern especially on sequences if you disable filtering all together. For better quality results consider mental ray's advanced elliptical filtering which is used in conjunction with .map pyramid files, you'll need to change the filter type to mipmap instead of quadratic, and this requires tuning. Also 8 is quite profoundly wrong, one shouldn't look at displacement maps & normal maps as alternatives, you can use normals maps and displacement maps together, because they do totally different things. Displacement maps should honour your primary and secondary form (the silhouette), normal maps honour your tertiary form. Normal maps are used widely on feature films it isn't just a game thing, just as displacement maps are used in games, including real-time level-of-detail subdivision. You should only need to subdivide high enough to make your displacement map represent the secondary form, never (or rarely) to the maximum value you sculpted to, it's just a waste of processing time and RAM overhead. Incidentally there's nothing wrong with the approximation editors parametric subdivision, it's what ZBrush & Mudbox use after all, spatial can save render time & memory but it can also cause artifacts in sequences if not properly tuned because like final gather it's view dependent.

I don't mean to be a dick and shoot your post down but there is a lot of confusion and bad information out there on this workflow so I'm just wanting to jump on this in case this post confuses people. Like I said, I'm sure this one works, I just believe you can get much better results for less render time with a bit more technical understanding.

I actually wrote a paper and did a seminar on this workflow, while it's total information overload for new comers, for anyone that is interested in digital sculpting it's probably worthwhile reading to get started on the right foot.

I'll make it available for those interested for a while here;

http://rowankarrer.net/files/rowanKarrer_surfaceDetailing.pdf

<3 Rowan
Animation? That's pretty much just done by Bridget nowadays... Bridget is ok I guess!!!! <3 <3 <3

Offline Rach

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
Re: good looking displacement maps
« Reply #2 on: January 30, 2012, 03:50:06 PM »
Hold on there tiger, I never meant this to be a “workflow”, or a mudbox to maya tutorial. It’s just how i have found mine to work the best for me, for maximum quality renders and likeness to the original file.

Your points are valid and handy if you are in a production environment because you take into fact render time and CPU. That was not my point, my point is to get the best look out of your maps, and like most rendering in maya, there is the toss up between quality and speed. You can have speedy quality, but in this case it will be less detailed.

Here are the facts for me.

I have never experienced artifacts with this method, when animated or not - yes if  i have exported from mudbox poorly, which i didn't cover at all, thats a whole nother issue in itself. Artifacts are caused by something else, not from not applying a filter which is just a plaster for the real problem. You can’t say getting the flu is cased by not receiving your flu shot. The idea is to avoid them in the first place, look over your method and find out what is causing the artifacts and fix them.


Also regarding filters - this post was made to demonstrate how i make a clean un blurred displacement, and mipmap filters will lower the sharpness. Of all the filters, they are specifically designed to be a preview filter. You can read in mayas guide they are not designed for high quality renders. No matter how much tweaking goes on in the render settings, using a mipmap makes the surface more blurred than with no filter which looks crisp. The same goes for the parametric method of displacement, spatial gives you more quality control. I agree that you have to give and take a little at render time when you bring animation and large scenes into the picture, but this is my way of rendering the highest quality mudbox replica.


Why not compare them when in any sort of production they are used for the same thing? To create the illusion that an object is more detailed than it is. Normal maps affect the lighting on the surface to look as though the surface is raised, where displacement actually creates the details (and like you said shadows). Its totally dependant on lighting this is just my opinion, but based on these facts displacement is a better basic all rounder and better on things like main characters who are lighting dependant and need proper shadows. My advice would be to use a displacement instead, but yes they have their place if you are looking for speedy renders.

Never subdivide to the maximum form? The fact is they look better when sub divided to the same level. The displacement by nature will be its most accurate. For things like skin in particular a lack of tiny texture is noticeable. Again, it’s just how much quality you want to receive vs render time. I find you can tidy up your scenes and make your workflow quicker in other ways without compromising image quality.

As you are well aware of, there are always several different methods in Maya, we seem to have different ones. This is not miss information, just different information to yours. Not to be a dick or anything.

Offline bernsul

  • Hero Member
  • *****
  • Posts: 1089
    • View Profile
Re: good looking displacement maps
« Reply #3 on: January 30, 2012, 04:06:30 PM »
Thanks for the info and debate in both cases. I am looking to sort this out for my own workflow, being not happy with what I have done so far, so good to see this topic come up on the forums.