Blender Floating-point precision in the Render engine.

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
bannerboy
Posts: 0
Joined: Sun Sep 05, 2004 1:18 am

Blender Floating-point precision in the Render engine.

Post by bannerboy » Mon Jan 23, 2006 11:37 pm

If you are experienced with blender you have probubly notaced this. if you have two parallel faces, sometimes the render will do weird things, such as render half of the front face, and half the one behind it. or it could cause the front face to cast shadows on the back face, but the back face is the one that gets rendered. this usually doesn't happen for the entire face either, usually its for part of the face. The other thing I have notaced, is that this does not happen with yafray, only with the blender internal render engine. I am guessing (correct me if I'm wrong.) that this is probably caused by using floating-point variables that do not have enough precision to handle the close together planes when the camera is far away, and so you get rounding errors. these problems usually only occour at a distance, and not with objects close to the camera in relation to the distance between them.

I hope I made some sence here, but I am notacing this problem quite a bit, and it is getting annoying. I realize that in order to fix this you would have to make some major adjustments to the rendering source code, but I would like to see it fixed.

I will post a picture as soon as I have my webspace working agin.

LetterRip
Posts: 0
Joined: Thu Mar 25, 2004 7:03 am

Post by LetterRip » Tue Jan 24, 2006 1:48 am

upload a blend file and a image showing the issue for testing to the bug tracker, it shouldn't happen, and I don't notice it here.

LetterRip

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv » Tue Jan 24, 2006 4:13 pm

This sounds more like a z-buffer problem which could be related to the Clipping Start and End values set on your Camera. A .blend would tell us more.

bannerboy
Posts: 0
Joined: Sun Sep 05, 2004 1:18 am

Post by bannerboy » Tue Jan 24, 2006 9:52 pm

I would not clasify this problem as a "bug" simply because it does the same thing in blender 2.32 as it does in 2.4. and you will get slightly different results on different versions, and different archetectures. the .blend file is comming, but I need to get my webspace working so that I can upload it for you.

LetterRip
Posts: 0
Joined: Thu Mar 25, 2004 7:03 am

Post by LetterRip » Tue Jan 24, 2006 11:45 pm

the bug tracker has an upload function, so as long as it is a fairly small blend you should be able to upload it to the bug tracker without problems..

LetterRip

bannerboy
Posts: 0
Joined: Sun Sep 05, 2004 1:18 am

Post by bannerboy » Wed Jan 25, 2006 1:04 am

Ok, I got my webspace working, so you guys can have a look at it:
http://www.evertek.net/engedi/blender/test.blend

Here's the render on blender 2.40 with X86_64:
Image

Here's the render on blender 2.40 with i386
Image

Here's the render on blender 2.32 with i386
Image

I'm gonna upload it to the bug tracker right now.

Lynx3d
Posts: 0
Joined: Tue Jan 24, 2006 5:09 pm

Post by Lynx3d » Thu Jan 26, 2006 1:07 pm

In any case, (almost) co-planar polygons should be avoided. They cause problems in many renderers.

Though interestingly, if you put a plane with raytraced transparency between camera and objects it renders fine (for me at least).
I don't know Blender's internal renderer good enough (yet), but apparently the decision on which polygon is to be shaded could need some improved precision when even raytracers with single-precision floats do it correctly...?

bannerboy
Posts: 0
Joined: Sun Sep 05, 2004 1:18 am

Post by bannerboy » Thu Jan 26, 2006 9:42 pm

Here is an example image of what I am doing with the obvious errors circled. ther are more than I have circled, but this should give you an idea of what I'm working with.

Image

bannerboy
Posts: 0
Joined: Sun Sep 05, 2004 1:18 am

Post by bannerboy » Sun Jan 29, 2006 9:12 pm

One other little note, this also happens with the new render system under the orange cvs branch

Post Reply