Page 1 of 1

bidir vs pathocl Shading

Posted: Tue Aug 06, 2019 6:49 am
by lacilaci
I've got some weird gradients going on with bidir, note the part on the top of the image...

bidir:
bidirmetro_shading.jpg
pathOCL:
pathOCL_shading.jpg
blender file:
shading_issue.blend
(1.84 MiB) Downloaded 121 times

Re: bidir vs pathocl Shading

Posted: Tue Aug 06, 2019 7:06 am
by FarbigeWelt
lacilaci wrote: Tue Aug 06, 2019 6:49 am I've got some weird gradients going on with bidir, note the part on the top of the image...

bidir:
bidirmetro_shading.jpg
pathOCL:
pathOCL_shading.jpg

blender file:
shading_issue.blend
I have no access to my PC at the moment and cannot look at the object. This is why I ask a few questions.
Is the object smooth or flat shaded?
Do you see a gradient in solid openGL preview in viewport too?
If yes you can avoid this. Extrude top surface in edit mode. Move extruded surface a short way upwards (z-axis) just so that you can distinct vertices in top corners. The openGL shading should be uniform now. The render will be too.

Re: bidir vs pathocl Shading

Posted: Tue Aug 06, 2019 7:12 am
by lacilaci
FarbigeWelt wrote: Tue Aug 06, 2019 7:06 am
lacilaci wrote: Tue Aug 06, 2019 6:49 am I've got some weird gradients going on with bidir, note the part on the top of the image...

bidir:
bidirmetro_shading.jpg
pathOCL:
pathOCL_shading.jpg

blender file:
shading_issue.blend
I have no access to my PC at the moment and cannot look at the object. This is why I ask a few questions.
Is the object smooth or flat shaded?
Do you see a gradient in solid openGL preview in viewport too?
If yes you can avoid this. Extrude top surface in edit mode. Move extruded surface a short way upwards (z-axis) just so that you can distinct vertices in top corners. The openGL shading should be uniform now. The render will be too.
Thanks, I'm aware how shading works. It would be kinda weird if I didn't by now :D it would also look the same in OCL rendering as in bidir if that was the case...

It's a simple flat plane, tried reseting normals, smoothing, flattening normals, reversing normals... and idk what else..

Re: bidir vs pathocl Shading

Posted: Tue Aug 06, 2019 8:44 am
by Dade
lacilaci wrote: Tue Aug 06, 2019 6:49 am I've got some weird gradients going on with bidir, note the part on the top of the image...
I'm aware of this problem but I have yet to investigate the source, it must be something in MIS weights.

Re: bidir vs pathocl Shading

Posted: Tue Aug 06, 2019 9:21 am
by lacilaci
Is there some ETA on this? I need caustics(POOL) for my next project that means only bidir+metro+LOT of rendertime...

For me that means either bidir+metro but there is this shading issue, or wait until lighttracing gets vertex merging, not sure which will come sooner and my only other option is fake caustics+cycles and I really don't want to go back to cycles now that 2.8 will have luxcore addon...

Re: bidir vs pathocl Shading

Posted: Tue Aug 06, 2019 9:48 am
by FarbigeWelt
lacilaci wrote: Tue Aug 06, 2019 7:12 am
Thanks, I'm aware how shading works. It would be kinda weird if I didn't by now :D it would also look the same in OCL rendering as in bidir if that was the case...

It's a simple flat plane, tried reseting normals, smoothing, flattening normals, reversing normals... and idk what else..
Actually I did not expect anything else from someone with experienced skills. 😃 But even close to perfection people forget sometimes the simplest things.

However, until yesterday I thought to know how Blender deals with surfaces and shading. What was that of an error! I have to post my latest observations this evening maybe someone of the forum has the explanations. There must be some hidden parameters of a triangle‘s surface which are independent on vertices and surface normal and these parameters are responsible for different smooth shading tones. :!: :?: :!:

Re: bidir vs pathocl Shading

Posted: Tue Aug 06, 2019 9:57 am
by lacilaci
FarbigeWelt wrote: Tue Aug 06, 2019 9:48 am
lacilaci wrote: Tue Aug 06, 2019 7:12 am
Thanks, I'm aware how shading works. It would be kinda weird if I didn't by now :D it would also look the same in OCL rendering as in bidir if that was the case...

It's a simple flat plane, tried reseting normals, smoothing, flattening normals, reversing normals... and idk what else..
Actually I did not expect anything else from someone with experienced skills. 😃 But even close to perfection people forget sometimes the simplest things.

However, until yesterday I thought to know how Blender deals with surfaces and shading. What was that of an error! I have to post my latest observations this evening maybe someone of the forum has the explanations. There must be some hidden parameters of a triangle‘s surface which are independent on vertices and surface normal and these parameters are responsible for different smooth shading tones. :!: :?: :!:
I have a feeling that you might have ran into a problem of custom normals in blender, where these are often not exported to luxcore and cause a LOT of trouble especially when you use CAD models or create custom breaks of normals in blender... very annoying but it just might be a blender bug/problem