1. #1
    Member Follow User Gallery
    Join Date
    Aug 2005
    Location
    Chicago
    Age
    45
    Posts
    71

    Default Tutorial: Rendering 32-bit displacements in Renerman for Maya 1.1

    Hi, All

    I recently purchased Renderman for Maya, and have been trying it out with Zbrush generate displacements. Though, I'm still having some issues with getting pore level details to render, and an ocassional AUV seam plroblem. I think I've puzzled out a workflow that seem to work so far. Since I haven't seen any posts on this "new" rendering option; I decide to post up my findings.


    Creating Displacement Maps in Zbrush
    :


    1. Use the Multi Displacement 2 (MD2) plugin, it generates a 32-bit displacement maps that are exported with their scale baked into them, eliminating the need to record an alpha depth factor. Since RenderMan For Maya can render 32 bit floating point images very quickly, there is no reason to not use the plugin; especially since the 32 bit maps hold far more info than the 16 bit versions.

    2. Select the D32 option and enter the DE-LBEK-EAEAEA-D32 Quick Code. This is a 32-bit export options designed to work with Maya. Click Close.

    3. You may now switch to your original morph target and/or generate your mesh based on subdivision level 1.

    4. Click the Create All button in the MD2 menu and ZBrush will ask you for a destination folder and base file name, and automatically export the map based on these settings as it works.

    Rendering Displacement Maps in RfM:


    1. Import your low resolution mesh into Maya; go to File>Import and select OBJ for file type. Make sure that Create Multiple Objects is set to false on this screen. Always be aware of vertex order and the importance of maintaining it between applications.

    2. Witht the mesh selected, go to Modify>Convert>Polygons to Subdiv; to convert the mesh into a subdivision surface.

    3. With the mesh selected press Ctrl+A to open the attribute editor.

    4. Since RfM automatically tesselates subdiv and nurbs surfaces, so you do not have to uncheck feature displacement on the meshes shape node, you also do not have to make any adjustments to the shape nodes tessellation sample count simply leave it at its default value.

    5. Open Hypershade by going to Window>Rendering Editors>Hypershade.

    6. Create a Lambert material by dragging it to the workspace from the left side window.

    7. Middle-mouse-button drag a displacement node over it. Select Displacement Map from the connection editor window that appears.

    8. Double click the displacement node to open the attributes.

    9. Click the checker box (to the right of the Displacement entry box) and select the file from the popup window.

    10. In the file node we will add our displacement map. It should open automatically when you click the file button but if not double click the node in the hypergraph.

    11. Click the folder icon to the right of Image Name to browse to the displacement map.

    12. Open Color Balance on this screen and set Alpha Gain to 2.2 and Alpha Offset to -1.1.

    13. Go to Window>Rendering Editors>Render Globals to open your render globals window. If it is not already set, choose Renderman from the dropdown box.

    14. Click Render View to see the result.


    Trouble Shooting: From the Rfm Docs:

    While RenderMan displacements are both detailed and fast, there are a couple of issues that you should be familiar with. The most important concept is displacement bounds. Displacement bounds set up a bounding box around the object, for use when the object is rendered. The bounding box determines when the object is loaded by RenderMan. If a displacement shader pushes an object outside of its bounding box, you will see that part of the displacement is being clipped.

    The solution in this case is to increase the bounding box. If you need to adjust displacement bounds, simply add the RenderMan displacement attributes to the shader. You can do this by following these steps:
    1) Open the displacement shader in the Attribute Editor.
    2) From the Attribute Editor Menu:
    Attributes-> RenderMan-> Add Displacement Attrs
    Now that you've added displacement attributes they will appear at the bottom of the shader under the Extra RenderMan Attributes tab. Open this tab and adjust the Displacement Bounds attribute. The correct setting will vary depending on the size of your object in world space. Generally, a good value to start with is the farthest distance an object may be displaced, as measured in default Maya units, and adjust from there. Note that too large of a displacement bound can cause an object to consume more memory than needed, so the tightest displacement bound possible is recommended.

    Test Renders:





    Note:


    If anyone has any corrections or additons feel free to post them!

  2. #2
    New Member Follow User Gallery
    Join Date
    Nov 2005
    Posts
    7

    Question problem with loading 32bit in maya

    hi;

    how did you load a 32 bit channel in maya???
    i get this info in Output Window:
    ERROR, D:/temp/new1001-D32.tif: TIFF image class not supported (must be 8 or 16 bits)

    and a lot of warning data in the script editor:


    ================================================== ==========================
    AEassignTextureCB file1.fileTextureName "D:/temp/new1001-D32.tif" "image";
    // Error: Image conversion (to IFF) failed //
    // Result: 1 //
    // Error: Image conversion (to IFF) failed //
    // Warning: Failed to open texture file D:/temp/new1001-D32.tif //
    // Error: Image conversion (to IFF) failed //
    // Warning: Failed to open texture file D:/temp/new1001-D32.tif //
    // Error: Image conversion (to IFF) failed //
    // Warning: Failed to open texture file D:/temp/new1001-D32.tif //
    // Error: Image conversion (to IFF) failed //
    // Warning: Failed to open texture file D:/temp/new1001-D32.tif //
    ================================================== =======================

    thank's

  3. #3
    Member Follow User Gallery
    Join Date
    Aug 2005
    Location
    Chicago
    Age
    45
    Posts
    71

    Default

    You can just ignore that error message. Maya does not natively support 32-bit images. So, Maya will not render them with the Maya software renderer, and you won't see the actual map is hypershade. But the map will load. As long as you have Renderman selected within render globals it should render; because the plugin is what actually reads the 32-bit file.


    Edit: Added a .pdf with a more detailed tutorial on displacement and subsurface scattering in Renderman for Maya.
    Attached Files Attached Files
    Last edited by Enigma; 01-01-06 at 12:52 PM.

  4. #4
    Member Follow User Gallery
    Join Date
    Aug 2005
    Location
    Chicago
    Age
    45
    Posts
    71

    Default

    Okay, here are some of my tests using the original Pixolator head. It uses a 16-bit map generated from the tool palette. With the this mesh I ended up using an alpha gain of 10 times the Zbrush alpha depth factor. so, if you want to try it out use a value of 8.34, not 0.834 for the AG; and -4.17 for the Alpha Offset value.

    You can find the mesh and displacement map here:

    http://www.zbrushcentral.com/zbc/sho...ment+rendering








    I have to say that I am very pleased with the ease and speed of this new rendering plug-in. Pixar really out did themselves with the level of integration it has with Maya.






  5. #5
    New Member Follow User Gallery
    Join Date
    Aug 2004
    Posts
    3

    Default

    Hi,

    As rachid, i have the same mistake loading the 32 bits maps.
    I understand that rfm support 32 bits, but i cannot render the file using renderman renderer.

    Any help please ?

    thx

  6. #6
    New Member Follow User Gallery
    Join Date
    Nov 2005
    Posts
    7

    Default error with 32 bits channel

    no progress!!! can't render a 32 bits chanel in rfm 1.1...so what's the problem?!!!
    can you send me your scene file with that 32 bits channel, i'am using Maya 7.01 and rfm 1.1
    thank's

  7. #7
    New Member Follow User Gallery
    Join Date
    Nov 2005
    Posts
    7

    Default now it's work

    hi
    now i can render the 32 bits channel with rfm 1.1 thank a lot!
    i have one question
    when u render a tif.32 bit channel with mentalray u convert it to .map file with imf_display utility, but the result with that converted file is not a 32 bit channel it's a 8 bit channel!!!
    thank's

  8. #8
    New Member Follow User Gallery
    Join Date
    Aug 2004
    Posts
    3

    Default

    Hi ,

    What did you do to render a tif 32 bits ?

    Can you send me too, an exemple.

    thanks.

  9. #9
    Member Follow User Gallery
    Join Date
    Aug 2005
    Location
    Chicago
    Age
    45
    Posts
    71

    Default

    Hi, Guys


    Looping - I'm sorry I can't post the file its over 8 MB's. Did you follow the pdf, it's pretty explicit. Tell me what specific step is giving you problems.


    Rachid - Yeah, MR map files aren't supported in Rfm; so you would need to generate a new displacement map in ZB. If you look in the bin file for Rfm you will find a .tex utility that converts .tiff files to Renderman's native format. Its not something that you have to do, as Rfm complies your shaders any way. But you can bake out you .tiff files as adjusted .tex files. So, now you have a displacement map that has its zero displacement point adjusted to Maya's format. If you do that you won't have to worry about alpha depth factors anymore.



    By the way you should start a new project and scene if you getting errors. I've noticed that the compiler sometimes hangs in the rendering stage. When you quit Maya and reopen the file, you have corrupted renderman shaders that don't always work very well.

  10. #10
    Member Follow User Gallery
    Join Date
    Aug 2005
    Location
    Chicago
    Age
    45
    Posts
    71

    Default Normal Maps

    Okay I've moved on from displacment mapping in RfM; I've got a system that works well for my needs.

    Anyway, I've moved on to rendering normal maps in RfM. For though interested you can find a ready made shader and detailed instructions here:

    http://www.drone.org/tutorials/rayDi...renderman.html

    Hopefully I'll have something worthwile to post tomorrow, from my experiments.


    Edit: I've given up on normal mapping in RfM, it makes sense to use them in Mental Ray or the Maya Software renderer; but renderman is so fast and accurate with displacement that there was no reason to use additional maps.
    Last edited by Enigma; 01-17-06 at 08:34 PM. Reason: Additional Info on Normal Mapping

  11. #11

    Default

    ok. so much thanks for your post!
    Last edited by grayscaledepth; 01-05-06 at 06:54 PM.

  12. #12
    New Member Follow User Gallery
    Join Date
    Aug 2004
    Posts
    3

    Default

    Yes,

    It works.....
    If i build manually the shader tree it works. (perhaps a maya problem)

    Thanks enigma for your help.

  13. #13

    Default question to AUV Tiles Border rendering

    i have one question.

    when i rendered with RfM , i found problem AUV Tiles Boder appear to renderd output.

    i tried to changed MD2 boder into 1 value, but still have same result.
    how can i solve this problem ?

    hope to reply from u soon.


    thanks a lot.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	boder.jpg 
