# Mobile 3D engine renders alpha as full-object transparency

I am running a iOS project using the isgl3d framework for showing pod files.

I have a stylish car with 0.5 alpha windows, that I wish to render on a camera background, seeking some augmented reality goodness.

The alpha on the windows looks okay, but when I add the object, I notice that it renders the entire object transparently, where the windows are. Including interior of the car.

Like so (in example, keyboard can be seen through the dashboard, seats and so on. should be solid)

The car interior is a seperate object with alpha 1.0.

I would rather not show a "ghost car" in my project, but I haven't found a way around this.

Have anyone encountered the same issue, and eventually reached a solution ?

• Try turning off the alpha write mask when you render the car. – Ryan S Apr 18 '12 at 14:18

(No experience with 3D programming on iOS, but this should work on regular OpenGL devices.)

I can think of 2 options that might fix this.

Try separating the model in 2 parts, first render the opaque part and then render the transparent part.

Another option might be to disable alpha writing when rendering the object. What I think is happening is that when the window is rendered the alpha value is simply written to the color buffer. When then rendering the color buffer over the camera image the windows are alpha blended with the image behind it, causing ghost cars.

SOLVED: Thanks to Demi. Here is the final code:

// Render opaque objects
[_scene render:renderer opaque:true];

// First planar shadow pass (if needed)