How to control culling in WebGLRenderer

Hello everyone and sorry for bothering you again, but I’m stuck with a small problem here:

I am visualising a simulated and “ideal” radio network consisting of equally shaped radio cells. These cells are merged together in one large mesh to improve performance. The problem is, when I move (scroll) the center of those meshes out of the view port, the whole mesh disappears. I understand that this has something to do with culling but I did not find any way to manipulate this behavior.

The field _cullEnabled in WebGLRenderer has private access, so disabling does not work for now without modifying the Renderer. Besides that, are there other Culling methods available behaving better in this case?

Here are two screenshots:

http://dl.dropbox.com/u/18449425/culling1.jpg
http://dl.dropbox.com/u/18449425/culling2.jpg

Note, that the highlighted sphere in the center of the first image is the same on the left edge in the second one.

Author: Fantashit

1 thought on “How to control culling in WebGLRenderer

  1. For those of us who will find this after a google search, back-face culling seems to be controlled by the material in current version of three.js (at least > 0.71), and default to ON (only front-facing faces are displayed). This is a good default as it will make rendering faster. In the source code, src/materials/Material.js, the Material constructor set the default sidedness to THREE.FrontSide.

    material.side = THREE.DoubleSide; // will make it so that front and back faces are displayed
    

Comments are closed.