3
$\begingroup$

I created a sphere and colored its faces in several horizontal stripes like

blue, transparent, blue, transparent... etc

Pretty much when in Object mode & Viewport shading set to Material the backfaces of those circular stripes do not show which is exactly what I'd like to get in the rendered transparent png, but in the rendered png the backfaces show up.

How to get rid of backface colors?

Expected: Backface culling

enter image description here

Current Result

enter image description here

$\endgroup$
  • $\begingroup$ How are you rendering this, Cycles? Blender Internal? $\endgroup$ – Duarte Farrajota Ramos Aug 1 '16 at 16:33
  • $\begingroup$ It would be easier to help you if you edit your question and add images showing your current setup. Then elaborate on what it is exactly that you'd like the to get in the rendered image. $\endgroup$ – cegaton Aug 1 '16 at 16:33
  • $\begingroup$ @DuarteFarrajotaRamos I'm using "Blender Render"... $\endgroup$ – Roko C. Buljan Aug 1 '16 at 16:34
9
$\begingroup$

As far as I know you will probably have to use Node materials for this, I don't think there is any backface-culling options in Blender Internal Render by default, only through node materials.

Active node materials for your Blue Material, add the Blue Material to the default Material node from the dropdown menu.

Now add a new Input > Geometry node and use the Front/Back socket to control the transparency of the material by connecting it to the Alpha socket of the Output node

Backface Culling

$\endgroup$
  • 2
    $\begingroup$ Node editor -> Use nodes. Use "shift a" to add nodes. i.imgur.com/MpKZSFa.png $\endgroup$ – Aoradon Aug 1 '16 at 16:59
  • $\begingroup$ (aside question...) Why that backface culling does not the job by default? What's than used for? $\endgroup$ – Roko C. Buljan Aug 1 '16 at 17:03
  • $\begingroup$ Yes, that's right, thanks @aoradon . You then have to turn on Use Nodes option in the material options, and then pick the Blue material again from the dropdown. $\endgroup$ – Duarte Farrajota Ramos Aug 1 '16 at 17:04
  • 2
    $\begingroup$ @RokoC.Buljan backface culling works only when previewing models in 3D Viewport, it isn't used for rendering. $\endgroup$ – Mr Zak Aug 1 '16 at 17:27
  • 1
    $\begingroup$ @DuarteFarrajotaRamos Sorry for the unrelated question,But where did you get that mouse cursor pack? $\endgroup$ – Omar Emara Aug 1 '16 at 17:53
5
$\begingroup$

For Cycles, you can use the Geometry Node, it has a Backfacing Output:

backfacing

It returns white if a face is seen from the back, and black if it is seen from the front. Fed into the MixShader socket, it switches between the bottom (if white) Shader and the top (if black) Shader

$\endgroup$
0
$\begingroup$

I have actually done this some time ago but I used a different approach.

Instead of using transparent materials I removed the in-between strips physically. The backfaces of the strips remaining were visible until I culled those.

As stated by another contributor, the backfacing doesn't want to disappear when using Blender's built in Renderer but using the GL renderer instead will do the job on my PC at least. Perhaps the video card might give different results on different PC's(?)

I rendered a still (a video will render just as well) with the Backface Cullling ticked. Both the preview and rendered output did remove the backfaces. I also included an alpha layer on the still/video so it can be used as an overlay (Alpha Over) in the Video Sequence Editor.

I laid that over the background pic in the VSE and the result showed the front of the sphere's strips appearing, but importantly, without their backfaces.

I'm not familiar enough with Stack Exchange to upload pics/files yet but I have a zipped file which contains the Blender files, source pic and outputs if you'd like those.

It's just a matter of telling me how to get it to you through this site.

Certainly the ability to remove backfaces on transparent surfaces would be handy.

$\endgroup$
  • $\begingroup$ Yes, probably using a 2nd transparent sphere (as base) is not needed. But regarding the culling/backfaces I had to animate the 3D object and create a video and png sprites. Using Nodes (Duarte's answer) was the key. Thanks for the additional input on your solution! Will try one day $\endgroup$ – Roko C. Buljan Aug 8 '16 at 13:18

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.