Want to supercharge your tech skills?
Digital-Tutors subscribers now get access to 1,400+ courses on Pluralsight.com
Community Forums

Mudbox Training

+ Reply to Thread
Results 1 to 11 of 11
  1. #1

    Rendering vector displacement maps from Mudbox in Maya

    Hello,

    After watching the “Mastering Displacement Maps in Maya 2012” tutorial by Kyle Green.

    to be specific chapter 9 Rendering vector displacement maps in Maya. I seem to have a problem getting the VDM to work properly. Maybe somebody can help me.

    I have created a plane and brushed some spikes on it using Mudbox 2012. After that I exported the VDM map with the settings shown in the attached image. I have then attached the mapping to the vector displacement slot of the displacement node.

    My problem is that my mapping doesn’t seem to be interpreted the right way. At the base of the displaced geometry it first starts as a dent before displacing de right way. And there also appears some clipping at the highest points.

    What could it be?

    Last edited by souverein; 06-16-2012 at 02:25 AM.

  2. #2

    Re: Rendering vector displacement maps from Mudbox in Maya

    So I just want to come back at my first post here to say I found a way to get the VDM working.

    I did not know that it was necessary to import your level 0 mesh again from mudbox. A lot of the tutorials that I followed on the net did not suggest it. So now when I use de level 0 mesh from mudbox back in maya it is rendering fine exept for the following.

    Two new questions now remain for me:

    What is the right workflow for maya to mudbox and back again?

    When I rendered my test plane in maya I noticed a difference between using mentalraySubdivApprox and the standard feature displacement from maya. De mentalraySubdivApprox is much faster for this and cleaner. the only disadvantage now is that the plane has now got ripples in the baseplane whereas the standard displacement hasn’t.

    Any ideas?


  3. #3
    Join Date
    Nov 2002
    Location
    DT HQ
    Posts
    547
    DT Staff
    I am a Face of Change

    Re: Rendering vector displacement maps from Mudbox in Maya

    Hi souverein,
    I'm not sure how you are currently taking geometry from Mudbox into Maya, but I typically like to just use the "File > Send To" feature to take geometry back and forth between the two applications.

    Here's a quick video on how to send geometry and vector displacement info from Mudbox over to Maya:
    Kyle

    Thank you all for supporting Digital-Tutors.

  4. #4

    Re: Rendering vector displacement maps from Mudbox in Maya

    Hello Mr Green,

    Thx for taking the time to answer my question in such a luxurious way. It’s been greatly appreciated.

    I used to do it the following way (before my first post):

    -create plane in maya
    -sent it to mudbox
    -sculpt
    -extract map from level 6 to 0 of the same plane
    -import the mapping into maya manually
    -configure it en render

    But as a now know there are some errors in that process.

    I shall try it your way.

    Thanks again!

  5. #5
    Join Date
    Jun 2013
    Posts
    10

    Exclamation Re: Rendering vector displacement maps from Mudbox in Maya

    First of all sorry for digging this thread up.

    Great tutorial Kyle!
    I'm having a lot of problems with Ptex and mental ray on a project envolving a large terrain.

    I tried to recreate this tutorial using an mia_material_x instead. It rendered without any problem using an .exr as a vector displacement map.
    The thing is, with Ptex you can't export .exr so you have to export .ptx files.
    Autodesk provided a video of a demo using Ptex displacement maps in maya.

    http://youtu.be/etpX2BNnrxo

    And it turns out, you need to use a mia_color_intensity followed by a mib_ptex_lookup on the displacement shader. Ok, but that's for displacement maps.. what about for vector displacement maps?
    You also can't use spatial with ptex, only parametrics. I can get a lot of details by increasing the "N Subdivisions" to 4 or 5 but the render times increase dramatically and I still don't get the vector displacement, just the regular displacement.

    both.jpg

    I'm pulling my hair out already. I tried and searched everywhere but no information is to be found.
    I hope you can help me with this.

    Thank you in advance!

    Cheers,
    Pedro
    Last edited by kyrunn; 06-24-2013 at 01:07 PM.

  6. #6
    Join Date
    Nov 2002
    Location
    DT HQ
    Posts
    547
    DT Staff
    I am a Face of Change

    Re: Rendering vector displacement maps from Mudbox in Maya

    Hi Pedro,
    In my tests, I was able to render ptex files as VDMs in Maya. Here's how I did it:

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    1) In Mudbox, make sure to export the ptex VDM using object vector space.

    2) In Mudbox, use the "Send to Maya" feature to get the mesh into Maya with the proper scale.

    3) In Maya, use the mib_ptex_lookup to bring in the ptex VDM you exported from Mudbox.

    4) Connect the mib_ptex_lookup to the "Vector Displacement" attribute of a regular Maya displacement node.

    5) In the displacement node, make sure the Vector Space option is set to 'Object' space.

    6) Connect the displacement node to the 'Displacement Mat.' attribute of your material's Shading Group (just like you would connect a regular displacement map).

    7) Add a mental ray Subdivision Approximation to your geometry (you must use the Parametric approximation method when rendering ptex displacements).
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    That should be all there is to it. By the way, I'm using Maya 2014...

    The only other thing to do (and I'm guessing you've already done this part) is to add the following line to the end of your 'maya.rayrc' file:
    registry "{_MI_REG_CCMESH_PTEX}" value "on" end registry

    The maya.rayrc file can be found in your Maya installation directory, inside the 'mentalray' folder:
    \Program Files\Autodesk\Maya2013\mentalray
    \Program Files\Autodesk\mentalrayForMaya2014


    Good luck, hope this helps
    Last edited by green; 06-24-2013 at 02:31 PM.
    Kyle

    Thank you all for supporting Digital-Tutors.

  7. #7
    Join Date
    Jun 2013
    Posts
    10

    Re: Rendering vector displacement maps from Mudbox in Maya

    Oh my God! I can see detail now!!! It's HD!! Brilliant!

    Thanks a lot Kyle and super fast reply!

    By the way, and I'm pushing my luck here, but do you know by any chance how do I apply the ptex normal map to the shader aswell? I can't seem to make it work either. Ptex is amazing but the implementation in maya is not that great.

    Again, thanks a lot for the fast and awesome feedback!
    Cheers,
    Pedro

  8. #8
    Join Date
    Nov 2002
    Location
    DT HQ
    Posts
    547
    DT Staff
    I am a Face of Change

    Re: Rendering vector displacement maps from Mudbox in Maya

    I was able to get ptex normal maps working in Maya using the following steps:

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    1) Export your normal map ptex files from Mudbox as Object Space normals (I had trouble getting Tangent Space maps to render correctly in Maya). In my tests, I got the best results by setting the Texel Distribution from 'Uniform' to 'Use PTEX Setup' in the Mudbox 'Extract Texture Maps' window.

    2) In Maya, use the mib_ptex_lookup to bring in your ptex file you exported from Mudbox.

    3) Create a 2D bump node in Maya.

    4) Using the Connection Editor, connect the 'outValue' of your mib_ptex_lookup to the 'normalCamera' attribute of your bump node. You shouldn't need to make any additional changes to the bump node.

    5) Connect the bump node to your material.

    6) If you are using something like the mia_material_x, you may need to open the material's "Advanced" tab, and set the Bump Mode to 3 (which sets the bump vectors to 'object space').

    7) Make sure you've applied a Subdivision Approximation to your mesh, and you should be ready to render.
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Good luck, hope this helps
    Last edited by green; 06-25-2013 at 01:39 PM.
    Kyle

    Thank you all for supporting Digital-Tutors.

  9. #9
    Join Date
    Jun 2013
    Posts
    10

    Re: Rendering vector displacement maps from Mudbox in Maya

    Hi Kyle!
    I did as you said and I did notice an increase in render time, from 8mins to a whooping 27mins so it must be doing something but I fail to see any difference to the image whatsoever. I'm probably doing something wrong.

    I'm connecting the 2d bump to the advanced tab->mental ray bump, and changing the bump to 3 (object), then I connected mib_ptex_lookup.outValue -> bump2d.normalCamera to bump2d.message -> mia_material_x.bump

    From what I observed the "N Subdivisions" from the approximation in maya its pretty much the same as the levels in mudbox. At the current subdivisions of 5 I'm pretty much getting the results of the level 5 in mudbox. I tried N Subdivisions 6 but it was taking so long that I canceled the render (waited a good 40mins).
    Maybe the normal map isn't working due to the lack of subdivisions since I extracted the level 6 from mudbox?
    It's kind of a shame not being able to see all the sculpted detail.

    PS: I don't know if my approach is right but what I was trying to achieve was, since I couldn't afford the long renders I made the N Subdivisions to the "second" best level (5 in this case, 6 being then best) and with the normal map I was hoping to recreate some of that fine detail that would take a long time to displace.

    Once again.. Kyle, thank you very much for taking the time to help me!

    Cheers,
    Pedro

  10. #10
    Join Date
    Nov 2002
    Location
    DT HQ
    Posts
    547
    DT Staff
    I am a Face of Change

    Re: Rendering vector displacement maps from Mudbox in Maya

    Hi Pedro,
    Not sure why the render time would have increased so dramatically (admittedly, I don't know enough about the ptex pipeline to know if that's "typical").

    Instead of plugging the 2d bump node into the 'mental ray bump' of your shader, plug it into the 'Standard Bump' (bump2d.outNormal -> mia_material_x.standard_bump).

    That should make the normal map results appear in the render, but I'm not sure if that will decrease your render time...
    Kyle

    Thank you all for supporting Digital-Tutors.

  11. #11
    Join Date
    Jun 2013
    Posts
    10

    Re: Rendering vector displacement maps from Mudbox in Maya

    Hi Kyle!
    I tried that and although the render time was still 27ish minutes the look was pretty bad. It just like of illuminated the model and didn't do any bump whatsoever.
    I guess I'll have to accept the level 5 of detail. It's just too bad that there's not a lot of tutorials on the ptex pipeline. It's very liberating and promising but very hard to implement in maya.

    Thank you for all the support Kyle!
    Cheers,
    Pedro

Posting Permissions

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