Baking Bevel in Cycles

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Baking Bevel in Cycles

Post by Dade »

AndreasResch wrote: Thu Mar 04, 2021 11:49 am Here's a comparison of the two bakes ...
Image
I'm saying that the left image is likely to have a gamma 2.2 while the left is 1.0 (i.e. untouched).
Support LuxCoreRender project with salts and bounties
AndreasResch
Posts: 135
Joined: Fri Jul 06, 2018 9:32 am

Re: Baking Bevel in Cycles

Post by AndreasResch »

Dade wrote: Thu Mar 04, 2021 12:53 pm I'm saying that the left image is likely to have a gamma 2.2 while the left is 1.0 (i.e. untouched).
You are correct. But inside Blender I don't seem to have an option to adjust the gamma of an image texture. As long as I know which color space I have to use for baking, that's fine.

One other thing though. Do you have an idea, why in Luxcore the edges are that black at a glancing angle when using the bevel normal map? It's more subtle using Cycles.
Image
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Baking Bevel in Cycles

Post by Dade »

AndreasResch wrote: Thu Mar 04, 2021 1:28 pm One other thing though. Do you have an idea, why in Luxcore the edges are that black at a glancing angle when using the bevel normal map? It's more subtle using Cycles.
I have the feeling that the bevel is all placed on one face (so the shading normal goes from 0 degree to 90 degree) instead of being split between the two adjacent faces (so the shading normal goes from 0 to 45 degree on one face and from 45 to 0 on the other face).

If you overlap the UV unwarp and the normal map, you should see if the bevel is all on one side of the edge or the edge is in the middle.
Support LuxCoreRender project with salts and bounties
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Baking Bevel in Cycles

Post by B.Y.O.B. »

AndreasResch wrote: Thu Mar 04, 2021 1:28 pm But inside Blender I don't seem to have an option to adjust the gamma of an image texture.
If you use the normal map option, gamma is set to 1 by the Blender addon.
AndreasResch
Posts: 135
Joined: Fri Jul 06, 2018 9:32 am

Re: Baking Bevel in Cycles

Post by AndreasResch »

Dade wrote: Thu Mar 04, 2021 3:43 pm
AndreasResch wrote: Thu Mar 04, 2021 1:28 pm One other thing though. Do you have an idea, why in Luxcore the edges are that black at a glancing angle when using the bevel normal map? It's more subtle using Cycles.
I have the feeling that the bevel is all placed on one face (so the shading normal goes from 0 degree to 90 degree) instead of being split between the two adjacent faces (so the shading normal goes from 0 to 45 degree on one face and from 45 to 0 on the other face).

If you overlap the UV unwarp and the normal map, you should see if the bevel is all on one side of the edge or the edge is in the middle.
I use the same map in Cycles and Luxcore here. Cycles just renders the edges a bit brighter and in doing so, more pleasing to the eye. The same for Eevee. So if that was possible in Luxcore as well, that would be nice.
AndreasResch
Posts: 135
Joined: Fri Jul 06, 2018 9:32 am

Re: Baking Bevel in Cycles

Post by AndreasResch »

I slammed the normal map that I baked earlier onto a sphere to see what's happening. While the normal mapping effect looks pretty identical in facing areas, on a glancing angle the Luxcore version shows dark areas that are not visible in the Cycles version. Maybe that's the same effect that we can see in the other rendering with the blocks.

Image
User avatar
TAO
Developer
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Baking Bevel in Cycles

Post by TAO »

I have seen the exact same issue in other renders. If you use a Normal bump it will happen, it's the same for the regular images on the bump slots too.
I tried non-color images for bump and normal bump and it helps a lot but not completely.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Baking Bevel in Cycles

Post by B.Y.O.B. »

Cycles has code to ensure that the normal stays valid after bump/normal mapping is applied: https://developer.blender.org/D2574
Maybe this is responsible for the difference?
User avatar
TAO
Developer
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Baking Bevel in Cycles

Post by TAO »

B.Y.O.B. wrote: Thu Mar 04, 2021 7:01 pm Cycles has code to ensure that the normal stays valid after bump/normal mapping is applied: https://developer.blender.org/D2574
Maybe this is responsible for the difference?
The resource you mention is exactly what happens here in render for me. i get the same results as the old image in the link you mention.
Except for a little bit of darkness for using the color image on the bump.
AndreasResch
Posts: 135
Joined: Fri Jul 06, 2018 9:32 am

Re: Baking Bevel in Cycles

Post by AndreasResch »

Hmm. If it also happens to bump maps, this would explain why a wood material that I tried to convert to Luxcore looked a bit off. It had a very fine bump map that just looked odd, when looked at from a glancing angle.
Post Reply