Does Iray have issues with displacement maps?

MorpheonMorpheon Posts: 738
edited July 2015 in The Commons

Something interesting came up while the other day, and it has me wondering if Iray has an issue with displacement maps.

For example, I can take a grey-scale image (image on the left; 24-bit; pure black = 0 and pure white = 255), apply it to a plane primitive (both diffuse and displacement), and render it out with 3Delight (image on the right) with the expected results.

Then I simply switched the renderer from 3Delight to Iray, which refuses to render it if there is anything plugged into the displacement channel. If I remove the image from the displacement channel, Iray will render the plane with the image still set as diffuse -- if I put the image back in the displacement channel, Iray will again refuse to render it out. Does anyone know what's going on here?

BTW, this same black & white image causes Shader Map 2 to crash every time I try to load it -- I was going to try to create a normal map from it just to see what would happen.

 

 

gray_on_black_random_circle_dots_seamless_background.jpg
400 x 400 - 12K
test render.jpg
1305 x 880 - 328K
Post edited by Morpheon on

Comments

  • mjc1016mjc1016 Posts: 15,001

    Simple answer, no.

    Complicated, long answer...it isn't doesn't work the same as 3Delight so the results are not comparable.  Iray needs to have a pretty high level of subdivision, manually set...plus the maps NEED to be true greyscale/black and white maps.  I'm guessing that was a plane primitive with no divisions/subdivisions at all...if you had a way of checking, you'd probably notice that it did displace it...but it moved the entire plane.

    Here's a normal of your image...give it a shot.  Iray deals with normal maps much more efficiently.

    normamap.jpg
    400 x 400 - 67K
  • MorpheonMorpheon Posts: 738
    mjc1016 said:

    Simple answer, no.

    Complicated, long answer...it isn't doesn't work the same as 3Delight so the results are not comparable.  Iray needs to have a pretty high level of subdivision, manually set...plus the maps NEED to be true greyscale/black and white maps.  I'm guessing that was a plane primitive with no divisions/subdivisions at all...if you had a way of checking, you'd probably notice that it did displace it...but it moved the entire plane.

    Here's a normal of your image...give it a shot.  Iray deals with normal maps much more efficiently.

    Yeah, forgot to mention that the plane had no subdivision applied to it. I did wonder about that aftewards. And yeah, the focus these days is on normal maps, but displacement is such a basic function, I just couldn't believe it didn't work.

  • pearbearpearbear Posts: 227
    edited July 2015

    In Iray, when using displacement maps the mesh needs to be subdivided for the displacement detail to show up. If your mesh is a plane with very few polygons, you won't notice the displacement having any effect. The more you subdivide, the more detail you get. Unfortunately, this can add a lot of polygons to your scene. 

    Try adding subdivision to the plane primitive, and adding a corresponding amount of displacement subdivision in the plane's displacement settings in the material pane. The amount of subdivision levels you need to add will depend on what the polycount of your plane is to start with. It's a balance between being subdivided enough to get the displacement detail you want, and not so subdivided that it adds too many polys and crashes your scene.

    edit - ah, mjc1016 beat me to the answer! 

    Post edited by pearbear on
  • MorpheonMorpheon Posts: 738
    edited July 2015
    pearbear said:

    In Iray, when using displacement maps the mesh needs to be subdivided for the displacement detail to show up. If your mesh is a plane with very few polygons, you won't notice the displacement having any effect. The more you subdivide, the more detail you get. Unfortunately, this can add a lot of polygons to your scene. 

    Try adding subdivision to the plane primitive, and adding a corresponding amount of displacement subdivision in the plane's displacement settings in the material pane. The amount of subdivision levels you need to add will depend on what the polycount of your plane is to start with. It's a balance between being subdivided enough to get the displacement detail you want, and not so subdivided that it adds too many polys and crashes your scene.

    edit - ah, mjc1016 beat me to the answer! 

    Just got done trying it again. Initially, it appears that when you create an object that you want to apply displacement to, in a scene that you're going to render out with Iray, the object appears in the scene with the standard 3Delight surface properties dialog (looks exactly the same to me, anyways). However, if you apply the Iray UberShader to that object, then all of the Iray-specific displacement and sub-division options appear.

    At a sub-d of 4, I just barely got a blip on the render; at 8, you could see it working, but still very imperfectly. I didn't take it any higher -- it just didn't seem worth the hit on the poly-count to know that that's how displacement works in Iray -- I'd hate to try it with something REALLY complex.

     

     

     

     

     

    Post edited by Morpheon on
  • ZarconDeeGrissomZarconDeeGrissom Posts: 5,412
    edited July 2015

    yea, not having Displacement as efficient as 3delight can be a bit of a pitfall, especially if the map is mimicking cloth surprise

    Imagine that, a shirt with a poly every nanometer. Granted, for most stuff that small, you can get by with a bump or normal map. Here is a good example you can play with (CC0). It was a crude attempt of mimicking Spandex-weave. The normal is probably far more desirable for Iray, especially if you don't have a few terabytes of ram just for the displacement polygons, lol.

    image

    Normal above, displacement below.

    image

    Post edited by ZarconDeeGrissom on
  • Oso3DOso3D Posts: 14,897

    On the plus side, the advantage of the Iray approach is that you can tweak displacement subd instead of object subd, which can prevent some model weirdness, and you can adjust subd lower or higher as needed.

  • mjc1016mjc1016 Posts: 15,001

    I thought you needed at least 1 level of object subdivision for the displacement level to work...and most of the time there's going to be something weird happen to the model, it's going to happen at that first division.

  • RAMWolffRAMWolff Posts: 10,148

    One issue I've had with Disp, Bump and Normals, I wish there was a way to to turn off tiling on those.  Say I have a character that I want a tightly tiled skin shader but have some detail maps that I want to hook up to the Bump and or Normal channels.. can't do that.  It's a pitfall to me not having that control.  Not sure if this has changed in iRay but I doubt it...

  • Oso3DOso3D Posts: 14,897

    Um, yes, it did.

     

    you can tile textures independently of each other in Iray shaders. It's under image editor, second tab.

  • RAMWolffRAMWolff Posts: 10,148

    Well that's cool then.  I'll have to check that out.  Did you mean to say the Surfaces Editor?

  • Oso3DOso3D Posts: 14,897

    I'm away from my desktop, but it's basically the other option than LIE.

  • RAMWolffRAMWolff Posts: 10,148

    Hmmm, not finding it....

  • Oso3DOso3D Posts: 14,897

    Iray shader, click a texture. You get Browse, the textures already loaded, Image Editor, and LIE.

     

    Select Image Editor. Midway in the pane should be two tabs. Click second tab, should list tiling options.

  • DAZ_SpookyDAZ_Spooky Posts: 3,100
    mjc1016 said:

    I thought you needed at least 1 level of object subdivision for the displacement level to work...and most of the time there's going to be something weird happen to the model, it's going to happen at that first division.

    You do not. It should use Sub-D level first, and then add the difference between the SubD Level and Displacement tesselation level as additional levels. 

    So if SubD level is Zero and Displacement level is 2, you will get 16 times as many polys on the surface.

    If SubD level is 1 and Displacement tesselation level is 1 you will get 4 times as many polys on the surface. 

    If SubD level is 1 and Displacement tesselation level is 2 you will get 16 times as many polys on the surface. 

    If SubD level is 1 and Displacement tesselation is 3, you will get 64 times as many polys on the surface. 

    Etc.

  • Oso3DOso3D Posts: 14,897

    My experiments with subd suggest it's actually 2^ total subd levels.

  • RAMWolffRAMWolff Posts: 10,148

    Iray shader, click a texture. You get Browse, the textures already loaded, Image Editor, and LIE.

     

    Select Image Editor. Midway in the pane should be two tabs. Click second tab, should list tiling options.

    WOW.. thanks so much.  I NEVER knew that was there!  That's fabulous.  laugh

  • DAZ_SpookyDAZ_Spooky Posts: 3,100

    My experiments with subd suggest it's actually 2^ total subd levels.

    There was a bug which was fixed in 4.8.0.59. 

  • RAMWolffRAMWolff Posts: 10,148

    Hmmm, just tried it and it's not working.... Set the tiling up to 7 Hor and 7 vert.. nothing... even using the spot rendering tool didn't reveal anything...

  • mjc1016mjc1016 Posts: 15,001
    mjc1016 said:

    I thought you needed at least 1 level of object subdivision for the displacement level to work...and most of the time there's going to be something weird happen to the model, it's going to happen at that first division.

    You do not. It should use Sub-D level first, and then add the difference between the SubD Level and Displacement tesselation level as additional levels. 

    So if SubD level is Zero and Displacement level is 2, you will get 16 times as many polys on the surface.

    If SubD level is 1 and Displacement tesselation level is 1 you will get 4 times as many polys on the surface. 

    If SubD level is 1 and Displacement tesselation level is 2 you will get 16 times as many polys on the surface. 

    If SubD level is 1 and Displacement tesselation is 3, you will get 64 times as many polys on the surface. 

    Etc.

    Ok, so 'overall' SubD of 0 will still allow Displacement tesselation...not sure where I got the impression otherwise.

  • ZarconDeeGrissomZarconDeeGrissom Posts: 5,412
    edited July 2015

    yea, in the surface tab is a sub-d that can be set for each surface. Unlike 3delight, it will still require insane subdivision for things like the texture posted here (above).

    I did a few experiments with combining course displacement texture with fine bump/normal maps, and the results were not all that great.

    There was quite some discussion looking at the lack of detail in Iray.

    http://www.daz3d.com/forums/discussion/comment/837035/#Comment_837035

    Post edited by ZarconDeeGrissom on
  • mjc1016mjc1016 Posts: 15,001

    My experiments with subd suggest it's actually 2^ total subd levels.

     That's what I would expect it to be.

  • IceCrMnIceCrMn Posts: 2,115

    this thread has been very helpful,,,I made the frosty boots fuzzy in iray :)

    Fuzzy boots.jpg
    1920 x 1080 - 478K
  • Oso3DOso3D Posts: 14,897
    Yeah, a simple noise map displacement and very high subd can pull off some fur.
  • RAMWolffRAMWolff Posts: 10,148

    And y'all are right.  I just created a Normal map for one of my textures and compared to the displacement I was getting very good results for using 3Delight, in iRay it was flat as a pancake using it on a sphere that hadn't been sub-d at all.... Weird thing is I've got my colored map in the right channel but it's not rendering.. the globe is rendering the Environment map. When I removed the Environment map from the Render settings slot and put in the color map it looks right.... Something weird going on I'm not understanding about iRay I guess....

  • RAMWolffRAMWolff Posts: 10,148

    WOW.. now it's working right.. weird.  Deleted the sphere, loaded a new one and it's all good now...

  • RAMWolff said:

    WOW.. now it's working right.. weird.  Deleted the sphere, loaded a new one and it's all good now...

    That almost sounds like a 'stuck' shader in the cache, lol.

  • RAMWolffRAMWolff Posts: 10,148

    Yea, it was quite bizzare! 

Sign In or Register to comment.