Topics by tag:
Recently published articles by Dave G:
I’m going to be adding to the next version of V-Ray Tuner but I thought I’d post this script for people who might want it for other renderers. It’s a script to rename selected File nodes according to their name on the disk, sans file extension:
Here’s the script - install into your Maya scripts folder and run “renameWithFilename” with any and all Files nodes selected. The script ignores other node types if you want to select everything in the Hypershade Textures panel.
Someone asked whether it was possible to use V-Ray RT as a playblast renderer in Maya so I looked into it. The always-helpful guys at Chaos Group got back to me instantly with a script to call in the “RT Image Ready” MEL callback in the Render Globals. I updated it to append the frame number with padding, made it write to a VRayRT_Playblast” folder and it’s been rolled into V-Ray Tuner. Check it out:
You have to set the first frame in the timeline, set your max frame render time in the RT Engine Settings. You’ll have to use a program like QuickTime Pro to make a movie file out of the frames, or jus load the sequence into Nuke or After Effects. Also, make sure to clear the RT Image Ready MEL after using or IPR renders will run the script (the bottom field should be blank):
I’ll work on clearing that automatically on cancel or completion.
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;
It’s done! After many new things being added and a serious upgrade of both my knowledge of V-Ray and my MEL skills, it’s a big improvement over the last version and includes many things specifically for V-Ray for Maya 2.0, which just went into public beta testing for people who pre-ordered it. Grab it here. The major changes are:
This was created as an imitation of Maxwell Render’s Multilight, since I also use Maxwell and love that feature. The script goes through your scene and renders out a file for each of your visible V-Ray lights (don’t use Maya lights with V-Ray if you’re new to V-Ray) and saves them according to the light name (Dome, VraySun, environments included). The naming part is the reason for the Render Globals window opening (leave that open until it’s done). If you have meshes with V-Ray Light Materials in your scene, you simply have to select those before running the PerLightRender script and it will work with those as well:
For those unfamiliar with Maxwell’s Multilight or you’re having a hard time picturing this in a workflow, here’s a quick demo of how you would use it for still images as a “render once and tweak lights without re-rendering” scenario. I often use this when I don’t care to finalize the actual scene lights to perfection just to get a nicely lit image with a lot of lights (In the beginning of the movie, I’m just changing a bunch of stuff quickly to get rendering working faster and fixing my scaled lights):
It’s also a handy way to check light contribution since it can often be unclear what light is doing what within your scene. This method also works with global illumination, unlike the V-Ray 2 Light Select Render Element. You have to render to a 32-bit format for it to store light in floating point, so keep that in mind. The script also turns render elements off before rendering the lights, so you don’t get an absolute ton of images you don’t need (it restores your current render element on/off setting when it’s done). Photoshop and After Effects users, use Linear Dodge (Add) for compositing the layers.
The only limitation to this Per Light Rendering script is that the new V-Ray Material Self Illumination parameter is not checked and it also doesn’t check if you have a V-Ray Light Material in a Blend Material so if you are using those, it will render each frame with those in it, compounding improperly when you comp them. Nothing is changed in your scene, so don’t be scared to use this or the DaveBake420 script.
Target Light and Sync Light Size
Here’s a quick video showing these two button features:
This was added to 1.7.3 but I thought I’d quickly show it here for people who don’t know what it does:
I’ve used this script a lot already for making ambient occlusion textures for scene objects. It was used for my building, ground and planes in this illustration. Also, works well with my GoP script since that sends objects to Photoshop with the name as well.
The MaxScript V-Ray material converter is not ready for Windows/Linux. A Python port is being worked on so I hope to have that integrated in an update soon.
If this is the first time you’re using V-Ray Tuner and you’re wondering why it doesn’t connect attributes when scenes load, hit the Refresh button. This also acts as a way to read out your current scene’s V-Ray info that is also new:
V-Ray Info: Primary Engine is Irradiance Map, Secondary Engine is Light Cache. Lightmaps: IMap: Single Frame / Light Cache: Single Frame
Also, I want to change the menus to use checkboxes but these trip the script if your scene isn’t loaded and it tries to read non-existent nodes that V-Ray hasn’t created yet. Anyway, enjoy and, if you want to thank me for this script, find the nearest pug and pat him or her on the head. Mine’s waiting to be walked while I type this.
Update: the MaxScript converter now uses MEL so all you have to do is select the material, run the converter from the Materials dropdown and the MaxScript code is output to the Script Editor for copying and pasting into Max.
4 notes | Permalink
It is done! I’ve taken the various pieces of MEL code and mashed them together like two handfuls of pureed potatoes and we have a winner:
All light types are working and the workflow is very straightforward. I just need to get it to respect hidden lights and it will be released soon. Don’t no one be disrespectin’ no hidden lights.
The mesh lights portion of per-light rendering passes is now working in my V-Ray Tuner 2 script:
Thanks to the people on CGSociety’s Maya forum for the help getting this bit working. Best Maya forum ever.
Yes, I know the render is noisy – I am just testing the script so the quality settings are quite low. And for people thinking “isn’t this what the Light Select Render Element is for?,” you’re close but that doesn’t include global illumination like this does. Anyway, after it’s done, your scene is restored and the images are ready to be composited. Animation people might find this to be overkill but I do stills, so I do this stuff a lot. It currently works with all V-Ray light types, domes, environment map GI, and I’m just working on support for material mesh lights and material self-illumination.
2 notes | Permalink
GoP update now works with object names so it’s easier to use with named renders like my baked V-Ray Tuner output passes:
The V-Ray Tuner is small but significant. I made a batch bake section and a “DaveBake420” command that takes all your selected objects and renders out baked textures for all active render elements. It even names the rendered image according to the object name. It needs a few things but it’s already saved me a lot of time. Check it out:
Same links as before:
2 notes | Permalink
I updated my V-Ray Tuner MEL script today. It’s now an automatically docked palette in Maya 2011 and above. Pretty slick, if I do say so myself:
I plan on doing this by default for my new scripts. It’s a good way to save space and keep things out of your face. It also shows up in the right click UI elements menu:
I done hacked the Maya interface!
I recently switched to V-Ray from mental ray for Maya after years of coping with the incessant bugs and awful support. The just-released update to V-Ray for Maya reminds us what an update for a renderer should look like – full of fixes and new features, and at no extra cost.
Anyway, fellow CGSociety members know that I’ve made a MEL script called “V-Ray Tuner” that enables quick access to some of the SP1 features like the V-Ray Framebuffer for OS X Maya 2011 x64:
The script works on all platforms and it’s free of charge. Grab it here and enjoy!