Displacement Issues

Displacement Issues

kennethobscuritis
Contributor Contributor
3,469 Views
4 Replies
Message 1 of 5

Displacement Issues

kennethobscuritis
Contributor
Contributor

https://www.dropbox.com/s/qsw7ew6ho306k4s/DisplacementTroubleShoot2.png?dl=0

 

 

 

I've been using Maya for over a year now, and nearly the whole time I've been wracking my brain on how to get good results with using the displacement method. I have watched countless tutorials on displacement and I tend to see somewhat different methods being used, but I have tried all of them to no avail. It would be cool to get one on one with someone but everyone I've networked with in the 3D modeling community is using Blender. So I've posted an image containing screenshots of my various trial and errors, and I tried to make it as simple and cohesive as possible. I just tend to find forums where people aren't providing screenshots/files so I'm trying to be proactive there. Also, if someone is curious as to what particular texture files I'm using,

   this is the one here -> 

 

https://www.artstation.com/marketplace/p/bDOb/photogrammetry-gravel-1-pbr-4k-tile-texture?utm_source...

 

However, the bottom right of my provided image might show sufficient info as to what the files look like. I also run into the issue with plenty of other map files I download. Long story short, I want my texture to look like it's supposed to with these files I've downloaded. The screenshots I have in the image show my garbage results. I think there's enough info in the entirety of the image, but just in case I have more context written below.

 

The top row is all using one particular file for the displacement (the height map as noted) and node arrangement. The renderview window i spliced into no debug shading/wireframe. It might be necessary to mention I am multiplying my "repeat UV" values by 13 in both x and z values, not sure if that matters but I want to be thorough with the info I'm providing. The overall displacement with this setup seems so-so, and might yield better results for less complex texture maps like sand or water I suppose, but I'm not seeing the depth I'd like as the image pertaining to the maps download file (bottom right of image) displays. If I raise the height value, everything on the polyplane wants to rise together, so virtually the whole plane is just moving up as opposed to the individual "rocks." I feel like I'm missing depth with this overall configuration.

 

The middle row I have used the same settings for displacement values, other than reducing the height to .05, only using the normal map for displacement. This looks arguably worse, very spiky looking and I don't know what's going on with those shadows. I'm not sure if the normal map is supposed to be substituted for the height map, but I've read that this is an option and it has more detail, which is what I'm shooting for. If I ever try increasing catclark to something past 5 Maya get's really bogged down and freezes on me. Not sure if I'm supposed to have a higher subdivision count in the polyplane geometry, but I thought the point of doing it in the arnold settings is supposed to "simulate" a high sub count to lighten the work load. The answer might ultimately be with my computer specs, which I will provide at the very end, but I'm told my specs are sufficient for Maya. Anyways I also tried adjusting both Scalar Value and Bounds Padding to numbers between 0 and 1 with no noticeable difference, but I am still not 100% on how those values operate. The autobump feature I've toyed with but if anything makes things a little worse, I also have to learn more about when I should be using this feature vs. an actual bump map. Overall, I think this configuration is lacking the detailed roundness/depth perception accuracy if you will..

 

Finally the other thing I'm still confused on is the node setup, as through my research of online tutorials I've come across 2 different arrangements for displacement. The bottom left outlined in green shows a connection that I've been using for a while, which is connecting the displacement map directily into the displacement shader receiver node of the standardSurface2SG node. As opposed to the node arrangement I have screen shotted at the top of this image, this connection bypasses an addition displacementshader node. I've only recently discovered adding that additional node in between, which looks different but I'm not sure what's going on and it does look a little worse, but I had to raise the height to see any effect at all (on both texture files).

 

Specs:

Using Maya 2022 (still had this issue with 2020)

Computer Specs: https://www.amazon.com/gp/product/B07WRR723V/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

 

 

 

0 Likes
3,470 Views
4 Replies
Replies (4)
Message 2 of 5

PuChiNgBaLLz
Advocate
Advocate

1- Too much to explain in just one post, read this first https://www.cggallery.com/tutorials/displacement/

2- You can't use Normal Map as displacement, Normal Map is an RGB 3 dimensional simulating light bounces file. Displacement map is a b&w map, so the conversion for the displacement entry is to take the 0-255 value of each color channel and use that to represent the displacement from any color image. Although there are some Normal Map - Displacement converters out there as 3th party software.

