Home Technical Talk

Maya mental ray backface culling render?

polycount sponsor
Offline / Send Message
malcolm polycount sponsor
Anyone know how to turn on backface culling when doing a mental ray render in maya. By default it renders both sides of a a model kind of annoying.

Replies

  • glib
    Options
    Offline / Send Message
    I just took a quick look, but it seems that disabling 'double sided' in the object's attributes under 'render stats' did the trick.

    FYI it renders both sides in maya software by default until 'double sided' is disabled as well.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    I'm looking for a switch in the render globals, surely there is an option.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Just set this up as a shelf button:
    {
        string $meshes[] = `ls -typ "mesh"`;
        for ( $mesh in $meshes ) {
            setAttr ( $mesh + ".doubleSided" ) 0;
        }
    }
    

    Will set every mesh in your scene to single-sided. I don't know if there's a global flag for it, let me know if you find one :)
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    You can set all the meshes in the scene to single sided in the attribute spreadsheet ideally I'm looking for a switch in mental ray I swore there was one I might be mistaken.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Oh, I think you can do it on Render Layer properties.
    Just select the defaultRenderLayer, go to the attribute editor, and set "Double Sided" to "Override On". Should do the trick.
  • Yashaswini Sridhar
    Any one kno how to avoid back face culling.. like i need to select all d mid faces of a cylinder in front view n thts not happenin, ther ll b only half faces selected n half left out.. also whn selecting vertices only half ll b selected n not othr half..!! & its not happenin with the switch on & off of back face culling :(
Sign In or Register to comment.