Dave Girard's 101 Autodesk® Maya® Tips is now available in Kindle, interactive iPad edition and DRM-free EPUB/PDF editions. Work faster, cry less. Read more about the ebook.

Follow cgbeige on Twitter

Topics by tag:

Recently published articles by Dave G:

Free downloads by Dave G:

Mac OS X-only downloads:

OBJ Render Problem Warning - You Need This

Even after years of knowing to keep this in mind, I invariably find myself forgetting to enable reflections and refractions for OBJ meshes that have been imported into Maya. There is a longstanding bug (or at least an annoying default behaviour) where imported OBJ meshes have their reflection and refraction flags turned off. You have to turn these on for every object or else you won’t get reflections and refractions. Considering how prevalent OBJ files are as a go-between for apps like Headus UV Layout, Mudbox, ZBrush, etc., that’s a pretty bad problem. So, to save myself wasted time, I added this MEL script to my Render button in V-Ray Tuner. Grab the code here. Put it in your scripts folder and run it with “source render_with_warn.mel;”

It won’t prevent any rendering, but it will give me a warning that it found a mesh with the .visibleInReflections set to 0 and select the meshes. See it in action with a demo of the problem:

So, either grab the latest V-Ray Tuner from here or add that code bit to a shelf item for use with your renderer (this is also a problem with Maya Software, mental ray, etc.)

Update: someone was asking for a version of the script that would automatically turn those back on for all meshes, instead of just issue a warning. Here is a version of that script above that turns the flags on automatically before rendering. Run it with “source auto_fix_render;” If you know you don’t need those off for any mesh, it’s fine to use – otherwise, I’d recommend just run this script on the selected objects if you’re confident they should be visible.Drop it in scripts and run it with “objRenderFixer;

0 notes | Permalink