ZBrushCentral

Z2 Displacement in Max

that is really weird, because i never experienced it with any of the previous betas. but now i just made a test and yes, theres very obvious banding happening in certain areas on the actual tiff file.

Ok, at least I’m not goin nuts :wink:

I’m still going to run those maya tests to see if it handles the banding better than max.

the pix crew are investigating this now. i ran s number of tests on models comming into zbrush as well as on native models. as well as tried using every possible type of map generation setting, and tried also the multi-disp map plugin.
same banding problem every time.

im guessing if you use MR you wont get any visible banding from displacements since you will just tesselate, instead of using micropolys. with Prman, and Vray i expect things to be visible.

Mabe its the OBJ exporter thats causing al of this? check this issue out
http://www.pixolator.com/zbc-bin/ultimatebb.cgi?ubb=get_topic&f=4&t=001404

Fantastic, glad to hear this is finally getting the attention it needs from key individuals. Personally, I don’t think it would be the OBJ plug-in based on ambient-whisper’s test results (way to go!), as well as the less than scientific testing I’ve done. As far as I can tell, the banding is in the 16-bit image file itself and Vray is really good at bringing it out for some reason.

Here is a test I just did following the
step by step in a earlier post. There may
be a problem but I cant recreate it.
Ive rendered in Mental Ray, PRMAN and Beta Turtle. Still no banding yet. Not saying there is no bug but. This should be looked into by the Pixologic team.

Dave

Dave: Your a Maya user right? Maybe it’s just a 3DS Max / Vray specific issue. But that can’t be all of it because I see banding sometimes in the maps themselves (though with UV tiles it can be very hard to see). Perhaps your maps simply don’t have banding (you still using the beta?), or your renderers simply aren’t reproducing it even if it was there in the maps? My brain hurts…

No, the obj exporter is a different issue - it was more a case of the UVs getting screwed by the exporter/importer.

This looks like a bit-depth problem, but I’m relieved that Martin has managed to replicate the banding, and it’s being investigated.

Cheers

it actually happens before the tiff file export. if you examine the disp map within zbrush you will see the banding there too. :slight_smile:
for all we know, it could be a silly problem where the videocard drivers could be blamed. ( though ive tried changing drivers, and doing the tests on my laptop and pc and the results were the same )

As a matter of interest Martin, are the gfx card in your main PC and laptop the same brand?

I’m running it on a PC with a Radeon 9800 Pro, 1280x1024x32bit using the 4.4 Catalyst drivers.

Thanks

yup. both are Geforce fx cards

one is a Geforce gofx 5600 ( laptop )
and the other is a Geforce 5600

i tried a number of drivers going from the 44.xx -> 56.xx drivers. so i dont think it would be drivers. i ran the tests just incase.

i still think it must be a small bug caused by some of the recent changes from beta, because i dont ever remember seeing any banding in the maps before.

I still think the visible banding in the maps has to do with it being displayed as 8-bit grayscale (32-bit color)… in photoshop 16-bit grayscale applying a guassian blur to even a simple white or black dot will cause banding that is easy to notice. Even a heavily blurred 16-bit grayscale image seems to create banding in 3dsmax though its annoying. :frowning:

Hi,
I see that some explanation is in order :slight_smile:
When ZBrush generates a displacement map, it is internally calculated in 32 bits, then scaled to fit within a 16-bit grayscale map.

The 16-bit grayscale map is capable of details much finer than an 8-bit map can yield (256 times finer to be exact). Since common video displays allow for only 8 bits per channel, they are not able to display the fine intensity changes. Therefore, they may appear as ‘banding’.

To demonstrate this effect, I’ll use the steps posted by Zeddicus in the previous page and import the resulting map into an external image-editing application which is capable of handling the 16-bits format ( such as Photoshop )…

[img]http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1082942867xsc.jpg[/img]

Looking at the above image (and sampling intensities in different locations), you may think the image contains large areas with identical values (bands), but this is not the case. Since the displacement was generated for an unmodified mesh, the changes between the low- and high-res are miniscule; therefore, most of the details fall within the low significant bits of the 16-bit grayscale values. You don’t get to see these details in a common 8-bit video card, but we can enhance the details by simply applying auto-contrast to the map…

[img]http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1082942904eiu.jpg[/img]

As can be seen above, what initially seemed to be a large area with identical values is actually a smooth transition of intensities – exactly what you’d expect from the 16-bit displacement map. (In the future, we may also add an option to export the 32-bit displacement map directly for even greater accuracy.)

Generating displacement maps and rendering them externally:
To get optimal results in an external renderer you need to…

  1. Generate the displacement map correctly.
  2. Experiment and find the best settings in the external renderer to display the final result properly.

To simplify this process I will post a sample low-res head mesh with its correctly-calculated Z2 displacement map (step 1). This will allow you to concentrate your efforts on getting the best results out of the external renderer (step 2).

When you find the best render settings, you’ll then be able to generate displacement maps for your own models without much difficulty.

Note: The concept of displacement and normal mapping is not new, but the significant interest in these certainly is. Since this technology is not yet a standard feature to all renderers, you do need to experiment to find what works best in your renderer. As time progresses, the usage of displacement and normal maps will become standardized and easier to use.

On the ZBrush side, we will continue to enhance these features, and will continue to share information with other companies in order to streamline the process of rendering ZBrush-generated displacement and normal maps in their renderers.
Hope this help :slight_smile:
-Pixolator

P.S> I will post the test files by tomorrow.

The master has spoken. All our doubts and fears shall be gone!

Ok, so basically what your saying is that we’re all just seeing things that aren’t really there. The banding we see in Photoshop is simply a trick of our video cards because they basically suck (ATI 9800 Pro in 32 bit mode on a 19" CRT here), right? If so, then why do these ZB maps generate displaced banding when applied to a mesh in a 3D app like Max with Vray? And why does it happen to some models but not others sometimes? Is it really that 16-bit still isn’t enough? I’m guessing so since you mention implementing 32-bit in the future. You have me wondering now which of the renderers out there can even take 32-bit alpha maps for use in displacment. Though considering ZB2 just came out, I’m guessing I probably shouldn’t worry about 32-bit map compatibility for quite a while, am I right? Probably good, gives me some time to do a bit of research, lol. :wink:

On a whim I decided to go back and retry some of my very early tests when ZB2 first came out (no, not the method I outlined earlier). Now I can’t get it to create banding at all when rendered with Vray, even when I try to screw it up on purpose in both apps. I think I’m going to need therapy soon, see my left eye twitching? :stuck_out_tongue:

Obviously the rapid movement of your left eyelid counteracts any banding you may have seen before - see, it all works out in the end…

Thanks Pixolator, still not sure what is going on with Vray, but I’ll try out the samples when they’re posted.

Cheers

I think I’ve made a break through discovery here! Well, at least as far as my problems are concerned anyways. I was playing around with the filter settings in Max’s material editor just now. By default the setting when loading a bitmap is a blur of 1.0 with pyramidal filtering (Vray’s “filter texmap” option is on also by default). Turning up the blur a little bit increased the banding specifically in the displaced areas only. Turning the blur setting down to nothing (0.01) made the banding completely disappear in a second identical render right after the first. With a blur of 1.0 to 2.0, and switching between pyramidal, summed area, and none created different kinds of banding that were all rather ugly (though interesting too). So it wasn’t Zbrush or Vray, but was Max all along!

Based on this information, I think the problem where I had banding over the entire model and not just the displaced areas specifically, may have to do with forgetting to switch back to the saved morph target (which by the way I noticed is easily wrecked if you change levels after hitting the switch button, or hit it more than once). I did a quick test, and you indeed get two very different displacement maps depending on whether you do your morph target right. Probably better to reload your OBJ file into level 1 instead to save frustration. Haven’t tried displacing the screwy MT version yet, but I bet ya anything I’ll get banding on the entire model when I do. Edit: YUP! I was right! Woo hoo!

By the way, it happens with both 2D and 3D mapping modes in the Vray displacement modifier. 2D may require a higher blur setting in the material editor to see than 3D though.

Now you see it, now you don’t! :wink:

What kind of results do you get using mental ray in max if you have tried?