problem with displacement/bump

  • rendetto

    rendetto - 2007-05-29


    I have a problem creating bump on mesh objects.
    Bumping appears but the objects became faceted.
    Is there a problem with my shader, or there is something specific with Pixie?
    I used standart shaders from the Renderman Repository, and various books,
    but the results were the same - using bump or displacement remove the smooth look from the meshes.

    Here you can download a RIB file, shaders and textures. Try the rib with the bump.tex texture and then with an empty string.



    • George Harker

      George Harker - 2007-05-29

      Hi rendetto,

      It looks like there's a bug in texmake (for non power of 2 side textures).  Ie if the map were 1024 * 1024 or 512*512 it will work fine.  I'll fix this bug asap.

      It'd be worth adding

      Attribute "displacementbound" "sphere" 0.1

      To specify a displacement bound, but that's not the issue here.

      The facets come from displacing a fundamentally polygon surface.  The calculatenormal() shadeop constructs a new normal based on the local differences in P.  Whilst the undisplaced surface looks perfectly smooth is because when there's no bumpmap, the smooth interpolated normals are used for rendering (calculatenormal is not called).  In the bumpmap case, P is moved by the map, which moves it along a smooth normal.  But P was funamentally faceted before - you just couldn't see it because the normals were smooth, and therefore the diffuse shading is smooth.  But calculatenormal will use the faceted PP to recreate the new normal - and therefore gives a faceted result.

      If you tag the surface as a subdiv, this will no longer occur.



    • rendetto

      rendetto - 2007-05-30

      Thanks George,

      It seems that even the texture is 512*512 the faceted look remains unchanged (for a fundamentally polygon surface).
      BTW I had a 1024*1024 variant of bump texture but texmake couldn't compile it.
      There were no error messages, but the resulting file was only 8K.
      And one more thing - when I tryied -filterheight option in texmake, I got an error.
      What are the differencies between -sfilterwidth -tfilterwidth -filterwidth and filterheight?

      Thanks again,


    • rendetto

      rendetto - 2007-05-30

      I forgot... You can download the square texture from

    • rendetto

      rendetto - 2007-06-02

      Hi again,

      I'm really sorry for the inconvenience but I have a new IP, so the files which I'm uploading have a new address.
      The above texture can be downloaded from



    • rendetto

      rendetto - 2007-07-29

      I tryed subdiv with bumping and displacement and it worked fine.

      But is there a way to achieve a smooth look with bump/displacement onto PointsGeneralPolygons?

      I hope I didn't become annoying but I don't understand bumping concepts very much.



    • Nicholas Yue

      Nicholas Yue - 2007-07-29

      Hi Rendetto,

        Given a texture map [assuming grey scale to simplify explanation], bump-mapping perturb the geometry normal during lighting calculation to give the visual effect of bumpiness.

        Displacement-mapping perturb the geometry's micropolygon as it is diced/tessellated for renedering purposes.

        If you look at a flat surface on the side (so that it's just a line) and render out separate bump-map and displacement-map, you should see that bump-map's render is still a line whereas displacement-map should produce hills and values (depending on your input texture map and the magnitude of the displacement etc..)

        Therefore, in RenderMan, displacement shader are evaluated for a geometry before the surface shader.


    • Alex

      Alex - 2007-08-03

      rendetto, sure you can eliminate faceting quite easily on poly meshes.

      Have a look here for instructions:
      -- Oh, damn. Steve May's Rman notes site is gone. Good thing I downloaded the zip of it --

      Anyway, here's the instructions:

      With smooth-shaded polygons, N (shading normal) will contain the smooth shading normal and Ng (geometric normal) will contain the face normal. We can solve the displacement problem by saving the difference between N and Ng and then adding it back in after we calculate the new normal. The code fragment below demonstrates this:

          point Ndiff;
          Ndiff = normalize(N) - normalize(Ng);
          P += P * Km * surface_mag * normalize(N);
          N = normalize(calculatenormal(P)) + Ndiff;

      Hope that helps you.

    • rendetto

      rendetto - 2007-08-06

      Thank you very much guys!

      Alex it worked! This is what I was looking for.

      It's so pity that Steve May's Rman notes site is down. But for those who are looking for it,

      I found that there is still a version translated in russian at

      Thanks again,



Log in to post a comment.