Why do Matlab surfaces disappear when the camera is too close?

640 views Asked by At

I'm creating a surface using elevation data and texturing it with orthoimagery to render terrain in Matlab. I'd like to be able to render the view from the perspective of a small UAV flying around. However, when I move the camera too close to the surface, it disappears. Note that I have set the projection to perspective, and I am manually setting the camera position, target, and view angle. Does anyone know what causes this and how to fix it?

Edit: As I've been playing with things, it seems like it has problems when part of the surface lies behind the camera. Either things start getting distorted and rendered weird, or the entire surface just disappears. Is there an easy way get around this?

Edit 2: I ran across this example of moving the camera through a scene. However, it looks like it uses patches instead of a surface. I also found this function to convert surface data to patch data. However, it does not seem like you can map textures onto patches like you can onto surfaces. Any thoughts? I suppose I could break the terrain up into a grid of small surfaces for rendering purposes.

0

There are 0 answers