|
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
Reply Quote UserGallery ThreadGallery Post#1 |
|
Member
Join Date: Jul 2007
Location: London
Posts: 31
|
I've spent the last few months trying to find the best settings to render high quality 32-bit Displacement maps from Zbrush3 MD3 with Renderman. Finally it seems I've nailed it, I found it so frustrating that there was so little written about this topic, I had to find out mostly everything myself, I hope by sharing this knowledge I ll save some time for other artists.
Renderman has such a great potential when it comes to rendering Displacements, but its also extremely difficult to set up to get a high quality precise renders without seams. So here is the list, this isnt a complete guide, more of an update/correction to the old Zbrush to Renderman guide, also check out Scott Spencer's Zbrush to Maya pipeline for the maya import settings. 1) Tool: Displacement:SmoothUV, This is the single most important setting if you are using Rendertime SubD-s with Rfm, or using a Standalone Renderman renderer, as if this is not turned on the UV coordinates are not going to be interpolated as Renderman expects them. This will result in bad seam artifacts and generally a very poor representation of your hi-res model, as all the internal UV coordinates will be dislocated so basically everything will be moved off target. ( However if you wish to use basic Maya SubD-s with Rfm, then it Should NOT be turned on) (Smooth UV is a great addition to ZB3.1, this option wasnt working in Zbrush2 with MD2) 2) Tool: Displacement:Adaptive, Also highly important and must be turned on so your Displacements render precisely 3) Tool:Geometry:Cage: Another important setting, I found I get the best results from using the Cage, instead of the level1 or even a morph target( don't forget, if your character is already rigged you can always use this new geometry as a parallel blendshape) 4) Manual UVs: you must have high quality, relaxed, manually created UVs. I also use "Stretch to Square" option in Maya under Window/UVtexture Editor/Polygons/Layout UVs. This will maximize the space available, although this will distort proportions, but if you are painting your texture maps in Zbrush or any 3D paint package, it wont matter, and this will increase the practical resolution of your maps quite a bit. Renderman is super sensitive to UV seams, so its generally a good idea to have as few seams as possible, and try to hide them at places that arent visible. And this is also a good reason why you should avoid any automatic mapping such as GUV or AUV tiles. As although for still images AUV/GUV wont cause any problems, but UV seams MAY show up when animating with Motion-blur. Another tip: If you are mapping some simpler objects you could try to make all borders straight/perpendicular, this will also help to eliminate visible seams. 5) Hi-res to Low res ratio: be reasonable, if you are pushing it too far you will get cracks along seams as well as a general stretching around the UV border areas. This also highly depends on the angles you are displacing, like if its a simple shape, you might be able to get away with more extreme displacement, but if you are displacing something complex like a character, in my tests I found a good ratio to be a 8000poly lowres to a 2 mil hi res. Again this really depends on the type of character you are doing, but this is something important to keep in mind, always do tests before you start rigging, and if you followed all the other rules, and still get seams, then you might want to render from a higher level that you were originally planning for. 6) MD3 settings from top down: 0,1001,4096(or what you want), 100, 0, 8. These are actually the defaults. The most important from these settings is the Border and the Texture size. I did a lot of tests with this as well, and Border 8 is the best value, anything less may result in visible seams, anything more may be too much. As for the texture size its always 'the bigger the better' you will get more accurate more artifact free as you use larger and larger maps. 7) Quick Code: DE-LBEK-EAEAEA-D32, This is still the best quick code for renderman, I did some tests with A.D factor set to Off or Auto, but this resulted in a lower quality displacement. Seamless didnt seem to do much, Smooth just generally blurred the whole map, leave these settings off. 8) Merge UVs in Maya, Zbrush3.1 unfortunaly has a bug and will export your UV's all broken up into individual UV islands for each polygon. So when importing back to Maya, open up the UV texture Editor, and select all, and select Polygons/Merge UVs with a very low Distance Tolerance. See 4) why this may be neccesary. PS: I seen people changing the Color Balance in Maya from 2.2/-1.1 to 1/-0.5 for ZB3.1, but for Renderman I still got best results with the original settings. Last edited by midnightgreen : 09-07-07 at 08:30 AM. |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#2 |
|
Member
Join Date: Jul 2007
Location: London
Posts: 31
|
Although you can relax your UVs in a dedicated UV editing program, but I found this method of relaxing/evening out UVs in Zbrush better than the basic Maya Relax, this will help to eliminate artifacts such as spikes along UV seams:
1) export your lowest level of your Ztool that has UVs 2) in a new Ztool, Import it 3) Turn on Tool: Geometry: SUV, then Divide it once or more ( the amount of relaxation will depend on this, if you divide it more than once, you will relax more, i found dividing it to level 3 and above to be a good value, of course it depends on what was your level 1) 4) Go back to Level 1, then export it 5) import it back into your original Ztool( make sure you use a morph target before you do this, as this new Level1 wont be identical to your old Level1) Here is a screenshot of whats happening to the UV coordinates: I left this tip separate from the main post, as this isnt part of the 'core' tips. Also if anyone else has any comments/corrections please feel free to add it. Also additional tutorials/tips are welcome ![]() Last edited by midnightgreen : 09-07-07 at 08:37 AM. |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#3 |
|
Senior Member
Join Date: Nov 2006
Posts: 313
|
Extremely valuable advice!
Many thanks! ![]()
__________________
TheRazorsEdge "Knowing is not enough, we must apply. Willing is not enough, we must do." - Bruce Lee - |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#4 |
|
Senior Member
Join Date: Apr 2006
Location: Berkeley, CA
Posts: 182
|
Hey midnightgreen,
Thanks for posting this! I've been trying to figure out this puzzle myself for quite some time, although I just haven't had the time to do any in depth trial and error. The results from Mudbox or Cyslice's 32 bit displacement maps in PRman are astoundingly accurate and easy to use, so I've been dying to see if Zbrush's can compare, namely because of the extraction time involved. Zbrush's displacement extraction is incredibly fast (but this might be a disadvantage to Zb). Have you been able to compare these results with displacement maps extracted via raycasting, such as Mudbox? I'd love to have this area (32 bit displacement) a bit more documented by Pixologic. Also, I noticed that you are having trouble with Zbrush exporting your UVs unwelded. The fix for this is to open up the Export menu inside the Tool Palette, and check the "Mrg" button, which merges uvs on export. Might also be beneficial to uncheck the Grp button |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#5 | |
|
Member
Join Date: Jul 2007
Location: London
Posts: 31
|
Quote:
as i said this is where the ZB3 bug comes into play, it wont work, I already posted it in another thread. I heard good things about Cyslice's displacement, it was actually recommended to extract displacements for Renderman before Zb3.1 came along in this thread. |
|
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#6 |
|
Senior Member
Join Date: Apr 2006
Location: Berkeley, CA
Posts: 182
|
Ah, sorry about that. I didn't know it was broken in 3.1, what an unfortunate bug. I haven't used Cyslice personally, but a colleague of mine claims that its displacement extraction is even cleaner than Mudbox's, which has already proven to work extremely well. With the added benefit of being able to extract on the renderfarm, it sounds like the best option available. Price, however, is another story
|
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#7 |
|
Member
Join Date: Jul 2007
Location: London
Posts: 31
|
Yes I would like to see some comparisons, but to be honest I never used Mudbox, all I can say is that with Adaptive, SmoothUV and Cage turned on, you will get pretty damn close to what you see in Zbrush.
The screenshots I attached are from a Level2 2000poly to 2 Mil Hi-res displacement, with only a 2048x2048 map, and its in fact almost indistinguishable from the original.( bearing in mind that the screenshots are just from the head, and that had like only 500 polys, so its pretty damn impressive, how far you can push it with the right settings) The only reason why I will go for a Level3 (8000 lowpoly) for the final render, is because that even though 2000 is accurate enough for fine details, it still has most of the UV seams showing up. My only problem is that Dsubpix doesnt work with with Adaptive, there were some talks about this function to be implemented to be able to work in conjunction with Adaptive, but it seems it was never done after all. Maybe in the next revision of MD3 ![]() PS If you are loaded with RAM, then you can always 'fake' Dsubpix, just before creating the displacement maps, just subdivide your model once or twice more ( you will need a lot of RAM for that...) and then create the displacement maps. That will in effect have the same effect as if you would have used Dsubpix, but as i said you will need a lot of RAM for that. |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#8 |
|
New Member
Join Date: Dec 2006
Posts: 14
|
Hi, thanks midnightgreen for all this very valuable info. I`m trying to get 32bit map to render with RfM 2.0 but somehow it doesn`t accept them. I can render nice disp. with 16 bit tiffs, but with 32bit I have had no luck so far. RfM basically just does nothing. I tried it with really simple maps and objects but still no luck. Is there anything special I have to pay attention to? Thanks in advance
|
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#9 |
|
Member
Join Date: Jul 2007
Location: London
Posts: 31
|
Here is a Very short breakdown of my full Zbrush to Renderman pipeline,
1) Activate 'Cage' then Export out the .OBJ 2) Create Displacement map out of Zbrush as outlined in First post 3) In Maya import it (look at Scott Spencer's import settings, but basically just set "Create Multiple Objects" False, and Group to be 'off') 4) Select the Object, enter attribute editor, and add Attributes/Renderman/Subdiv Scheme 5) In Hypershade, create new material, click on the arrows to show the Input/Output connections, open up its 'Shading Group' in the Attribute Editor. 6) Under 'Displacement mat' click on the Checker, Then select 'File' 7) Back in the Hypershade double click on the "File" node, 8) Set Filter Type to "Off", under Color Balance set Alpha gain to 2.2 and Alpha Offset to -1.1 9) Finally under the "Image Name" select your .tif file. (at this point you may get an error message in the Output window saying that it must be 16 bits, but just ignore that, it applies to only the maya software renderer) 10) Drop the Shading Group onto your object Select Renderman for renderer and then hit Render... thats all there is to it, you dont need anything else, if you followed some other guide that may have been written for Mental ray in mind not Renderman and thats why it didnt work. PS: When attaching the Subdiv Scheme, you could also set Render Stats/Double Sided - off, it should save some rendertime. Last edited by midnightgreen : 09-10-07 at 04:55 AM. |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#10 |
|
New Member
Join Date: Dec 2006
Posts: 14
|
Hey midnightgreen. Thanks for those deailed instructions, not easy to find this sort of stuff. I got it working now (the 32bit ones) and rendering displacements in RfM is so mmmmhhh : ) yummy!
Thanks again! |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#11 |
|
New Member
Join Date: Mar 2006
Location: frankfurt
Age: 43
Posts: 7
|
Thank You midnightgreen for your instructions about displacments and renderman.
One little correction concerning point 8) Merge UVs in Maya Itīs not a zBrush 3.1 bug, you simply have to activate Mrg under Tool --> Export. By default itīs deactivated. Thomas |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#12 |
|
Member
Join Date: Jul 2007
Location: London
Posts: 31
|
3Dthomas: I have set this option on number of times and it was not always that it worked. Sometimes even if it was on, I had to merge them in Maya. In ZB2 it always worked, in ZB3.1 for some reason its a bit of a gamble. I just did a test and it worked, but then again I remember that last time it didnt, I even started a Thread about it, as I mentioned earlier.
But also I'm not saying that you should not set this on when exporting the Cage .OBJ, but its best to do a test when importing back to maya, just select a few verts and then click "select Shell" and if it doesnt select the whole thing then it didnt work, and you need to Merge them back together. |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#13 |
|
New Member
Join Date: Dec 2006
Posts: 14
|
I thought I got it working, but when I retried it ... : ( bad luck
I still get not get this 32bit thing going. I try to export it and than I have this 32bit RGB tif (correct? or rather grayscale?), which I load in Maya. But when I try to render it with RfM it says "conversion to iff failed". Now when I paint a dummy map in Photoshop I can render it fine. When I open the displacement map from zbrush in Photoshop and save it under a different name it renders fine??? Me feels very very dumb ![]() |
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#14 |
|
New Member
Join Date: Dec 2006
Posts: 14
|
One thing I have noted is that RfM got a map it doesn`t like, there is no use in trying to load another one, cause it will fail to render at all. When I assign a new map and restart maya, it renders the map fine.
|
|
|
|
|
Reply Quote UserGallery ThreadGallery Post#15 |
|
Member
Join Date: Jul 2007
Location: London
Posts: 31
|
buexe: i think you are dong something fundementally wrong.. it should not convert it to .iff. you are only converting it to .iff if you are rendering with mental ray, Renderman creates shaders in the Renderman directory and they have a file extension of .SLO i think...
Are you Sure-sure you are not rendering it with mental ray? Try unloading the mayatomr.dll plugin in the plugin-manager just to make sure you are not using it accidentally. |
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|