Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 41

Thread: bump maps with mib_ptex_lookup in maya 2013

  1. #31

    Default

    Hi rockneptune, could you please post the .mi file and the .ptex texture ? We will take a look,
    maybe there is a solution. Your example looks much more interesting to debug than the sphere scene I've seen above. We rarely create scenes in Maya, so scene files will always speed
    up investigation of such problems *a lot*.
    Thanks,
    Gunter

    Quote Originally Posted by rockneptune View Post
    Hi bart and ronviers,

    Allow me to summarize your discussion here:
    So there are two ways to produce bump mapping effect with mib_ptex_lookup,
    1.) mib_ptex_lookup.outValue -> bump2d.normalCamera, bump2d.outNormal -> mia_material_x.standard_bump
    2.) mib_ptex_lookup.outValue -> mia_material_x.standard_bump
    but neither way produce satisfactory results, am I right?
    I have tested both ways and I can't get correct result, either.
    I think bump2d has got the values from mib_ptex_lookup but it has used the values in a wrong way, maybe as world space vector or something else. So the rendering result shows something look like bump map result but it doesn't look right.

    So, is there other way to use bump map with mib_ptex_lookup? Perhaps with another kind of bump2d node?

    By the way, I also used Mudbox to produce ptex normal map, and I also got the same odd problem around mesh boundary. Some part of the normal map seem to be inverted to another direction!?

    This is how it should look like:
    Attachment 3277

    But this is how it look like after "PTEX Setup":
    Attachment 3278

  2. #32
    Join Date
    May 2012
    Location
    Taipei, Taiwan
    Posts
    10

    Default

    Hi guys,

    Very happy to see your replies!
    Here are all the files I use:
    bumpMapTest.zip
    Hope to hear some good news from you!

    Daniel Chen

  3. #33

    Default

    Thanks for the scene. It seems the bump_mode should be 7, since the architectural shader sets state->normal
    from the ptex return vector. In mode 7 the arch material applies a mi_vector_from_object. In your scene
    however this will not make a difference since the object transform only has a translation.
    The ptex file also has a correct number of faces (100). Suspicious: The values from the ptex lookup are
    not normalized (from a normal map I would expect normalized vectors. however, the arch shader will normalize the vector after transformation). You could set filtertype to 0 (in the mib_ptex_lookup1 parameters) to actually see the
    values looked up for the faces (in the modified .mi file where the ptex shader is plugged into the diffuse
    color). Picture attached below.

    When plugging the mib_ptex_lookup1 shader to the diffuse channel (and removing all bump stuff) the same artifacts appear! Somehow it looks like the ptex file is not correct. Is there a tool available which can
    visualize the ptex content ?

    Gunter
    Attached Images Attached Images
    Last edited by gunter; June 20th, 2012 at 22:12.

  4. #34
    Join Date
    May 2012
    Location
    Taipei, Taiwan
    Posts
    10

    Default

    Hi Gunter,

    I've tried every bump mode but none gives correct result.

    I have mentioned that some weird problem appeared when I transformed the original normal map to Ptex with Mudbox. Is this the artifact that you refer to? Some parts of the normal map have opposite directions than other parts.

    Here is a picture showing the ptex normal map opened by renderman ptxview. Sorry that I can't distribute the program.

    T-raised-plane_normal_ptxview.png


    Here are another two pictures showing the original mesh that I used to produce the normal map.

    bumpMapTest_compare.png

    bumpMapTest_compare_2.png

    I believe that the planar parts of two surfaces (the parts that have no bumps) should have similar colors since they both receive the same lighting.

    Here is the .mi for the scene.
    bumpMapTest_compare.mi

    Thanks a lot for your help!

    Daniel

  5. #35

    Default

    The image shown by ptxview looks similar to the picture I posted (ptex plugged into diffuse
    channel). The ptxview picture looks suspicious, right ? Exactly the same seam is present.
    Do you perhaps have other tools to generate the ptex file ? It looks like Mudbox is not
    properly creating the ptex file (bug report to Autodesk?).

    Gunter

    Quote Originally Posted by rockneptune View Post
    Hi Gunter,

    I've tried every bump mode but none gives correct result.

    I have mentioned that some weird problem appeared when I transformed the original normal map to Ptex with Mudbox. Is this the artifact that you refer to? Some parts of the normal map have opposite directions than other parts.

    Here is a picture showing the ptex normal map opened by renderman ptxview. Sorry that I can't distribute the program.

    T-raised-plane_normal_ptxview.png


    Here are another two pictures showing the original mesh that I used to produce the normal map.

    bumpMapTest_compare.png

    bumpMapTest_compare_2.png

    I believe that the planar parts of two surfaces (the parts that have no bumps) should have similar colors since they both receive the same lighting.

    Here is the .mi for the scene.
    bumpMapTest_compare.mi

    Thanks a lot for your help!

    Daniel

  6. #36
    Join Date
    May 2012
    Location
    Taipei, Taiwan
    Posts
    10

    Default

    Hi Gunter,

    I've got some new test data now!
    What I have here is a totally flat normal map, i.e. all texels are just (0.5, 0.5, 1.0).
    Here is the ptxview image
    plane_flatnormal_ptxview.png

    The problem is depicted in this image
    bumpMapTest_3.png
    The two planes in the image both have mia_material_x assigned with same settings, and the left one with the flat normal map connected via bump2d.
    If the flat normal map functions correctly, they should have similar rendered color, since they are parallel, with same materials and receive same lighting, but they are not.

    Here is the .mi file
    bumpMapTest_3.mi
    and here is the .obj and flatnormal.ptx
    bumpMapTest3.zip

    Truly hope you can help! Thanks a lot!

    Daniel

  7. #37

    Default

    Hi Daniel,
    bot planes have a normal = 0 1 0 in world space. The ptex mapped plane on the left side gets the new normal 0.5 0.5 1 (normalized after assignment),
    so it is much different. If the ptex texture would return 0 0.5 0 (or 0 1 0), the pictures would look similar. The plane on the left side has
    an identity transform, so it gets 0 1 0 in world space. The plane on the right side has a transform other than identity. You could set bump_mode to 7
    for the right plane and set the bump vector to 0.5 0.5 1, it would look as dark as the left ptex-mapped plane.
    So everything seems to be ok with this scene.

    Gunter

  8. #38
    Join Date
    May 2012
    Location
    Taipei, Taiwan
    Posts
    10

    Default

    Hi,

    I think the problem is that when I fed the plane with (0.5 0.5 1), I would expect the bump2d node to transform it to (0 1 0) since I've set "Use As: Tangent Space Normals".
    I think this is how we used to do with a Maya file node. How do you think?

    Daniel

  9. #39
    Join Date
    Mar 2011
    Posts
    61

    Default

    thought i would try this again after sp3 was released for mudbox. the release notes say the artifact problem has bee corrected but the quick test i did indicates the problem remains. i reported it to adsk, if they find a problem with my test or know of a fix, i will post it back here

    mb.jpg
    maya.jpg
    extractionSettings.jpg
    Last edited by ronviers; November 30th, 2012 at 08:44.

  10. #40
    Join Date
    Jan 2013
    Posts
    1

    Default

    i painted a bump map in mudbox, exported it as ptx file.
    when i plug the map into the diffuse slot of a mia_mat it renders correct. so i assume the ptex file is not corrupt. when i plug the map into the standart bump slot. and try out all bump modes, i get no correct result. am i something missing?

Posting Permissions

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