11
$\begingroup$

I'm experimenting with drawing textures onto the model. I'm trying to render what I've got so far, but my renders come out with these strange black or white rectangles all the way down the blade edge. Anyone know a fix for this?

render with errors

$\endgroup$
1
  • $\begingroup$ Some of your issues (the handle area) are from textures $\endgroup$
    – J Sargent
    Commented Jan 23, 2015 at 17:57

1 Answer 1

11
$\begingroup$

It all came down to a loss of precision in the depth buffer, let me explain.
You have your camera's Start Clipping set to .001, that is tiny. If you turn on the display limits of the camera you will start to see the problem. camera clipping limits
The camera is in the red box, and your sword is in the blue box, over 60 units away. Now with the start clip set to 0.001 (the default is 0.1) there is a lot of wasted calculations, leading to a loss in precision.

The blender manual has a note about such behavior with a large clipping range.

This Quote from an article on MSDN explains it well.

The near plane and far plane are the final pieces required to calculate the projection matrix. The more closely together the planes are, the more precise the values in the depth buffer.

The depth buffer can be 16-bit, 24-bit, or 32-bit, with values between 0 and 1. Generally, depth buffers are fixed point, with the values close to the near plane grouped more closely together than the values close to the far plane. The degree of precision available to the depth buffer is determined by the ratio of the near plane to the far plane. Using the tightest possible near/far plane could allow use of a 16-bit depth buffer. A 16-bit depth buffer could reduce the use of memory while increasing processing speed.

So a simple fix, is to set the camera's start clipping to a bigger number, even 0.1 works, but as your scene is currently set up you could go as high as 60.


Changing the camera settings will fix the problem, however you still have a huge sword.
If you look at the dimensions (in the properties panel N) of your sword it is 31 meters tall!

Just scale down the sword with S, until it is about a meter. Then reposition the camera.

The other option is to scale down your entire scene, then change the strength of your lamps.

This has the same effect as changing the clipping on the camera, because there is now less space blender has to calculate.

So really this was a story of way too big, and way too small. Pay attention to your numbers, and even use real world units.

$\endgroup$
2
  • 2
    $\begingroup$ You are a beautiful person. Thank you for this :) $\endgroup$ Commented Jan 23, 2015 at 21:38
  • $\begingroup$ Is it ok to use real world units if my object is 3 million km wide? :D I'm having a lot of problems with what are probably these clip start/end issues. $\endgroup$
    – endolith
    Commented Sep 13, 2020 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .