1
\$\begingroup\$

I have a spherical clipmap based planet terrain. The entire planet is made from a ring geometry of 1 unit which the vertex shader moves to cover the entire planet of 6 million unit radius. But the planet gets culled whenever the starting point for this geometry isn't in the camera's view (which is 99.9999% of the planet).

What's the best solution for making sure the planet is viewable even when the original mesh isn't?

This is based on WebGL and Three.js.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Is there even any point in culling the entire planet? I presume part of it's going to be in view almost all the time. However, if you google "sphere frustum clipping" you should find plenty of articles on the subject. \$\endgroup\$ Aug 11, 2013 at 3:57
  • \$\begingroup\$ Right, don't cull the entire planet, just the surface triangles. \$\endgroup\$
    – RandyGaul
    Aug 11, 2013 at 3:58
  • \$\begingroup\$ I'm not culling the planet on purpose. I'm asking how I can keep it from being culled whenever the 1 meter ring geometry isn't in view. \$\endgroup\$ Aug 11, 2013 at 4:17

1 Answer 1

2
\$\begingroup\$

The solution is to set the boundingSphere attribute on the original geometry to the radius of the planet. Now even though only the vertex shader moved triangles are in view, I can still see the planet.

\$\endgroup\$

You must log in to answer this question.

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