0
\$\begingroup\$

I am trying to make a chain link fence using planes and a .png image as the texture, I am importing the whole environment from blender however this problem keeps on appearing, the plane gets the .png file and you can see through the fence only on one side, if you turn to the other side then the plane disappears completely. However this doesn't happen in blender when I render the image. I have tried importing the .blend file to unity and using an .fbx file however it still appears that way. Any idea on how to fix this problem?

\$\endgroup\$
  • \$\begingroup\$ I'm not too familiar with Blender, but isn't there an option to tell your plane to render both sides? \$\endgroup\$ – Vaillancourt Sep 22 '15 at 0:24
1
\$\begingroup\$

I think you actually mean a quad. A quad consists of 2 triangles, even if blender doesnt show that. A triangle - and with that - a quad, has a normal. Consider it to be the front of the quad. Usually, we dont draw the back of a quad because we don't need to. Rendering is roughly twice as fast when we dont draw the triangles that face the other way, and you usually dont see that we cull them, because they're normally occluded by other triangles. In this case, it is a little more difficult. We need to duplicate the quad, and make the copy face the other way. In blender, select your quad (or plane, if you want to keep calling it that). Shift-d to duplicate the vertices. Just move it slightly away to the side that you cant see in the other program. Press w. Click flip normals. Save and export. Im not sure if this is what the problem is but it sounds like it.

\$\endgroup\$
  • 2
    \$\begingroup\$ There's no need to translate the vertices used in the reflected quad. They can in fact use the exact same vertices. This saves some memory and is slightly faster since it allows the use of the post-transform vertex cache (back face culling occurs during primitive assembly; after vertex processing), though you won't ever notice any difference for just one quad. There is no danger of z-fighting because when back-face culling eliminates one of the quads, it prevents it from being rasterized at all; the depth buffer won't be written. \$\endgroup\$ – bcrist Sep 22 '15 at 4:52
  • \$\begingroup\$ You're absolutely right. But personally, with just a couple of quads, I'll go for the ease of duplicating and flipping in blender. But I guess I'm kind of a lazy developer. But I'm actually interested in how you would do this. Could you post it as an answer? \$\endgroup\$ – Peethor Sep 22 '15 at 10:26
  • \$\begingroup\$ I don't generally use blender, but in maya, I would just use the "append to polygon" tool, click one edge of the quad, then the opposite edge. If the geometry were more complicated than a single quad, I'd do about what you suggested: duplicate the mesh; reverse the face normals on the new mesh (but not the old one), then select both meshes, combine them into a single mesh, select all the vertices, and merge the duplicate ones (shift-right-click -> merge vertices). \$\endgroup\$ – bcrist Sep 23 '15 at 0:42
  • \$\begingroup\$ Note that this technique doesn't work if you need accurate vertex normals for lighting, as the normals for one side will be different than the normals for the other side, but for the vertices to be considered "the same" all their attributes must be identical, including normal direction. But for the purposes of face culling, only the winding order and position of the vertices matters. \$\endgroup\$ – bcrist Sep 23 '15 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.