Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => [Max] Resolved Bugs => Topic started by: mantaskava on 2020-04-08, 09:46:12

Title: Difference between old displacement and new displacement
Post by: mantaskava on 2020-04-08, 09:46:12
So I'm baking this displacement map of the tiles in substance designer, but I notice quite a big visual difference between the two types of displacement when rendered in Corona (3DS Max).

Why is that? Or is this supposed to be like this?

Old disp:

(https://i.imgur.com/6lUaiKE.jpg)

New disp:

(https://i.imgur.com/QwEfJmR.jpg)

Thanks
Title: Re: Difference between old displacement and new displacement
Post by: romullus on 2020-04-08, 09:53:11
Did you try to lower displacement screen size and see if that would make the difference to be less pronounced?
Title: Re: Difference between old displacement and new displacement
Post by: mantaskava on 2020-04-08, 10:23:38
Just re-done the test as Romullus suggested and it seems that results doesn't change too much.
Main problem isn't the difference in quality though, but the fact that the shading/reflections looks totally different, like the light would come from different direction in both of these cases.

Old disp 2px:
(https://i.imgur.com/T5QTzpT.jpg)

New disp 1px:
(https://i.imgur.com/8HF412S.jpg)

Difference is best noticed when switching quickly between the two examples.
Title: Re: Difference between old displacement and new displacement
Post by: pokoy on 2020-04-08, 11:53:55
Interesting, looks like the gradients are interpreted differently between the two modes.
Title: Re: Difference between old displacement and new displacement
Post by: romullus on 2020-04-08, 17:08:57
Yeah, the difference is extreme. Interesting to see if it still would be so obvious if you'd render with non-metallic material with low specularity?
Title: Re: Difference between old displacement and new displacement
Post by: mantaskava on 2020-04-08, 18:45:39
New test with glossiness value of 0.5

New disp:
(https://i.imgur.com/JodSaXy.jpg)

Old disp:
(https://i.imgur.com/7YfrNAW.jpg)

Issue still remains basically.
Title: Re: Difference between old displacement and new displacement
Post by: romullus on 2020-04-08, 19:36:00
Very strange indeed. Now the biggest difference is where there is shadow on the wall. I wonder if this is mainly shading issue, or the difference is in actual displaced geometry? Could you do one last comparison? Turn off autobump and render again.
Title: Re: Difference between old displacement and new displacement
Post by: mantaskava on 2020-04-09, 10:28:57
Okay newest version with the auto bump off (which indeed seems to be the cause).

New Disp 2px autobump off:
(https://i.imgur.com/AcBVWqb.jpg)

Old Disp 2px autobump off:
(https://i.imgur.com/n3xIZCy.jpg)

I assume it is a bug then?

Another thing I notice is that new version has considerably more shading "artifacts". And those artifacts gets worse the further you go from camera. Is this expected? Should I just decrease px size to like 1px and forget? Or there's something wrong too?
Title: Re: Difference between old displacement and new displacement
Post by: romullus on 2020-04-09, 10:50:57
I think both issues was discussed in daily builds topic, but they don't have dedicated report thread, so i'm moving your topic to bug reporting board. Let's pass on the baton to the support team.
Title: Re: Difference between old displacement and new displacement
Post by: rowmanns on 2020-04-09, 10:56:32
Hi,

I believe this was caused by autobump and it being interpreted differently between the two displacements.

We looked into this and found that the 2.5d displacement is actually more accurate, and that it was incorrect previously with the old displacement.

I hope this helps.

Rowan
Title: Re: Difference between old displacement and new displacement
Post by: PROH on 2020-04-09, 12:23:48
Hi. IIRC the px value for the new vs old, should be around 2/3 to 1 if you want comparable results. So setting both to 2 is not exactly the same. Try setting the new in the latest test to 1,3 and see if that helps.
Title: Re: Difference between old displacement and new displacement
Post by: mantaskava on 2020-04-09, 15:45:28
Okay so to get the most correctly shaded version should I leave autobump ON or OFF now? With 2.5D displacement I mean.
Title: Re: Difference between old displacement and new displacement
Post by: rowmanns on 2020-04-09, 16:19:46
Hi,

With the 2.5d displacement you should get similar shading whether autobump is enabled or disabled.

Is this not the case?

I just did a quick test with one of our testing scenes for the 2.5d displacement and autobump and it rendered with the same shading with and without autobump.

Cheers,

Rowan
Title: Re: Difference between old displacement and new displacement
Post by: Frood on 2020-04-09, 17:22:16
Is this not the case?

This has been in fact never the case for me. It has been closer to geometry with autobump activated every time and made quite a difference.


Good Luck



Title: Re: Difference between old displacement and new displacement
Post by: mantaskava on 2020-04-10, 10:26:15
So to confirm I made one last test with disp 2.5D + 1px size with autobump on and off and I can say shading is pretty much the same (correct).
In the end the conclusion is: 2.5D disp with autobump on works correctly, while the old disp with autobump on has some weird shading bug.
Title: Re: Difference between old displacement and new displacement
Post by: agentdark45 on 2020-04-10, 14:53:29
Just to follow up here, I recently completed a project with a very finely displaced rug - I ended up having to switch back to the regular displacement mode (1px) as I was getting some weird shading issues with the new 2.5D displacement.

There were some odd "vertical lines" that kept popping up along the length of the rug and would only disappear if A. I increased the scale of the displacement map (bigger/less "threads") or B. I switched to the regular displacement. Auto bump in both scenarios only affected the darkness of the rug (didn't fix the vertical line artefacts in 2.5D mode). I didn't save any images of the issue unfortunately as it was an active project with a tight deadline - I may be able to revisit it later.

There was a noticeable speedup using 2.5D and no visual difference (apart from the artefacting) so it would be great to get this resolved.
Title: Re: Difference between old displacement and new displacement
Post by: TomG on 2020-04-10, 15:25:28
Did the rug geometry have any long, thin polys on it by chance?
Title: Re: Difference between old displacement and new displacement
Post by: agentdark45 on 2020-04-10, 15:38:50
Did the rug geometry have any long, thin polys on it by chance?

I've attached a crop of it (old displacement, 1px), it was fairly evenly subdivided, with supporting edge loops (all quads, uv unwrapped) and an opensubdiv applied on top.

The displacement map is a coronamix map of the edge lines of the colour pattern mixed with a circular noise map jpg (I think taken from one of the stock Corona carpet material displace slots).
Title: Re: Difference between old displacement and new displacement
Post by: maru on 2020-04-13, 15:31:41
Everything has already been said here, but just to confirm:
- Old displacement + autobump currently results in incorrect shading. Using new displacement with autobump is preferred, or old displacement without autobump.
- New displacement can sometimes cause artifacts if the original mesh is not subdivided enough (e.g. flat plane with no subdivisions at all), if it has long, thin polygons, or if it has chamfered edges.
- We are looking into all of these issues, and hopefully in V6 we will have improved 2.5D displacement, which would make the old displacement obsolete.