danielmhanover
danielmhanover

Reputation: 3124

OpenGL ES Drawing Transparent Artifacts

I am attempting to draw an OBJ file to the screen in an iOS app using this library. The OBJ file is supposed to be a solid 3D model of teeth, as shown below, but when rendered in the iOS app, it shows up very grainy, and transparent, as shown in this image. How can I draw the surface a uniform, opaque color?

I am using a solid-white image file as the texture, and have not otherwise modified the default settings.

Solid 3D model, shown properly

All help is greatly appreciated.

Upvotes: 0

Views: 206

Answers (1)

solidpixel
solidpixel

Reputation: 12069

"Grainy" just looks like you are rendering multiple layers of triangles with blending enabled, and some triangles are being dropped for some reason so those areas are lighter than their neighbours.

Hard to tell why without looking at the model (could be the facing test, or the depth test with very out-of-order triangle streams). In general try disabling the facing test, enabling the depth test, and disabling blending

Upvotes: 1

Related Questions