Views:	957 
Size:	14.8 KB 
ID:	24277  
    Last edited by grayscaledepth; 01-05-06 at 07:29 PM.

  14. #14
    New Member Follow User Gallery
    Join Date
    Nov 2005
    Posts
    7

    Default rfm without subdiv?!!!

    hi,
    thank for help enigma!
    in general, the procedure to make displacement map in ZB is:
    import the model,do a morph target, subidivise, sclupt and generate a displacement at lower level than export both map and the low resolution model!!!
    once in maya
    if the render is rfm the model imported must be converted to subiv
    if the render is mray make Subdivision Approx in Approximation Editor
    and uncheck Feauture displacement in Displacement map (ctrl+a)
    and for Alpha Gain and Alpha Offset
    (file.alphaOffset = -file.alphaGain /2

    at this point all work fine!
    but what if i have already a smothed head model (14872 faces) textured and rigged for facial animation with complex combined blendshapes and expression ???? and i want just to add a 32 bit displacement map and render with rfm?
    do i convert my smothed model to subdiv??? of cource i can't!!!

    i'am not sure if what i did is true at 100%, but.....

    i think i don't need to reimport my model,i've one rigged in maya!!!
    so i've imported just that 32 bit map and applied to my existing model, also i've pluged normal map to the bump slot!! ( normally outColor of normal maps is connected to the normal camera of shader,but how use it with rfm that is a question?!!! )


    thank's again

  15. #15
    Member Follow User Gallery
    Join Date
    Aug 2005
    Location
    Chicago
    Age
    45
    Posts
    71

    Default

    Hi, Guys

    I'm glad that I could help!

    Rachid - Your in luck their is an easy way to do this!

    1. Select the polygon mesh, and hit ctrl+A to open you attribute editor.
    2. Go to attribute > renderman > subdiv scheme



    3. This adds an extra attribute that lets you decide to type of subdivision algorithm is used.



    4. Make sure that your displacement map is assigned and that you have correctly entered your Alpha settings.

    5. Render!

    The important thing here is that you don't have to convert you polymesh to a subD surface for renderman to slice the mesh up into micro-polygons for displacement. As a side note you could always add a rendermans subDiv attribute, rather than converting your polygon mesh to Maya. I tend to use subdiv conversion, as it eliminates the chances of non-quad and non-manifold geometry causing problem at render time. But other than that, I've tested the methods to be equally fast.


    PS. If you have any more questions, or problems I'd be happy to help.

Page 1 of 5 1234 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •