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$
3
  • $\begingroup$ How are you rendering this, Cycles? Blender Internal? $\endgroup$ Aug 1, 2016 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$
    – user1853
    Aug 1, 2016 at 16:33
  • $\begingroup$ @DuarteFarrajotaRamos I'm using "Blender Render"... $\endgroup$ Aug 1, 2016 at 16:34

3 Answers 3

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$
6
  • 2
    $\begingroup$ Node editor -> Use nodes. Use "shift a" to add nodes. i.imgur.com/MpKZSFa.png $\endgroup$
    – Striar
    Aug 1, 2016 at 16:59
  • $\begingroup$ (aside question...) Why that backface culling does not the job by default? What's than used for? $\endgroup$ Aug 1, 2016 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$ Aug 1, 2016 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, 2016 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, 2016 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$
4
  • $\begingroup$ This is nice, but the user mentioned he was using Blender Internal Render, not Cycles. $\endgroup$ Aug 1, 2016 at 16:57
  • $\begingroup$ ups, I missed that comment. maybe wasn't there while I did the screenshots... $\endgroup$
    – aliasguru
    Aug 1, 2016 at 16:58
  • $\begingroup$ @aliasguru Yes he commented afterwards, I was also about to post for cycles before he mentioned it, hehe. $\endgroup$ Aug 1, 2016 at 17:06
  • $\begingroup$ @roko-c-buljan See here blender.stackexchange.com/questions/5820/… $\endgroup$ Aug 1, 2016 at 17:07
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$
1
  • $\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$ Aug 8, 2016 at 13:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .