Page 1 of 1

Possible bug

Posted: Wed Apr 10, 2019 8:47 pm
by IngvarH
Did a simple test render to test some HDRI I made in Terragen 4. Just 4 default spheres (glass, matte, metal and plastic) on a default plane. But I discovered something that to me looks like a rather serious bug. Look at the second sphere, the perfectly matte one. This can't be right.
Image

\Ingvar H

Re: Possible bug

Posted: Wed Apr 10, 2019 9:41 pm
by lebulb
The fourth too,
and if you add a normal map, it will be even worse

You need to have a denser mesh to reduce the problem,
but that does not make it disappear.

It's not really a bug,
I do not remember where this problem comes from (high roughness...)

it makes textile rendering almost impossible (with normal map)
I wanted to make a post about it

Re: Possible bug

Posted: Wed Apr 10, 2019 10:25 pm
by lebulb
I would make a more consistent post later,
but here is the problem...

in this case, with a normal map,
densify the mesh does not solve the problem,
it makes a very hard shadow line.

It would be nice if NL arranged this because it's demoralizing.

Image

Re: Possible bug

Posted: Thu Apr 11, 2019 10:23 am
by IngvarH
Honestly, this looks to me like the kind of problem me and a friend found when we developed the first raytracer for 3ds max, in the early 90's (or, at that time, for 3ds because this was before 3ds max).

When you render with a scanline renderer this is not a problem at all as the roundness of polygonal surfaces is simulated. This does become a problem in a raytracer, and especially at glancing angles. If you look at this pic:
Error2.jpg
You see the yellow polygonal surface, from the side. The white line is the "real" surface the polygonal one approximate. When you test the lightray (red) against the polygons you see that it misses the top surface. But it would have hit the "real" surface, and bounced away from it (the blue ray). This is one of the complications you discover when you develop a raytracer. Another problem is obviously how to calculate the "real" surface from the plygonal one. All you have are the normals at the vertices, but the shape of the "real" surface is unknown, so you have to make a guess. Which obviously makes it easier if the plygonal mesh is denser, as any error in that case becomes smaller.

This error might of course be something completely different, but it sure looks like the kind of complication we discovered in the early 90's.

\Ingvar H

Re: Possible bug

Posted: Thu Apr 11, 2019 12:05 pm
by Forum Moderator
Yes, as Ingvar said, all the raytracers suffer from this issue as we cannot make up geometry or light rays hits where they don't exist. It's called shadow termination issue. As long as the rays hit the mesh we have tools to handle the situation, but if the light rays don't hit the surface... it gets complicated.
We have tried to diminish this effect as much as we could, but strong bump and high roughness combined with low mesh resolution and strong hard lights make it show.

Best,
Fernando

Re: Possible bug

Posted: Thu Apr 11, 2019 2:51 pm
by lebulb
Yes, I remember a post "v3 : behin the scene".
Tom had made a picture before/after (a red leather, the post has disappeared from the forum)
There was an improvement in the rendering of the normal map.

I hope it can be improved more one day because it is really visible in some cases.

Re: Possible bug

Posted: Wed Apr 17, 2019 6:07 am
by Nasok
Yeah, it does really looks that mesh that you've got there is pretty low-res, but also feels like normals could be smoothed-out. for instance, in Maya, we have quite a number of tools to work with normals, which definitely helps to mimic the "ideal" surface .. which sometimes different from the one that we have (very handy for a low-poly workflow)
Also, keep in mind that Maxwell render work much better when normal map (texture itself) is higher than 8bit .. so go for 16 bit at least.

Check out the comparison here:
Darth_Sidious_normal_map_comparison.jpg
on the right image I've used a 8bit normal map (exported from Substance painter) .. might not look too obvious due to grungy look but you can really see the rectangular glitch thingy there.
on the left image I've exported same normal map but in 16bit depth.
Everything is the same - only normal map changed.

Hope it helps :)
Cheers,
Tim.