Author Topic: Displacement Problems  (Read 8095 times)

2016-08-03, 19:23:24

nickdagamer

  • Active Users
  • **
  • Posts: 5
    • View Profile
    • RM Design Studio
Hello fellow renderers! I'm posting this today to show an important issue I'm having with displacement. I've had this problem across several projects where lap siding or shake is needed. In both cases, I get what is shown in Image2.jpg. The bottom edges of the shake are very bumpy and causes shadow irregularities as well.

To explain further, Image1.jpg is a test from using the corona_mat-shake_siding1.zip max file supplied. (However, I changed the displacement map to follow a straight edge siding - the map used is called shake_uneven_disp.jpg) I got it looking very close to what I wanted with the closeup shot. When I first opened the max file, I did a test render and came up with what's showing in WaterLevel.jpg whereas the test render that came with it, FoundOnline.jpg is how it should look. It took a while to figure out that the water level was causing the gaps in geometry. Setting it to 0 was what fixed it which is confusing to me.  Once applied in a real world setting and the camera pulled back, the quality degrades heavily. In Image2, I was trying to find a solution by creating a simple plane object in front to see if maybe it was my model that was causing the issue.

I tried setting the subdivide on my home to 1" which was nearly 1 million faces total and that didn't do anything. In fact, the plane object had 1 poly and looked the same. I also tried upping the resolution of the displacement map to be 5000p wide which also did not work. When I started messing around with the render size, I started getting better results but that doesn't work for two reasons. 1: The edges are still jagged which won't be appealing to my clients and 2: The size it would take to look good enough is far beyond a typical size. Most renders are 1280x720 whereas it would likely need to be at least 20,000 wide to get cleaner edges.

StandardSize.jpg shows the exact same material as Image1 but in the real world setting. I get the problem when doing regular lap siding as well where the displacement falls apart when the map has a hard cut from black to white. At least with that I can model it in a pinch but it's not so easy with shake. Unfortunately I had to revert back to Vray in order to do these single family homes which is a bummer because Corona looks so much better.

Thank you for taking the time to review over this problem. If it's something I'm doing wrong on my end, please let me know.
Being an adult is like looking both ways before crossing the road and then being hit by an airplane.

2016-08-04, 00:22:13
Reply #1

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Hi. Just made a small test using your "shake_uneven_disp.jpg" in the displacement slot, and I think it worked out OK even without any tesselation.

When using "sharp" images or procedurals with hard cuts from black to white, the trick is to use the "Blur offset" in the bitmap loader. In this case I found that 0,006 worked good, with Blur set to 0,01 and Displacement global set to 2 pixel (Screen Size).

I've attached an image is showing the result as well as my settings.


BTW - Instead of setting Water level to 0, you can simply turn it off (uncheck it).

2016-08-04, 12:43:14
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12767
  • Marcin
    • View Profile
Which version of Corona are you using? I opened your file, removed water level, and set displacement quality to the default 2px, and here is what it looks like. I think it's pretty similar to what you showed in the "online" picture.
Another thing is the image's gamma. You were rendering with gamma set to 2,2. The second pic ("gamma1") is the same map with gamma set to 1. It affects the curvature of the tiles.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2016-08-04, 17:23:01
Reply #3

nickdagamer

  • Active Users
  • **
  • Posts: 5
    • View Profile
    • RM Design Studio
Thank you for the responses. I'm using v1.4. I set up a simple scene (all suggestion applied) with the home I'm trying to render so you can see what's happening. All of the necessary maps should be in the zip.
Being an adult is like looking both ways before crossing the road and then being hit by an airplane.

2016-08-04, 17:47:27
Reply #4

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12767
  • Marcin
    • View Profile
Thanks, but I still don't fully get it what's the main problem here. Here is a closeup. Is this displaced material supposed to look like this?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2016-08-04, 17:52:05
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8850
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Why people attempt to use displacement where simple geometry would give much better results with less consumption of RAM, is beyond my understanding...

p.s. sorry for not being helpful here.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2016-08-04, 18:15:05
Reply #6

nickdagamer

  • Active Users
  • **
  • Posts: 5
    • View Profile
    • RM Design Studio
Maru, that is close to correct. As I was saying in my original post, the displacement seems to work when it's very close to the camera, however it degrades at an exponential rate when zoomed out which is where my camera needs to be. At closeup, the displacement still gets pretty jagged toward the bottom. At a distance, you can see large "dents" where the shake splits and the bottom edges are not sharp. I supplied an image of how it looks in V-Ray so you have a better understanding of what I'm shooting for. I understand it's not the same exact displacement map but they are close.

