Backface cull (partial solution)

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

Post Reply
Fr
Posts: 0
Joined: Fri Oct 20, 2006 3:34 am

Backface cull (partial solution)

Post by Fr »

Until Blender gets support for backface culling in the viewports (that is, not drawing faces which are pointing away from the camera), interior modeling will continue to be a nightmare.

I've written a little Python script to add this feature, though it's still not ideal because you have to select it from the menu every time you load Blender.

So for anyone else who's frustrated with Blender's lack of culling, or anyone who doesn't understand what it is and why it's a good idea, you can install this script, then go to Scripts > Render > Backface Cull

http://www.foon.co.uk/x/cull.py.txt

mpan3
Posts: 0
Joined: Wed Mar 24, 2004 7:16 pm

Post by mpan3 »

awesome, many thanks!

this simple script does many things for me:
-boost graphic performance while working with high-poly models
-easy to spot reversed normals
-de-clutter the scene while working on certain projects

:D

FourMadMen
Posts: 0
Joined: Tue Jul 13, 2004 5:13 am

Post by FourMadMen »

I usually consider myself a pretty bright guy, but I don't see where this does anything in the viewports. I can't see where anything is being culled.

Fr
Posts: 0
Joined: Fri Oct 20, 2006 3:34 am

Post by Fr »

Good to see it's of use, mpan. I guess it would boost the performance, since Blender essentially renders each polygon twice (front and back) by default.

FourMadMen: Try this: Make a cube, flip its normals, then go scripts->render->backface cull. If that cube were a room you'd then be able to see the inside faces to work on them.

If it were up to me, blender wouldn't draw *any* backfaces unless you set the specific face to be 2-sided. This would have the side-effect of speeding up performance, too.

snovak
Posts: 0
Joined: Tue Apr 11, 2006 10:41 pm
Location: South Florida
Contact:

dead link....

Post by snovak »

... any chance you could repost or update the link to this script? That would rock, thanks!

-Sean

Fr
Posts: 0
Joined: Fri Oct 20, 2006 3:34 am

Post by Fr »

Sorry, looks like I've lost that script some time during the past 4 years. I think Blender might actually have this feature now -- not sure though, I haven't needed it recently.

The script was very simple, though. It was something like:

Code: Select all

import gl

gl.Enable(gl.GL_CULL_FACE)
gl.CullFace(gl.BACK)
... maybe with a few lines to redraw the interface. If you're willing to mess around with it a bit you could probably get it working.

Post Reply