Jagged lines in rendering

Hi, total newbie with 3D in touchdseigner.

While playing with instances i get these strange jagged lines in polygons and i’d like to avoid and fix this ugly effect.

This is a common problem that has to do with float rounding errors and general lack of precision in your depth buffer. Your depth buffer is how the render top knows which face of the box to put in front of the other.

This happens when you have really huge scenes OR when your camera’s near and far planes are not tuned correctly. For example I can recreate your issue by setting a very small near value, and the far value it seems makes no difference, small or large.

That’s because depth is not linear in perspective cameras. You have a LOT of precision up close to the camera, but as you get further away it gets less precise in a non linear fashion.

Since you never realistically need to be 0.0001 units away from your cube, you can afford to push the near plane out some.

Usually just moving the decimal place to the right a couple spots does the trick:

If you want to get a rough idea of far you are from an object’s origin, (to get an idea of how big you can make the near plane), use an object chop and set it to “measurements” and turn on “Distance” in the Output page, and plug your geo and your camera into target and reference parameters.


In my example I am ~26 units away from my cube, so if I know I will not really be getting much closer I can definitely afford to make my near clip even larger, something like 0.1 or 1.0 would give us more precision even.

This may not be necessary unless you have really large scenes with things very far away and not terribly close to the camera.

2 Likes