3- Both Normal and displacement maps must be RAW in their Color space attribute in the File node, you may try to set displacement as Alpha is luminance in the Color Balance section of the same node. You should use a Displacement Node in between texture and shader, this allows you to set Scale, Bounds Padding and Scalar Zero values among other parameters. BTW is this displacement baked by you or it came with the photogrammetry file? It's important to know the 0 deviation value to set it in the Scalar Zero Value of the displacement node, explaining next.

4 - As far as i can tell in the image you uploaded, in the top right corner, the relief seems too flat, i may happen due to a different Scalar Zero value, this set the neutral point at wich darker (down)and brighter(up) tones start pushing the geometry, or may be caused by a small scale of the displacement. In the post i linked above explains that displacement is dependent of the scale and shows examples, so taking this into account you can change the Height of the displacement (it's a multiplier) from select the geometry - attribute editor - shape tab - Arnold - Displacement attributes - Height (default is 1.0 which means that every displacement value of the map is multiplied by 1.0, no modification).

4- Bounds padding sets a bounding box at wich the displacement start affecting the geometry, you can see what it does in Arnold documentation https://docs.arnoldrenderer.com/display/A5AFMUG/Displacement, never had to modify this value before, but you can try.

5- Displacement vs Normal vs Bump: Displacement really generates and move geometry vertexes based on the current catclark subdivisions. Normal map simulates surface variations by bouncing light is not related to another parameter other than the current UV, topology and polycount it was made for. Bump worst results, simply simulates variations as they were baked, it's not light bouncing dependent, so viewing a bumped area from a different angle may produce weird visual results, it's commonly used for far objects without much detail or resolution renders.

 

Btw, in displacement after you set the subdivisions in attribute editor - shape tab - Arnold - Subdivision - Iterations, downwards inside Displacement Attributes is Autobump, enable this to have small details without making your pc explode, this works by making bumps for small details that can't be generated by displacement, replacing as example, real pores geometry by small darker bump spots, so you don't have to subdivide to tons of millions of polygons to get those details.

0 Likes
Message 3 of 5

kennethobscuritis
Contributor
Contributor

Appreciate the in-depth response. I neglected to include the detail that I had set the normal map to raw when using it as a displacement. For whatever reason I was under the belief that doing that bypassed the colors and recognized it as b&w file, thinking that would be enough for conversion. I will also have to explore those 3rd party converters at some point, but for now I'll just stick to using my maps as they are intended. So I'm back to using the height map as the displacement again (with the additional displacement node), and alpha is luminence is turned on as well.

 

The displacement file came with the package and I did not bake it, and I'm not sure I'm following what you mean by the 0 deviation value. I read the first article you had provided and I appreciate the info it gave me, as it helps me understand what's going on behind the scenes with creating a displacement map. However, I read the second article you provided a number of times, and I'm still not sure what kind of circumstances adjusting the scalar point value are applicable to, just seems as though it's not necessarily fixing my particular issue. I have adjusted the scalar value in both negative and positive directions, with different combinations with my height value going over and below 1.000, and the best result I get is essentially what I provided in the picture only now the planes more wavy. My concern is the protrusion of the individual rocks, as they don't exceed the flatness of what is shown in my image still. Maybe I have high hopes and the provided picture of the sphere example from this texture package is just misleading? Then again that's a real picture demonstrating a real result right, so it has to be achievable..

0 Likes
Message 4 of 5

PuChiNgBaLLz
Advocate
Advocate

The scalar zero value set the point (between 0 and 1) at which the neutral value is set, it will be no affected by displacement since is the point from which vertexes are moved from, so, if you bake as example a displacement in zbrush, you can choose to set the Mid value, or Scalar value in maya, between those values, if the number is offset  from the original baking, down or up, also will be the displacement measured in scene units, you may finally get a moved outward or inward displacement depending on the offset. This is closely related to image file types, as 32 bit images can store more than just 0-1 range values, as example an exr 32 bit (common for height/displacement maps), zbrush documentation recommends to set Mid value to 0 for 32 bit images, and 0.5 for 16 bit images as TIFF. 

 

So, as displacement is scale related, if you as example change the units in maya scene, the displacement already baked won't change and thus it may look too small or too large, so Height or Scalar attributes helps to modify the original map values to match the new scale without having to rebake the map.

0 Likes
Message 5 of 5

kennethobscuritis
Contributor
Contributor

Well, I figured it out. My polyplane wasn't subdivided enough to begin with. It was 10 by 10 stretched out, so I increased it drastically, to 300 by 300,  and now it's looking how it should 👍

0 Likes