|
|
Reply Quote UserGallery ThreadGallery Post#1 |
|
Senior Member
Join Date: Dec 2005
Posts: 142
|
I've seen many people are using Mental Ray (MR) in 3DsMax for rendering stuff exported from ZBrush.
I also noticed many aren't really aware of the meanings behind the numbers and are getting partial quality renders as a result (or wasting time findling with numbers and not getting optimal time/quality renders). Thus, having not seen a similar post, I decided to try helping out with this humble explanation. It's not really ZBrush, but I think the ZBrush community can benefit from it. If anyone has anything to add to what I wrote, or if I was wrong about something, please do comment. How does displacing in MR work? Upon render, MR subdivides every piece of geometry to which a displacement map is applied (process 1). Each polygon (from the now subdivided geometry) is assigned a value which is the average of the displacement maps pixels on it (process 2). Now MR shoves each polygon in a vector (process 3) - the direction of which is the polygons normal, and the length of which is the calculated result of several parameters - one of which is the value assigned to the polygonin process 2. So this deforms the geometry in accordance to the displacement map. Now let's go over some of the settings and see how they correlate to these processes: Edge length and Max. Subdiv (or Max. level, in Max 8) - These two parameters eventually determine the quality of the displacement (granted the displacement map's resolution is not the bottle neck). In process 1, MR subdivides the geometry n times, n being any number from 0 to the Max. Subdiv value*. MR determines n within the written above boundries by taking the edge lengths value** and trying to match the polygon SIZE to it. The smaller this value, the smaller MR will want the polygons, and the more it will subdivide the geometry. This means that the denser your original geometry, the less MR needs to subdivide it to get to the edge lengths value***. It's also important to note that having a very low resolution piece of geometry would pose a problem, since MR can only subdivide up to 7 times which might not be enough to get good details out of a, say, 4 polygon plane. Smoothing - this is MR's equivalent to ZBrush's 'Smt' button in the geometry panel. It determines whether to smooth the geometry when subdividing it, thus rounding it by averaging it out (as 'TubroSmooth' or 'MeshSmooth' would), or to simply tesselate the polygons and have the geometry remain virtually unchanged (as dividing a tool in ZBrush with 'Smt' off would). TURN THIS OFF when using displacement maps generated in ZBrush. The displacement maps ZBrush generates regard the base object as it is, and not as it would be had it been subdivided and smoothed, they contain displacement information for smoothing the object. If you'd have MR smooth it as well, you'd be doing the smoothing action "twice", once in process 1 (the subdivision itself), and once in process 3. This brings unwanted results, of course. Max. Displace - this value simply determines a global cap for vector length in process 3****. Here are the settings I use to get the best out of my renders: View - On. Smoothing - Off. Edge length - 0.5 (this is in pixels, and is good to put on lower than 1 - this way it works a little like displacement antialiasing). Max disp. - Depending on project. Max. Subdiv. - Depending on geometry resolution - too low would result in insufficient detail, too high would prolong render time and add not necessary detail (depending on other settings). That's more or less it. I've left a lot of things out and simplified some other things in order to make this more comprehensible, so any questions are welcome. Hope you enjoy it. Dave. * In Max 8, this parameter goes from 0 to 7, and indicated the number of times each polygon can be subdivided. In Max 9, the value indicated the number of polygons it can be subdivided into. Since each subdivision divides each polygon into 4, a subdivision of, say, 5 (in Max 8) would divide a single polygon into 1024 polygons - hence in Max 9 the corresponding value to 5 would be 1K. ** The edge length value is either in Pixels (which means it is in adaptive to the objects size in pixels in the rendered image - if an object is small in the frame, MR will subdivide it accordingly and save time) or in absolute length (I'm not sure if it's according to world units, or MR's own units), and this is set by the 'View' checkbox. Leaving it on (meaning pixel value) should be optimal in most cases. Please correct me if I'm wrong. *** This doesn't decrease render time however (save for extreme cases) since MR still has to divide a large number of polygons to get to reasonable detail. The initial couple of subdivisions are fast since a relatively small amount of polygons is divided - it doesn't matter much if this process is done to the geometry using a modifier, or in render time by MR. **** I'm not sure what unit it works in. I think it's MR's very own internal unit system. It corresponds with the displacement strength values in MR's displacement maps, which are, by the way, 1/10 from Max's standard materials displacement channel value. P.S. If you plan on experimenting with settings, I recommend going to Customize>Preferences...>Mental Ray (tab)> uncheck 'Clear frame window before rendering'. This will remove black lines in the VFB and allow for proper image comparison when rendering. It also saves each files last VFB. Last edited by Opeth : 08-11-07 at 01:18 PM. |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#2 |
|
New Member
Join Date: Jun 2007
Location: Rehovot
Age: 26
Posts: 2
|
thanks man, this really cleared some issues for me,
and the tip about the 'clear frame window..' rules! good job. |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#3 |
|
Member
Join Date: Sep 2005
Posts: 99
|
Thanks for the explanation.
Just out of curiosity, what setting do you use when exporting the displacement map in zbrush 3.1? |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#4 |
|
Senior Member
Join Date: Dec 2005
Posts: 142
|
Well, I assume you're referring to multi displacement, which I must admit I haven't gotten the opportunity to play with yet.
Jason has a video tutorial for it though, which again, I must admit I haven't yet watched, but I trust it's inclusive and comprehensive as the rest of his tutorials. Here's what he posted: http://209.132.96.165/zbc/showpost....51&postcount=12 Go Jason! ![]() |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#5 |
|
Senior Member
Join Date: Jun 2001
Location: Venezuela
Posts: 6,025
|
Thanks for the very didactic explanation and also for the tips!
I was looking your website and is very well design, the music is sweet! Congratulatins for that! Andreseloy |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#6 |
|
Senior Member
Join Date: Dec 2005
Posts: 142
|
Thanks man, I'm glad you enjoyed my site and I hope the explanation helped you as well, even though I suppose you're better familiar with this than I am.
|
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#7 |
|
New Member
Join Date: Jan 2008
Posts: 27
|
Hey there Opeth,
thanks a lot for those explanations! Unlike other guides, your writings actually help understand to make own decisions. I have yet to render a good looking displacement mapped model, but your tips here surely helped me understand some more. Cheers, k.
__________________
Brushing my teeth this morning, I wondered for what reason I had turned off x symmetry in the first place. |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#8 |
|
Senior Member
Join Date: Dec 2005
Posts: 142
|
Glad to help.
I actually should update this with some new information I've learned, but I guess that won't be soon.. |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#9 |
|
Senior Member
Join Date: Mar 2008
Location: Southern California
Posts: 303
|
wow, this is pretty great. can you do something similar for rendering game spec characters with diffuse/normal/spec using mental ray in 3dsmax?
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|