View Full Version : Z2 Displacement in Max
Zeddicus
04-03-04, 09:58 PM
Was worried for quite some time about how well Zbrush 2.0 models & displacement maps would work when exported to 3DS Max 6, but happily it looks like all works quite well! Thought I'd share a quick render:
http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1081057343rwe.jpg
This was with Vray, which works spectacular for rendering displacement by the way. Been experimenting a lot with displacement maps in Mental Ray too, but it just can't cut it unfortunately (may work better in Maya though, I wouldn't know) and this test was no exception. GUV tiles were used for the UV mapping and the object was exported at div level 2. I found level 1 caused a couple tiny anomilies in my render that couldn't be tweaked out, so that's why I went with level 2 and just used less subD on the poly model in Max (better performance overall too).
Must say I'm pretty impressed so far! This is really going to bring models to a whole new level. Now off to dig deeper... :)
brushoid
04-04-04, 12:28 AM
Hi zeddicus
Out of interest, how did you manage to get both positive and negative displacement out of vray? In my experience, vray/max interprets black to white in disp maps as 0% to 100% displacement, with no negative range.
I'd be very grateful if you could post your VrayDisplacement modifier settings and maybe a shot of the disp map you're using.
thanks in advance
Zeddicus
04-04-04, 12:54 AM
Nothing fancy at all really. After importing the OBJ file and converting it to a poly object so I could turn up SubD Surface iterations a couple notches, I just threw the VrayDisplacementMod modifier onto it, set that to 3D mapping, loaded the displacement map (a 16-bit TIF file) from Zbrush as the Texmap, set the amount of displacement I wanted, and rendered. Default Max settings all around for the most part. The object is from the displacement map tutorial. At the end of chapter 4 it asks if you want to save everything to file so you can play with it, so that's what I did.
Zeddicus
04-04-04, 03:46 AM
Hey, I think your right. I'm new to Vray and I didn't realize it worked the way you stated, but after going back and comparing displaced vs non-displaced renders in Max, I can see that the middle grey added an overall "bloat" to the model, while black areas on the map only look like negative displacement because they weren't displaced at all relative to the middle greys. Still, if you were careful about the middle grey, you could probably get away with faking the negative displacement as I did by accident. Hopefully Vray will be updated to do both negative and positive displacement properly, like the way Zbrush does it.
triztan
04-04-04, 05:13 AM
hi,
i have tried out the same last night using mental ray, finalrender stage 1 and the 3dsmax scanliner. with all those renderers i have those "holes" in the displacement. unfortunately i dont have vray. gotta test out more since i believe there must be a way to do it right in mentalray.
all the best,
daniel
Zeddicus
04-04-04, 05:21 AM
Well, I tried to lay down and get some sleep (been up all night lol). I was struck with the idea of using two maps, one for positive displacement and one for negative, and using two of Vray's displacment modifiers instead of just one. Editing the Zbrush displacment bitmaps was easy enough. For the positive map I simply adjusted the black output level to 127 using levels is Photoshop. This left only the positive height values. Then for the negative map I simply inverted the Zbrush bitmap and then did the same levels adjustment to it as well, thus leaving only the negative height values. Only problem was that Vray will only use the modifier at the top of the stack and not both. Too bad too, because by themeselves, both my positive and negative displacement maps worked good. :-/
Here is to hoping Vray gets updated because I really love it. Simple to use, fast, powerful, and so far has handled everything I've thrown at it without any trouble what-so-ever. Anyways, using a middle grey as the zero point instead of black makes the most sense to me. Doesn't make any sense to be able to do only one or the other but not both.
Zeddicus
04-04-04, 05:26 AM
triztan: Definitely give Vray a try. Nothing does displacement better as far as Max is concerned. They have a trial you can download, so you might want to give that a go. ;)
hi, did you notice the SHIFT AMOUNT spinner
just below the DISPLACEMENT AMOUNT? You don't
have to use seperate maps to archive positive and negative displacement in vray.
If you set the shift amount to a negative value, approximately half the displ. amount, black areas are pushed in, just play around and figure out which values do it.
I got another question, did anyone here try to sculpt a high detailed model like the ones from WETA or those on the zbrush2 homepage?
It seems that I have a performance problem. To archive this level of detail with little skin wrinkles etc. I have to divide my models
several times until the poly count is about
5millions or so. Then zbrush gets so slow that working with the freehand sculpting tools is impossible. I got 2.5 GHZ and 1GB ram.
Or is it something with my workflow, do I have to use the projection master tool instead?
I bought zbrush to use it for a film project
I work for ( see www.soulfire.com (http://www.soulfire.com) and now I question myself if I can really use it.
Stephen Green
04-04-04, 09:18 AM
Rocko,
have you tried using the Ctrl+Shift Drag Window to work on selected areas?
That speeds things up a great deal.
Cheers,
Steve
ZBrush is also capable of exporting separate positive and negative maps.
Select your displacement map in the Alpha palette and open the AlphaAdjust Curve.
Click the Load button and load the NegativeDisplacement.ZCV
Click Alpha>Make Modified Alpha
Now load the PositiveDisplacement.ZCV and click the Make Modified Alpha button again.
You will now have three displacement alphas: The original map, a negative map, and a positive map.
Have fun!
that's what I have found so far to use with Vray
export displace map from ZB as Tiff file
export object at sub division level 2
in max
Place a meshsmooth modifier otherwisse the displacement modifier explode the object
Set an amount of displacement
set the shift value to half oposite
( example amount 10 shift -5, amount -22 shift 11....)
In material editor rotate texture 180 in W and -1 in x tile
hope that help
http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1081116523wwh.gif
blakshep
04-04-04, 03:14 PM
zeddicus i have problems with uvw importing max. It ends zigzag. Can you help me a little?
bisenberger
04-04-04, 06:30 PM
Does max 6 directly import OBJ files? If not, how did you get it in max? I'm using max 5.1 and it doesn't have an import option for OBJ files.
nimajneb
04-04-04, 06:38 PM
You can use the freeware plugin Habware Max to Obj and Obj to MAX to get in and out of MAX 4 , 5 & 6.
Probably find the link on scriptspot.
Zeddicus
04-04-04, 11:08 PM
Just got here from the Vray forums where negative shift with positive displacement was explained to me. Supposedly there is a random bug when doing this by the way. Regardless, so far so good, works well in this particular case. Thanks to all who replied. :)
Also, if you flip the map in Zbrush before exporting, you won't need to alter the coordinates in Max as Junk has pointed out. Also as pointed out, displacement does work better if you export the model at divide level 2 in Zbrush and use that in Max. In fact I've found that going one level higher than the lowest in Zbrush means you can use up to two subD levels less in Max, making for better performance all around.
Aurick: Thanks for pointing out those scripts. Saves having to go into PS to do it and will hopefully help anyone who needs it, though in my case with Vray it didn't work (can't use two maps as mentioned earlier). But luckily thanks to the comments from other Vray users, this has been solved. :)
blakshep: See my reply to your other post regarding the zig zag. Hope it helps you.
rocko: There is a page where someone has done some amazing displacement work using ZB2 and Vray (guy who did troll holding bunny). Just need to find it. Will post when I do.
Zeddicus
04-04-04, 11:18 PM
Here is the Obj2Max and Max2Obj plug-ins:
Max 4 & 5: http://www.habware.at/duck4.htm
Max 6: http://www.habware.at/duck6.htm
And here is the site (belongs to Jonas Thornqvist) with a couple ZB2 models rendered with Vray:
http://www.subdivme.com/
Specifically this:
http://www.subdivme.com/Wip.htm
And this:
http://www.subdivme.com/Troll.htm
Pretty sweet eh? :)
PS: Here is the thread on CGTalk regarding the troll:
http://www.cgtalk.com/showthread.php?s=&threadid=123173&highlight=cave+troll
brushoid
04-05-04, 12:27 PM
thanks for all the vray info everyone
one thing though - did anyone resolve the issue of banding artifacts in displaced geometry as noted by Zeddicus in the thread at the base of this post.
It would be handy to know under what conditions the banding occurs - just using 16 BIT TIFs doesn't seem to clear it up.
cheers
banding thread (http://www.pixolator.com/zbc-bin/ultimatebb.cgi?ubb=get_topic&f=4&t=001173)
Zeddicus
04-06-04, 01:21 AM
brushoid: With all the testing I did in the thread you mention, I really do think that the problem is unique to low poly spheres (or maybe spheres in general) and the effect subdividing has on them. Basically what is happening is that the surface does not stay perfectly smooth each time you subdivide. The polys that make up the sphere have a tendacy to "buckle" for lack of a better term, and tend to do so uniformly (which is probably why those renders look the way they do, like a contour map... moire or interference pattern perhaps). With spheres that have two poles, the buckling seems to happen along the lines of longitude. With a geosphere, the buckling is quite different. More like ripples in a pond, but square instead of circular and on four sides of the geosphere. There may be more to it than that (I don't really understand the mathematics involved with 3D computations, I'm an artist and not a programmer lol), but so far other objects, like those made from Zspheres within Zbrush, don't seem to exhibit this problem.
Fouad B.
04-06-04, 06:01 AM
is it your site posted before Zeddicus?
nice stuff here
Zeddicus
04-06-04, 06:48 AM
Fouad: No, that wasn't my site (I wish!). It belongs to Jonas Thornqvist as I mentioned in my previous post. ;)
Stephen Green
04-06-04, 09:42 AM
Hi Zeddicus,
I've got a couple of questions about your workflow using Vray's displacement in Max.
First, why 3D rather than 2D? I thought 3D was more for procedural maps rather than displacing bitmaps. However I can't get anything at all resembling the original zbrush model using 2D.
3D also seems to need cranking up to something like 800 to get any distinct displacement (and then it is very grainy)
I also get seams along the UV borders - have you noticed this at all?
Thanks,
brushoid
04-06-04, 10:41 AM
I was trying out a disp map on an old head model:- http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1081272698sts.jpg
When using the vray disp modifier's 3d option, moire/banding occurs:
http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1081272897set.jpg
with 2d selected, however, there is no banding, but other artifacts seem to be more common (splits in the mesh, mainly).
Earlier today I'd been zbrushing the same model and no banding had appeared. Just a hunch, but I think the trigger for the banding occurs at export time from zbrush, and is something to do with the morph target-switch workflow.
Zeddicus
04-06-04, 10:57 AM
Stephen: One thing you might want to check is the scale. Models too big seem to require high settings to see anything sometimes, and models too small can cause even conservative settings to be too much. Maps exported from Zbrush need to be flipped vertically to display properly. Regarding 2D vs 3D setting, I'll just use whatever renders best, lol. And yes, I see artifacts with UV borders occasionally as well. Sometimes you just have to muck around in Zbrush and Max until it comes out useable (yeah, I seem to be relying on luck a lot lately I think).
brushoid: Yep, that's the banding I was talking about in the other forum here. I've found using the 2D setting in Vray can help too. I've also found artifacts can be somewhat controlled by playing with the resolution setting (up and down as well even). First I think it's one thing, then another. Sometimes it happens, sometimes it doesn't. I'm just not sure of anything anymore and all my testing, besides becoming a tad monotonous, is really making my head hurt, lol. I do know one things though. The banding is definitely there in the maps that Zbrush generates, even when using the highest poly count possible.
brushoid
04-06-04, 12:02 PM
PS: 2d settings in vray rendered in 23 seconds, 3d setting rendered in 31 minutes.
Big disparity in render-time, but very little in final image quality (2d comes out on top because there is no banding).
zeddicus:I've also found that sometimes the banding happens, sometimes not. I think it is something to do with the morph target not matching the initial model. However, the disp map looks OK to me in PShop.
When I tried to re-import the .obj model at subdiv level 1 I got an error saying that the two models differed in vertex count. Visually, subdiv level 1 and the initial .obj model look the same.
Does anybody have any idea why the morph target and initial imported mesh would differ?
Stephen Green
04-06-04, 02:40 PM
Zeddicus,
thanks, I'll check the scale (I think I left the obj exporter importer set to 1.0)
Regarding the seams, Kaldera (texture/normal/displacement baking plugin) has a setting for 'skirts' which is where it repeats pixels along the UV borders, maybe there's something similar in Zbrush?
Maybe the full manual/pdf might fill in the blanks, or maybe any beta-testers who were using Max/Vray might like to give some pointers as to what could cause the artifacts?
Thanks,
Zeddicus
04-07-04, 12:49 PM
<BLOCKQUOTE>quote:</font><HR>Maybe the full manual/pdf might fill in the blanks, or maybe any beta-testers who were using Max/Vray might like to give some pointers as to what could cause the artifacts?<HR></BLOCKQUOTE>
I'm hoping to hear something from the more advanced beta users of Zbrush as well. So far the Lightwave/Max/Maya/etc users out there been surprisingly quiet. I find it strange too, since one of the big advertising points of Zbrush 2.0 was it's ability to be used in a real production workflow (example: the big deal with WETA using Zbrush) as well as it displacement generation abilities. Becuase of this you would think that this is an area that had been thoroughly tested and well documented. Hopefully the manual, when it comes out, will have some pointers that might help avoid the banding problem.
Maya users doesn't seems to have any problem at all using displace and maya renderer or mental ray
in max i have the same problem as you
first the scaling-> which one is good -> no idea
export from Zb, -> seems to rprrefer tiff or psd not bmp
and for the uv mobving someone has used the cage function (personnaly it changes my object appaerance and as i using Gutile of Zbrsuh it's a problem
well, united we trust :cool: :rolleyes:
grassynoel
04-08-04, 11:25 PM
I have a MAx to Vray tutorial that will be out in a day or so that outlines a few pointers to keep in mind when travelling between the two apps. Also,on of my collegues here at work is just finishing up a Zbrush script and max script that reads the positive and negative value of your displacement map in zbrush, then impiments those values in max by adding the vray displacement and setting the vlues...AUTOMATICALLY. Just press a few buttons and you're away. I'm sure he'll post it when he's ready.
Glenn
Zeddicus
04-09-04, 12:48 AM
Sounds intriguing. I look forward to reading it. In the beginning, when Z2 first came out, I was considering making a Max-to-Zbrush-to-Max displacement tutorial as well (for both MR and Vray), but unfortunately dropped the idea when I ran into the banding problem and there seemed to be no solution forthcoming. Regardless, I'm glad to see someone else has the ball well in hand. ;)
babiroussa
04-09-04, 05:48 AM
Hi,
Is there someone who could explain the exactly way to make this thing (displacement map with 3d model imported from Max)
I found several tutorials for Maya, and tried to translate them to Max but it doesn't work so well.
I'm working with Max for the lowres model, Zbrush2 off course for displacement, and Max for rendering with Vray.
I'll be glad to have a nice an efficient way to succeed my hoping result.
thanks a lot.
skycastle
04-09-04, 06:40 AM
Hi Zeddicus,
I dont know Max very well but the "banding"
problem that you are seeing looks like
something that happens when you use 8bit maps in a MicroPoly Displacement renderer.
Ive seen this before ( in Mental Ray and PRman ) when we use 8 bit maps. Try to render the maps using 16 bit color space.
With 16 bit there are enough color values
to hide any banding.
Ive been working at Weta for the past few
years and I can tell you that Zbrush does
work well in a production pipe. But like I said
before I dont know Max but to solve your
problem I think you should start by tring
to figure out how to import and render 16 bit color maps (if you rendering the micro poly displacements). Displacements do work well with 8bit color but if you have very soft forms expressed in the maps, you are more
likely to see this banding problem.
Id be curious to know if your rendering with
8bit maps.
Dave
Zeddicus
04-09-04, 09:49 AM
<BLOCKQUOTE>quote:</font><HR>Id be curious to know if your rendering with 8bit maps.<HR></BLOCKQUOTE>
I'm generating 16-bit grayscale TIF maps and using those in Vray. It's definitely something Zbrush is doing because I've taken the maps into Photoshop for closer scrutiny and I can see the banding in them (have to use non-tiled UV's to see it best). I'm back to thinking it has something to do with the way Zbrush subdivides the mesh each time since that seems the most logical. Each subdivide is generating anomolies in the topology of the mesh and these are getting translated into the displacement map when generated. Seems to be hit or miss though; sometimes it does it, sometimes it doesn't. Haven't been able to figure out exactly what circumstances cause it to happen though.
Cezar Souza
04-09-04, 03:14 PM
Zeddicus, Try the following: Save the disp map in ZBrush as .psd. Open it in photoshop and save it as tiff. Don't ask me why, but works for me!! The Banding is gone!
Zeddicus
04-09-04, 06:25 PM
<BLOCKQUOTE>quote:</font><HR>Save the disp map in ZBrush as .psd. Open it in photoshop and save it as tiff.<HR></BLOCKQUOTE>
Gave your recommendation a try, but didn't work unfortunately.
Here is a super simple test anyone can do. All you need is Zbrush and Photoshop (or any graphics program that lets you load 16-bit grayscale files).
1. Select Sphere3D tool and draw it on canvas.
2. Go into edit mode.
3. Change initialize settings Hdivide 64 / VDivide 32.
4. Create a polymesh from the sphere.
5. Clear the canvas and draw the new polymesh on the canvas.
6. Enter edit mode, then subdivide the mesh until it won't let you anymore.
7. Switch to division level 1, then click the Uvs button.
8. Generate displacement map, export it as a TIFF or PSD, and load into Photoshop.
See the banding? Look closely, it's there as horizontal lines that are parallel.
visualboo
04-21-04, 01:25 PM
As far as I can tell the best way to get the best results and minimal banding is to use the level 1 cage model for your base model in another package. IMO that's one big drawback. That means I need to have 100% of the modeling done before I can hand it off to the rigger.
Skycastle, just out of curiosity, could you explain your zBrush workflow at weta?
skycastle
04-22-04, 12:41 AM
I have a silly question.
Is your monitor set to display "true color".
Also have you rendered the maps out as
displacements or bump?
I am awear that you can have banding is the
diff between your loRes and high on one vertex in the mesh is very extreme??
Can you post a map so we can see it?
visualboo
04-22-04, 08:04 AM
I have a silly question.
Is your monitor set to display "true color".
Yes, and even if it was 16bit the displacements wouldn't show the banding unless it was in the map itself.
Also have you rendered the maps out as
displacements or bump?
If what you mean by bump a normal map, then I'm just using the displacement feature. I didn't want to waste my time with normal maps until I get these issues out of the way.
I am awear that you can have banding is the diff between your loRes and high on one vertex in the mesh is very extreme??
Does not compute ;)
Can you post a map so we can see it?
How about this?
Right click ans save as - 5mb Techsmith codec avi (http://www.visualboo.com/misc/banding_issue_02.avi)
The reason you are seeing banding in photoshop may be because even if you can open and edit a 16 bit grayscale image your graphics card still displays it at 8 bits unless you have 64 bit color but im not sure. ;)
I think I remember reading somewhere on the vray forum that the banding is caused by a limitation in the 3d mapping algorithm. I do not get the banding with 2d mapping but always with 3d.
Zeddicus
04-22-04, 03:06 PM
I agree, the 2D setting is definitely better than 3D as far as the Vray modifier goes. At least from my bit of on and off testing anyways. With 2D the banding can usually only be seen on the actual displaced areas. With 3D the stairstepping can be seen happening over the entire model. Regardless, in either case it only happens sometimes and pinning down the type of model and exact circumstances under which it does and does not happen, and whether it is Zbrush or Vray causing it (probably both), is the real issue that no one seems to be able to answer. I've pretty much given up for now.
I was pretty excited about displacement mapping ever since I read about it in summer of 2003, but I think perhaps it still needs a bit more work among other things (Game assest creation (http://www.pixolator.com/zbc-bin/ultimatebb.cgi?ubb=get_topic&f=4&t=001358) is another good thread for example). I was also excited that Zbrush was going to be coming out from the shadows to be considered for once a serious tool that could be used in a pro oriented production role. After all, it's an awesome tool that deserves to finally be taken seriously by the industry. And while it seems to have hit fairly close to the mark with the recent release of Zbrush 2.0, my feeling is that it is still not quite "there" yet (please don't get angry at me everybody, it's just the way I feel sadly enough).
visualboo
04-22-04, 03:22 PM
<BLOCKQUOTE>quote:</font><HR> Regardless, in either case it only happens sometimes <HR></BLOCKQUOTE>
Mine does it with every model. What I did notice is that it's more visible in the displaced render depending on how you set your scene up. Whether you used an exported mesh with cage turned on and so on.
ambient-whisper
04-23-04, 05:53 AM
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.
visualboo
04-23-04, 08:41 AM
Ok, at least I'm not goin nuts ;)
I'm still going to run those maya tests to see if it handles the banding better than max.
ambient-whisper
04-23-04, 10:17 AM
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
Zeddicus
04-24-04, 12:54 AM
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.
skycastle
04-24-04, 07:04 AM
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 http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1082815428vhu.jpg
Zeddicus
04-24-04, 10:28 AM
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...
Stephen Green
04-24-04, 11:11 AM
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
ambient-whisper
04-24-04, 03:09 PM
it actually happens before the tiff file export. if you examine the disp map within zbrush you will see the banding there too. :)
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 )
Stephen Green
04-24-04, 04:20 PM
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
ambient-whisper
04-24-04, 04:43 PM
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. :(
Pixolator
04-26-04, 06:09 AM
Hi,
I see that some explanation is in order :)
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 )...
http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1082942867xsc.jpg
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...
http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1082942904eiu.jpg
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 :)
-Pixolator
P.S> I will post the test files by tomorrow.
Cezar Souza
04-26-04, 07:35 AM
The master has spoken. All our doubts and fears shall be gone! http://www.cgtalk.com/images/smilies/notworthy.gif http://www.cgtalk.com/images/smilies/notworthy.gif http://www.cgtalk.com/images/smilies/notworthy.gif
Zeddicus
04-26-04, 10:45 AM
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. ;)
Zeddicus
04-26-04, 12:05 PM
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? :p
Stephen Green
04-26-04, 01:48 PM
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
Zeddicus
04-26-04, 11:38 PM
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!
Zeddicus
04-26-04, 11:58 PM
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! ;)
http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1083050869tix.gif
What kind of results do you get using mental ray in max if you have tried?
Zeddicus
04-27-04, 12:30 AM
Haven't tried Mental Ray yet, but I suppose I could. Not sure the results would be the same since Vray and MR use two very different methods for displacing meshes, but it's worth a go I guess.
Zeddicus
04-27-04, 12:46 AM
Here is the Mental Ray render result from using the identical files that I used for doing my Vray testing tonight.
http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1083051900qgt.jpg
Interestingly enough, turning the blur setting down to 0.01 in the material editor didn't help at all as it does with Vray. Besides the banding, I'm sure my MR render could be a bit better, but I didn't want to balloon the render times. Plus I couldn't figure out how to get both negative and positive displacement on the mesh at the same time with MR. Anyone know?
I think you can adjust the rgb offset in the bitmap output options something like a value of -0.5 (not sure exactly) to get values below the neutral gray in to the negative.
Zeddicus
04-27-04, 01:00 AM
Yeah that's what I did, and while it's the right way to make ZB's middle grey turn black so that it registers in MR as no displacement, you still only end up with positive displacement and not any negative at the same time unfortunately.
Trogwart
04-27-04, 01:04 AM
Zeddicus, thanx a lot you have found the reason...
But! Try to increase subbdivision and banding will return... i thank banding is a consequence of big diffirence between resolutin of model (after render subdivide it for displace) and map. All the filtering stuff is made to adjust it...
nevertheless, there is a problem: try to test detailed map and you method, 4X4 thousand for example.
Zeddicus
04-27-04, 01:14 AM
Trogwart: My displacement map was 2048x2048 16-bit and my model was a sphere orginally made in Max (16 segments, 100 units in diameter). I will play around some more and try to see what you've mentioned.
Edit: Ok, just quickly tried renders (using the above) at 32, 64, 128, and 256 subdivision (3D mapping mode). With the blur set to 0.01 I wasn't able to make the the banding reappear.
Trogwart
04-27-04, 01:22 AM
Ok, i'm playing around too, and i found interesting thing just now.
If your model have less resolution (for example 1 level mesh smooth) and the displacemet resolution set high values (512 for example) you have banding independently from filtering (no bluring make banding more sharp only)
If you set higher resolution on model (maybe 3 levels ms) and low displacement res (32, 64 something like that) no banding!...
(it was all about 2d displacement, but i suspect 3d will be the same)
Is there any ideas?
Just tested and I do seem to be getting both positive and negative with a -.5 offset.
Started with a 50% gray image and it barely moves when displaced compared to non-displaced.
Then I added a darker value to that and it shifted inwards.. the 50% areas stayed the same.
Then I added a lighter value and it shifts out above the 50%.
I do however get the same banding on displacements :confused:
Zeddicus
04-27-04, 01:30 AM
Trogwart: I have noticed that when setting the resolution high in 2D mapping mode, regardless of the mesh smooth iterations you might see jaggies around displaced areas. This sin't the same thing as the banding and is independant. Blur has no effect on it either. I think this is something particular to Vray. About the only thing you can do is lower the resolution so that it is mitigated some what, but not so low that you start getting anomolies in your mesh (like black speck or streaks for example).
Moob: Try increading the displacement ammount and doing a render with MR displacement ticked to off in the material editor, then do a second with it on. That will give you a better idea as to what is happening. As far as I can tell when the offset is set to 0.0, 50% grey to MR is 50% positive displacement. Setting -0.5 offset shifts everything in the bitmap down by half and makes the 50% grey look like a 0% grey (black) and this renders the same as when displacement is turned off for me. (Edit: Just made a 50% grey map in Photoshop and did the test I just recommended to you for my own peace of mind. It would seem black is indeed 0% displacement and white is 100% displacement, meaning no positive and negative displacement at the same time.)
Trogwart
04-27-04, 01:44 AM
Can you post the best settings you adjust for perfect result for high-res maps?
I'll try it on this null http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1083055293xcq.jpg
It is a screen from Zbrush a model i would try to reproduce with vray, i will be a battle-field test. There is a test region on the surface, that will show if displecement would be blury or low res and not perfect.
Yeah that was my point :p but values below 50% on the map are still showing up after being shifted -.5 and they become negative displacement.
Zeddicus
04-27-04, 01:52 AM
Moob: Ah, my apologies. I see now, your right. Sneaky... :p
Zeddicus
04-27-04, 02:01 AM
Trogwart: I really don't have any "best" settings for Vray displacement. I just play around with the various values until I get something that looks right, or as close to it as possible.
grassynoel
04-27-04, 02:03 AM
One of the guys here has a maxscript that reads the offsets contained in the displacement map and sets up vray displacement to the correct amounts automatically. I'm trying to get him to post it. It's very nice tho have any guess work taken out of the + - amounts.
Glenn
Trogwart
04-27-04, 02:09 AM
And it appears you can use only 3d mapping in vray disp with zbrush (2d dont understand UV mapping from zbrush)...
Zeddicus
04-27-04, 02:55 AM
grassynoel: I've noticed the scale of the mesh affects the displacment amounts. A small mesh requires small numbers and a large mesh large numbers. The script should be interesting, though with Vray as fast as it is playing with the initial settings isn't all that bad. ;)
Trogwart: Here is a quick test on an old Z model of mine. The UV's are AUV and the model+map was rendered with Vray (2D displacement mode), so you can see they do work together properly.
http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1083059661sef.jpg
Trogwart
04-27-04, 03:01 AM
Yees!
It works!
No @##$ banding.
Zeddicus, respect..
http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1083059742rkh.jpg
4000x4000 disp map, all details are visible.
some artefacts but it works!
Configurations:
3d mapping,
amount 40
shift - 20
face subdivs 8
base model has 16000 polys+ 2meshsmooth.
In result we have model that can be rigged (try to apply skin and bones to a million polys model,he he) and all details are present.
Trogwart
04-27-04, 03:08 AM
Zeddicus,
2d + AUV vorks? hmm, i tried and get bugy displace placement...map was vertical flipped, all done but didnt work... :(
i also tried spherical mapping - didnt work too. (strange bug - all image are dark and deformed).And if you apply then spherical maping in max - it works, but wrong position.
2d much faster, i'll be beter to use it.
grassynoel
04-27-04, 06:11 AM
His script takes the scale of the mesh into account and accuately sets it up no matter what.
Glenn
dragonfly2004
04-27-04, 07:56 AM
please please where is this script???? :)
it drives me crazy to find the correct parameters for the displacement strength. :(
Zeddicus
04-27-04, 11:04 AM
grassynoel: The script sounds really great and will be a wonderful benefit for all I'm sure. Maybe he needs an incentive to release it? Cash? Girls? Cash and girls? ;)
Trogwart: Yeah, sometimes wierd things happen with one type of UV's and not another. My head originally had spherical mapping but that didn't render very well at all (much like you describe). I went back and redid the test with AUV's and then it worked fine. Could also be I screwed up a step or did something out of order, which is what I usually assume (and I was tired at the time). Thankfully things tend to be easy to redo with ZB as long as you saved your finished muti-res tool and also still have the original OBJ you imported (that is if your original mesh was made outside of ZB of course).
Trogwart
04-27-04, 11:53 AM
heh, 2d with AUV works fine too... appears it was just imported incorrect. Sorry.
2d maping disp is really faster but pictures are practicaly the same.
http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1083091972kra.jpg
Zeddicus
04-27-04, 12:10 PM
Beautiful model and render! Congrats, I'm happy you managed to get things working the way you wanted. :)
egomaxim
04-27-04, 12:10 PM
zeddicus your topic has actually 81 replysˇˇˇ can you make a update-resume of your main points?
thxs
Emax
Trogwart
04-27-04, 01:06 PM
Zeddicus, thank you.
And one question not for the topic exactly, but actual for them who whants to render not in Zbrush
Is there any metod to bake cavity to the texture? Im fond of it, it makes render more realistic, imitating dirty.
Zeddicus
04-27-04, 02:06 PM
Trogwart: There are a couple of threads in the official Vray forums where they talk about Zbrush's cavity shader and ambient occlusion. You might want to take a look at those. I wasn't paying close attention myself and could be wrong, but it sounded to me as if implementing it as a Vray shader might be a simple matter for future versions which would be cool.
egomaxim: "update-resume"? As far as Zbrush maps in Vray & MR are concerned, the culprit was the default blur setting (1.0) in the material editor in Max. Turning it to 0.01 fixed the banding in this particular case for Vray, but not MR which seems to ignore the bitmap settings in the material editor.
Vray (animated GIF):
http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1083050869tix.gif
Mental Ray:
http://www2.zbrushcentral.com/uploaded_from_zbc/200404/user_image-1083051900qgt.jpg
Frenchy Pilou
04-27-04, 02:59 PM
When you make a displacement Map entierely in Zbrush, is all these little disagrements exist or not ?
Pilou
Fouad B.
04-27-04, 07:59 PM
Another tips about the bandwidth,
convert your grey mode tiff to rvb mode tiff.
that's it.
3dsmax import your pic in rgb. I think that is the reason.
Zeddicus
04-27-04, 11:46 PM
Fouad: I'm not sure I understand your post. Could you please elaborate a bit more? Thanks.
Frenchy: I'm not sure since all my testing has been heavily focused on Vray displacment. ambient-whisper seems to have done more in depth testing in regards to applying disp maps to tools within Zbrush, so perhaps he will jump in here and say.
Fouad B.
04-28-04, 05:27 AM
Zeddicus, I say simply that if you have of the problems of level of gray, converted your tiff which is in level mode of gray, to mode rvb, and that will make disappear the bands.
Zeddicus
04-28-04, 01:49 PM
You've said RVB twice now. I'm afraid don't know what that is, and I couldn't find anything on it. Do you mean RGB... wait oh duh. Just dawned on me while typing ths post. You mean Rouge Vert Bleu (Red Green Blue) don't you? I feel so silly now. I thought maybe RVB was some special mode in Max I'd never heard of or something. Just a sec while I test, lol...
Ok, I just used PS to convert the 16-bit greyscale map to 16-bit RGB, but banding still happened based on the default 1.0 blur setting in Max. A blur setting of 0.01 fixed it again with the color version of the map. Just for kicks I also tried converting to an 8 bit color map. Still get banding of course, but it's diffused and bumpy like the skin of an orange which is kind of cool. ;)
Yeah it wont increase the range just converting to rgb. I think this was a fix for maya and xsi because mental ray cant handle 16-bit grayscale tiffs. 3dsmax however will pass the image as raw if mental ray is unable to use it.
Stephen Green
04-28-04, 03:18 PM
Zeddicus,
you mentioned that you can turn banding on and off in the sample model thread, what was the actual solution? Was it turning filtering off in the bitmap?
Thanks
Zeddicus
04-28-04, 03:38 PM
It was the default 1.0 blur setting in the material editor when loading a displacement map. Depending on a few factors (2D vs 3D mapping for example), you may or may not see banding even with a blur setting of 1.0 (increasing it a bit can make it come out more clearly if thats the case). Change it to 0.01 and the banding will go away. For the most part I leave filtering on in the material editor and the Vray modifier since I seem to get better results than off.
dragonfly2004
05-03-04, 08:11 AM
@grassynoel : will your friend make his script vor vray public?
could be a great help.
emihich
09-28-04, 07:15 AM
I had a lot of headache and had this result with Max displace native modifier.
I followed the instructions to use VRay displacement Mod but , no matter
seting all the sugested amount Shift values.THE RESULT IS A MESSED UP
MESH OR A BLACK SCREEN.
I tested with other files and Vray worked fine for displacement.I am probably doing something wrong.Can someone help or share a successful Vray
displacement Max 6 file with me?
emihich
10-15-04, 03:12 PM
displace_nightmare.JPG :evil: Ok!All right .Nobody out there hummm.
:( :qu: Well, this time I am really in trouble.
I exported thousands of Alpha test maps and could not get a single decent displacement in Vray , or with displace modifier.They have all kinds of weird
results.I am thinking already , it is not simple to use displacement maps, and
well if I export the subdivided model the heavy file will crash or freeze my system.
When I finnally got what should really be easier to get, There is a curious
artifact , that the original Zbrush model does not show.See picture above.
Please Pixolator , have pity and help I am strugling for weeks now!
Yes I researched a lot and tried everything before writing.
How can I edit this thing out of my displacement map?
Luiz Mihich
It looks like the high displacement values have been clipped. You may be able to prevent this clipping by readjusting your import or displacement modifiers in Max. If you've taken the map through a 2D image editing application, that software may also have readjusted the displacement values which in turn resulted in this clipping.
Fouad B.
10-15-04, 03:37 PM
I never have these level value...
5 and -1....
In my setup allways, the negative value is the half of positive value.
emihich
10-15-04, 05:25 PM
Thank you Aurick, for the quick reply.
As a matter of fact , I imported 2 versions of displacement maps .
One of them was exactly what ZBrush created and exported as alpha
displacement , but the other was a heavily contrasted one that I retouched
on a very obsolete Photoshop 4.0 light version ,( I altered the levels of the
image), but this is the map you see above and the displacement , at least
happenned, I had similar result with Max displace modifier.
I am aware tht I shall use always half negative shift values,so I was
surprised to see -1 worked much better than -2,5 for instance, but the
mesh shrinked rather than deformed with the last value apllied.
I also played with output values inside material editor .Something is really
wrong,and if it is not asking too much could you give me step by step
advices from exporting displacement maps to Max until render the instance map already inside Max 6.0 interface ?:o :tu:
Fouad B.
10-15-04, 05:33 PM
have you considering that little video (http://www.zbrushcentral.com/zbc/showthread.php?t=20869) demonstration ?
look at below on this thread, the first link don't work
emihich
10-15-04, 06:37 PM
I watched once , long ago but it is worth taking another look , and
read all the threads.I exported my model as .obj usingguv tiles , but maybe I should try with other kind of zbrush coordinates , I used group and not merge option too.
I did not edit my alpha displacement map on Zbrush.
Many details can be responsible for the clipping .
Thanks.I will try hard to solve this misery and will publish conclusions here.
Luiz Eduardo:b2:
... pleaz guys post some DIRECT LINX to this exporting plugins ...
... i loose a lot of time to read some uselezz posts :mad: ...
max6 cant import also .dxf stuff from zbush ... ( amazing )
i`m new in zbrush but if you got time 2 luz => http://www.deviantart.com/view/11636264/ <=
regardz-z-z :mad:
http://www.habware.at/ contains the OBJ2Max and Max2OBJ plugins needed for versions 3.x,4.x,5.x and 6.x of 3D Studio Max.
ChekbooM
12-17-04, 03:09 AM
Hi all!
I continue this thread to bring some new information I found on a discreet forum.
It's about the banding issue that a lot of people (including me) had when trying to render a diplacement map with 3dsmax 6/7 and mental ray.
So here's the solution,you just have to change the Blur offset from 0.0 to 0.001 in the map settings of your displacement map and the banding goes away!!! That's it :)
To show you the result with some renders :
before
banding01_1.jpg (http://javascript%3Cb%3E%3C/b%3E:zb_insimg%28%273971%27,%27banding01_1.jpg%27, 1,0%29)
after
banding01_2.jpg (http://javascript%3Cb%3E%3C/b%3E:zb_insimg%28%273972%27,%27banding01_2.jpg%27, 1,0%29)
and a close-up on the neck area:
before
banding02_1.jpg (http://javascript%3Cb%3E%3C/b%3E:zb_insimg%28%273973%27,%27banding02_1.jpg%27, 1,0%29)
after
banding02_2.jpg (http://javascript%3Cb%3E%3C/b%3E:zb_insimg%28%273974%27,%27banding02_2.jpg%27, 1,0%29)
voila!
I hope it helps some of you!
Alex
i think to leave ZBrush ;)
both formats .dxf and .obj are useless :cry: ... no way to import something in max 6 :cry:
DXF imports natively, but is not a very robust format. You want OBJ. Search google for the free "Habware" plugin to import into Max 6.
Of course, if you're willing to give up on ZBrush without so much as asking how other Max users have solved the same problem, it was never a priority to begin with. Move on, and enjoy your life.
obskure
04-13-05, 05:03 AM
I couldn't get rid of the stepping #@#$.
Then I started with a new model in Zbrush. Created a displacement map. Imported the mesh into max, applied the displace mod with texture. Hey Presto no banding.
I'll get to the point. I was doing something dumb in Zbrush. After creating displacement map I was hitting Make Tx from Alpha and exporting the displacement map from Texture drop down. This made my texture 8-bit instead of 16-bit. DO NOT DO THIS. Export directly from Alpha menu as 16-bit.
For anybody as dduuuhhhh as me this might help. Maybe I should have read the tutorial first.:confused:
obskure
04-13-05, 05:07 AM
Maybe download wings (its free). Take your Zbrush model into wings and export it from wings as 3ds.
I haven't tried it and I figure you will be annoyed at me if it doesn't work.
i try :: silo ? or :: modo ? ... not so sure ... they can read zbr2 .obj files :p
dxf ( drawing exchange format ) is stuff of autodesk , but no one of their softs cant import .dxf from zbr2 ... and problem is not in autodesk ...
thanx for support :lol:
DocTiki
07-19-05, 09:58 PM
Can anyone point me to a good step by step tutorial for zbrush -> Mentalray displacement? I've already figured out the regular meshsmooth+displace modifier method, but it's too slow and my computer keeps running out of memory, causing Max to crash. I've got the displacement in a mentalray material, but I cant get the orientation right at all. Help?
where i can download those plug-ins , i try to combine Zbrush with 3DstudioMAX 6 but result was disgusting :cry: ... so i wanna try on 7th version
cledman
05-12-07, 01:00 PM
hi guys!
So. i'm in trouble with displacement map.
I started my model with zsphere. After I tranformed that to polymesh, I exported that to 3d Max . Then, after some tweaks, I exported the final model to Zbrush to start high detailing. The first picture, shows the final model in zbrush.
http://img337.imageshack.us/img337/8335/img01ll3.th.jpg (http://img337.imageshack.us/my.php?image=img01ll3.jpg)
I down to subdiv 1, and exported the lowpoly and bring that to Max. Everything ok until here.
I exported the texture and flip the "V" with -1 value in max, and, everithing ok. The texture fit fine!
So on, i created the displacement map, exported that as tif, psd or even bmp, but, when I put the vrayDisplacementmod, I have a lot of problems. You can see that in the picture below.
http://img259.imageshack.us/img259/4504/img03xu8.th.jpg (http://img259.imageshack.us/my.php?image=img03xu8.jpg)
I tried to apply the AUV, GUV, and others to export the displace map, but nothing seems to work.I already read a lot of methods to do that, but I dont know what else could i do...
I'm getting frustrated about that. Can anyone please, give me some idea?
Thanks!
le_miere
10-21-07, 05:33 PM
I've really found this thread useful in working out how to use ZBrush generated displacement maps in 3ds max & VRay. The following is a link to my notes on how I matched my ZBrush model with a displaced model in 3ds max, rendered with VRay:
http://www.lemiere.com/tutorials/tutorials_zbrushTo3dsmax.html
The great thing about VRay is that it seems to apply a Filter blur of 0.001 by default. However, interestingly and perhaps someone might know why, I found that like Mental Ray, applying an RGB Offset of -1.0 to the Bitmap reduced clipping and produced the best results.
cledman
10-22-07, 03:50 AM
hi!
thanks, but i've solved this problems with some few setting in mental ray.
It was about the grayscale values.
thanks a lot!
Powered by vBulletin® Version 4.1.11 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.