romullus, this particular home is modeled on all 4 sides and will have several views displaying it. Trying to model all of that shake is not even close to being within my time constraint which is why displacement is so important. One option that was discussed among my coworkers is modeling a set of shake based on the displace map and then use Rail Clone to apply it to the entire home. In testing, this had it's limitations. It works in theory but again it goes back to the added time it takes to make it work.
Being an adult is like looking both ways before crossing the road and then being hit by an airplane.

2016-08-04, 18:41:11
Reply #7

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12767
  • Marcin
    • View Profile
I think that this is expected. The displacement looks close to good on closeups because you can see the detail. When you move away, the smallest allowed detail is still 2px, so it becomes less detailed. So one solution would be to change the displacement map to something less "noisy". I will also check if the result is different when using 1.5 dailies, but I don't think so.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2016-08-04, 18:48:58
Reply #8

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Hi. Check out Coronas YouTube tut about displacement. In that Rawalanche tells about the difference between Vray's and Coronas displacement. He advises to also put the displacement map into the bump slot, so that some detailed will be obtained at large distance.

I think this combined with using the "Blur offset" would do the trick in this case.

BTW - Your Vray example seems extremely blurred and the whole picture is very pixelated. Is this a blowup of a small cutout?

2016-08-04, 18:59:57
Reply #9

nickdagamer

  • Active Users
  • **
  • Posts: 5
    • View Profile
    • RM Design Studio
Maru, I supplied the displacement used for the vray shot. If anything this is more noisy yet cleaner when rendered.

PROH, it's already in the bump slot as well. Sorry about that, added the full render.
Being an adult is like looking both ways before crossing the road and then being hit by an airplane.

2016-08-04, 19:08:21
Reply #10

tony_morev

  • Active Users
  • **
  • Posts: 37
    • View Profile
it looks to me as if Corona samples the displacement map in render screen resolution, while V-ray uses the original size map, hence the obvious lack of detail in the resulting generated mesh

this may be a cheap way to speed things up, but IMO make corona displacement crippled by comparison

both methods have their place i suppose, but i'd be nice to be able to chose between them
« Last Edit: 2016-08-04, 19:14:17 by tony_morev »

2016-08-04, 21:05:39
Reply #11

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8850
  • Let's move this topic, shall we?
    • View Profile
    • My Models
First of all thank you for not letting me know that you're also using Corona Displacement modifier - this took me good ten minutes to figure it out why displacement in material doesn't work! Corona Displacement modifier overrides any displacement settings in material, hence all your tweakings had no effect whatsoever. Besides, if your house is far from camera, you can safely lower displacement screen size to get much better result. Just don't forget to rise it back before you gonna render close ups. I also quickly fixed your displacement map in photoshop, because it wasn't very good. After that fix, there is no need to use blur offset hack anymore. By the way, don't use blur offset on anything but badly prepared displacement map. On every map it should be set to zero!

I'm attaching 3 renders of your scene: 1 - as i opened it (with CorDispl modifier override), 2 - vith CorDispl modifier disabled and 3 - with my fixed displacement map, which i'm attaching too.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2016-08-04, 21:34:55
Reply #12

nickdagamer

  • Active Users
  • **
  • Posts: 5
    • View Profile
    • RM Design Studio
Apart from removing all the necessary detail from the displacement map, removing the modifier and setting the pixel size to 0.5 did the trick and is looking much better, thanks.
Being an adult is like looking both ways before crossing the road and then being hit by an airplane.

2016-08-04, 21:57:27
Reply #13

tony_morev

  • Active Users
  • **
  • Posts: 37
    • View Profile
thanks Romullus!
looks like right there next to pixels there is a world units option as well, may come handy as well

2016-08-04, 22:12:55
Reply #14

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8850
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Apart from removing all the necessary detail from the displacement map, removing the modifier and setting the pixel size to 0.5 did the trick and is looking much better, thanks.
For such distances you want as clean displacement map as possible. All that "necessary detail" does nothing but degrades image quality. It's much more sensible to add this additional detail via bump or even diffuse maps. And for close ups you can add detail back to displacement by combining several maps through composite or mix nodes.

thanks Romullus!
looks like right there next to pixels there is a world units option as well, may come handy as well
World size units are most useful in case of animation. In almost every other situation screen size is superior.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures