|
Post by hokiecsgrad on Feb 12, 2019 3:41:36 GMT
I'm running into a problem with the Checker pattern that I can't figure out. I'm getting an effect that looks a lot like the "acne" effect that was mentioned in the shadows chapter, but only when applied to a plane. Seems to be fine when it's on a sphere. See the screen cap. I suspect it has something to do with transforming the pattern itself, but I'm not quite sure what. The code to generate the picture is: Plane floor = new Plane(); floor.Transform = Transformation.Rotation_x(-0.174533); floor.Material = new Material(); floor.Material.Pattern = new Checkers(new Color(1, 1, 1), new Color(0, 0, 1));
Note: already fixed the gradient on the sphere by transforming the pattern itself, thanks to another post on the forum for that tip!
|
|
|
Post by Jamis on Feb 12, 2019 5:21:33 GMT
hokiecsgrad -- I can't duplicate this with the snippet you've included, sadly. Can you share more of your scene, at least the camera and light source definitions? I'll see what I can do. Offhand, though, I'd say it looks a lot like what would happen if floating point round-off were causing the boundary of your checkers pattern to oscillate. That is to say, one pixel is just a tiny bit below the boundary for blue, and the next pixel just a tiny bit above. What happens if you add a translation to the pattern, moving it just a tiny amount (say, 0.1) in y?
|
|
|
Post by hokiecsgrad on Feb 13, 2019 0:47:51 GMT
Yep, that was the problem. Thanks for leading me in the right direction.
|
|
|
Post by hokiecsgrad on Feb 18, 2019 2:47:38 GMT
So, I tracked down the root of this problem. When I first created the Lighting function for the materials, I passed the comps.point into the function instead of comps.over_point. That was causing almost all of my patterns to looks weird. That one small fix made a huge difference.
|
|
|
Post by lechgu on Mar 28, 2019 21:18:06 GMT
I got the same problem, changing from comps.point to comps.over_points fixes it. Thanks
|
|
|
Post by AlpacaHacker on Apr 15, 2019 13:19:18 GMT
I, too had the some problem. I thought it was my multiple colour code that was doing it!
|
|
rdm
New Member
Posts: 4
|
Post by rdm on Apr 24, 2019 12:37:50 GMT
Same problem, a bit less severe, same y=0 plane IEEE error.
I may be wrong, but both using the offset point along the normal or just avoiding setting the plane exactly at y = 0, are just workarounds and the problem may reappear under different setups.
- point_offset is a general workaround but introduces the fix inside the rendering to solve a scene issue. Will that affect other renderings? No idea... - moving the plane fixes a local scene issue locally, but that's it: you don't get any bonus from it and you have to apply it in every scene.
Is one of the two solutions preferable to the other? Is there a better one?
Cheers!
|
|
|
Post by acordmiguel on Aug 20, 2019 7:44:02 GMT
I'm running into a problem with the Checker pattern that I can't figure out. I'm getting an effect that looks a lot like the "acne" effect that was mentioned in the shadows chapter, but only when applied to a plane. Seems to be fine when it's on a sphere. See the screen cap. I suspect it has something to do with transforming the pattern itself, but I'm not quite sure what. The code to generate the picture is: Plane floor = new Plane(); floor.Transform = Transformation.Rotation_x(-0.174533); floor.Material = new Material(); floor.Material.Pattern = new Checkers(new Color(1, 1, 1), new Color(0, 0, 1));
Note: already fixed the gradient on the sphere by transforming the pattern itself, thanks to another post on the forum for that tip!
|
|
|
Post by acordmiguel on Aug 20, 2019 7:44:25 GMT
I'm running into a problem with the Checker pattern that I can't figure out. I'm getting an effect that looks a lot like the "acne" effect that was mentioned in the shadows chapter, but only when applied to a plane. Seems to be fine when it's on a sphere. See the screen cap. I suspect it has something to do with transforming the pattern itself, but I'm not quite sure what. The code to generate the picture is: Plane floor = new Plane(); floor.Transform = Transformation.Rotation_x(-0.174533); floor.Material = new Material(); floor.Material.Pattern = new Checkers(new Color(1, 1, 1), new Color(0, 0, 1));
Note: already fixed the gradient on the sphere by transforming the pattern itself, thanks to another post on the forum for that tip!
|
|