• Forum
  • Educación
  • Programas de Render
  • Mental Ray
  • bump map in MR
  • Coolthreads cool cool
    + Reply to Thread
    Results 1 to 9 of 9

    1. Alancran's Avatar



      Autodesk Maya

      Alancran is on a distinguished road

      Join Date:

      Feb 2002



      Rep Power:


      June 20, 2004

      # 1
      I'd like to have bump mapping with MR custom shaders, specifically the dielectric material shader...Digital tutors said there is a workaround but i havent found the way to do it, please any pointers??


    2. peengoh's Avatar



      Autodesk Maya

      peengoh is on a distinguished road

      Join Date:

      Jun 2004





      Rep Power:


      June 21, 2004

      # 2
      oK Al, here is the start. you need a dgs shader first, but you will have to leave either the glossy or the specular reflection as is, since that is going to be the channel you will use as your "bump"

      the concept is, the glossy reflection (blur reflection) works as micro facets, working as a bump, as a fact, if you use a regular maya shader with a very small bump map you will get a similar result: blured reflections.

      I found this tutorial in highend3d, it is a bit long, but gives good results.

      "First create some Maya material (Lambert, Blinn, whatever) and apply it to your object.
      Then go to the shading group node of that material and in the mental ray section activate "suppress all maya shaders".

      Then apply a DGS material as your "material shader"

      Set your DGS parameters. One of the three reflection types should be untouched cause we are going to use
      it as our bump channel (there seems to be a way to use all three reflections and(!) bump, but again, this is quick an dirty, check the board).

      Now we are going to build the bump network.

      First, create a mib_texture_vector node.
      This is for creating raw texture coordinates. Its parameters are:
      If you are using polygons and you have created your UV Mapping, you can leave all parameters at 0
      ("select" with 0 or positive values up to 63 uses the appropriate UV sets). If you need projections for
      NURBS it gets a bit complicated: set "select" to -1 which uses 3D space coordinates, "selspace" to 1 for
      Objectspace (2 would be worldspace) and "project" to

      2 - for orthographic XY projection
      3 - for orthographic XZ projection
      4 - for orthographic YZ projection
      5 - for spherical projection
      6 - for cylindrical projection (Y is cylinder axis)

      Next, we need a "mib_texture_remap" node to modify the raw coordinates we got from the texture_vector node.
      Connect the "output value" of your mib_texture_vector to "input" of the new "mib_texture_remap". (these
      are 3 values to support 3D textures).
      Again, I'm not so much into MR to tell you about all the parameters. If you use polygons without
      projections (texture-vector was 0,0,0,0) you can just set "repeat" to 1 and that's it. If you use the
      projections as described above it's a bit more complicated:
      you will probably have to convert your vector into the range 0 to 1 (or 0.999? I'm not sure). So if your
      objectspace was in the range from -4 to 4 you have to multiply your vector with 0.125 (set in the "Max"
      parameter) and add 0.5 (set in the "Offset" parameter). Now the range is 0 to 1.

      Now let's go for the bump.

      Create a "mib_bump_basis" node.
      I think you can leave all parameters untouched.

      Create a "mib_passthrough_bump_map" node.
      Connect the "u" values and "v" values outputs of the mib_bump_basis to the appropriate inputs of the
      Connect the "outValue" of the mip_texture_remap to the "Coord" parameter of the passthrough_bump node.
      Here the "step" parameter is used to offset the texture and thus creating a gradient which is used for
      the bump effect. Set it to 0.01 and -0.01 for a start.
      "Factor" controls the strength of the effect (positive or negative values)

      Finally we'll get our texture:

      Connecting standard maya file-nodes does not work. Thanx again to this forum which got me there: Go to
      the mental ray section of your render globals. At the bottom you will find a section called "custom
      entities". There you will find "custom textures". Click "Create".
      Now you will find a new texture "file" node in your hypershade. Load your texture file.
      In the "mib_passthrough_bump_map" now enter the name of the "file"-node (not the file itself), usually
      "file1", into the "tex" field.

      Finally connect the "outValue" of the passthrough_bump to the free reflection parameter of your DGS. Do
      the lightlinking (you will find info about this issue if you don't know yet) for your DGS and be happy."

      The problem with this is i havent found where to connect the bump into a Dielectric shader, so whenever i need to use a bump in a dielectric shader i use a displacemente shader.

      I hope this helps.

      el pingo.

        Attached Thumbnails:

        Click image for larger version

Name:	dgs-bumps.jpg
Views:	58
Size:	39.6 KB
ID:	10350  

    3. June 21, 2004

      # 3

        Attached Thumbnails:

        Click image for larger version

Name:	factor.jpg
Views:	50
Size:	14.6 KB
ID:	10351  

    4. eddgarpv's Avatar



      Autodesk Maya

      eddgarpv is on a distinguished road

      Join Date:

      Oct 2002



      Rep Power:


      June 21, 2004

      # 4
      Yep.. I was doing domething similar this morning, but also had some other work.
      That looks pretty nice, and the best part is that you can export that network with a phenomenizer node, to avoid doing all that job again and again..

      That's the way to use the elliptical filtering within maya, except that you must use the mib_texture_filter_lookup.. I read that tutorial @ alienbit.com but now has gone.

      Thanks for that post peengoh

    5. June 21, 2004

      # 5
      mmhhh... I've found that tutorial about exporting phenomenon nodes.. unfortunately was using mrfm 1.5.1 (maya 4.5) and a month ago, I tried to export a network using parti volume nodes.. but an error appeared in the script editor everytime I tried to export that network.. Then I thought that was an OS/Maya/luck related problem.. some projects came and i left that ..

      Now, under win2k.. the same problem.. Have u ever experienced this?

      In this zip you'll find a network to use bump mapping .. just select the phenomenizer node and export the selected network with the following options :

      File->Export Selection...(with options)
      check Export Selected Items Only
      set Predefined Export Filters -> Factory Shaders, Phenomenizers
      save the file as anything.mi

      Please.. tell me if you can do that .. if so, post the mi file

      Of course this can be done by hand.. but the why to introduce a shader factory ??

    6. JohnnyBlaze's Avatar


      JohnnyBlaze is on a distinguished road

      Join Date:

      Nov 2003



      Rep Power:


      June 22, 2004

      # 6
      Exporting the network worked fine here. I hope that is what you wanted .
      And thanx for pasting the tutorial here...really neat trick!



    7. June 22, 2004

      # 7
      ggrrrr... then I don't know wtf is happening here.
      Yesterday I was reading about the MI_CUSTOM_SHADER_PATH, but after trying with 1 and the mi directory, nothing happened (It says the files are parsed correctly and the shader factory is 'running').

      The error I get from maya is something like

      // Error: (Mayatomr.Export) : more than one node selected //
      // Error: file: C:/Program Files/AliasWavefront/Maya5.0/scripts/others/pv_performAction.mel line 377: Could not save file. //

      and yes.. I only have the pehnomenizer node selected..

      Thanks JohnnyBlaze, I have to make it work ..

      There are some changes that have to be made by hand since the translator isn't working at all, but I don;t remember where.. As soon as I found that, I'll post it.


    8. June 22, 2004

      # 8
      Look at this.. everytime I try to export a network, this happens :

      select -r mentalrayPhenomenon1 ;

      pv_performAction "C:/yy.mi" "mentalRay";
      Mayatomr -mi -file "C:/yy.mi" -exportFilter 2097151 -active -tabstop 8;

      // Error: (Mayatomr.Export) : more than one node selected //
      // Error: file: C:/Program Files/AliasWavefront/Maya5.0/scripts/others/pv_performAction.mel line 377: Could not save file. //

      well.. I only have to write

      select -r mentalrayPhenomenon1 ;
      Mayatomr -mi -file "C:/yy.mi" -exportFilter 2097151 -active -tabstop 8;

      and everything works... weird, isn't it?

      Hope to post the fixed network today.

      cheers again

    9. June 22, 2004

      # 9
      THank you very much guys, i didnt have connection all day yesterday, so i saw the posts untill today, i will be doing all the steps today and experimenting, really appreciate all help and time put into this matter.


    Similar Threads

    1. dato extra?o de bump map y UV's
      By Liquid_Tension in forum Mental Ray
      Replies: 3
      Last Post: 10-11-06, 04:56 AM
    2. what's wrong whith it (bump texture )
      By motionboy in forum General Discussions
      Replies: 0
      Last Post: 03-23-06, 10:57 AM
    3. Turtle Bump
      By plechuga in forum Maya
      Replies: 1
      Last Post: 05-27-05, 03:24 PM
    4. BUMP map nightmare
      By arturo in forum Mental Ray
      Replies: 3
      Last Post: 02-15-05, 07:41 PM
    5. Small scale noisy bump / displacement
      By Khazad-Dum in forum Renderman
      Replies: 4
      Last Post: 08-26-04, 04:29 AM

    Posting Permissions

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