mia_physicalsky and haze

david | mentalray,rendering,tutorials | Monday, October 29th, 2007

A while ago I learned from one of "Zaps Mentalray Tips" that the mia_physicalsky haze parameter could be used to make clouds in the sky by connecting a file texture to it. Since then I have experimented with this technique and discovered some limitations and some solutions to those limitations.

sky_hazeWithVisDist_mentalrayTexture.jpg

(more...)

append existing lens shader

david | dj mod,mel script,mentalray,rendering | Wednesday, October 24th, 2007

Here's another modification to a maya 2008 mel script that enables you to easily hook up more than one lens shader to the camera.

For example, if you have set up the standard Physical Sun and Sky environment then you will already have a lens shader in place (mia_exposure_simple or mia_photographic perhaps). Now if you also want mia_lens_bokeh to do some depth of field then you will need to use the secondary lens shader list where you can "Create" a new lens shader.

But what if you want to use an existing lens shader rather than creating a new one?

This modification allows you to do just that.

For example you may wish to connect the mia_physicalsky node as a lens shader to take advantage of the "visibility distance" parameter. In this case you would definately want to use the existing mia_physicalsky.

The modified file is AEconnectionTableTemplate.mel and you should place it in your local scripts folder and restart maya. (Never put customized mel scripts into the maya installation folders). Now if you look at the camera's attribute editor you will see this

cameraShapeAE.jpg

You must first select a lens shader, then shift-select the cameraShape node, open the attribute editor and click "Append" to make the connection.

Download here

mia_physicalsky visibility distance

david | mentalray,rendering,tutorials | Wednesday, October 10th, 2007

This is a mini tutorial on using the visibility distance parameter of the mia_physicalsky shader.

Most people probably add mia_physicalsky to their scenes using the create button in the environment tab at the bottom of the mentalray render-settings (shown here)

renderSettings.jpg

This creates a shader network involving several nodes. If we look at the camera attribute editor mentalray tab we see that mia_physicalsky has been connected to the environment shader slot and mia_exposure_simple to the lens shader slot.cameraAttrEdA.jpg

The default settings are a good start point for lighting out door scenes. Here is a render of a 9 objects in a line using the default sun and sky settings - except for the mia_physicalsky visibility distance, which I changed from 0 to 10.

default sun sky render

So what is visibility distance and why am I writing about it?

The manual says "Aerial Perspective is a term used by painters to convey how distant objects are perceived as hazier and tinted towards the blue end of the spectrum. mia_physicalsky emulates this with the visibility_distance parameter." This can be a little confusing for two reasons: 1. there is also a "haze" attribute and 2. it doesnt seem to matter what value you give to visibility distance - nothing changes.

Making visibility distance work is easy once you know how. You need to connect mia_physicalsky as a lens shader. Our camera already has a mia_exposure_simple as a lens shader, but we can add another one. You might expect that you could drag-and-drop the existing mia_physicalsky shader into the empty lens shaders box, but for some reason that doesnt work. Luckily its easy to do with a simple mel command.

connectAttr mia_physicalsky1.message cameraShape.miLensShaderList[0];

(You may need to change the cameraShape name to match your camera.) Then the camera attribute editor should look like this

cameraAttrEdB.jpg

Update: You can also install a modified mel script to make the connection using a button in the attribute editor. Read about it here.

If we rerender the test scene we get this

withLensShader_visDist10_haze0.jpg

These are the same settings as the first render except now mia_physicalsky is being used as a lens shader as well as an environment shader. Here are some different visibility distance settings

withLensShader_visDist40_haze0.jpg

withLensShader_visDist100_haze0.jpg

So what is the difference between visibility distance and haze? Haze sets the amount of haze in the air and changes the look of the sky but on its own does not obscure the view of the objects. Here is a render with haze but zero visibility distance

withLensShader_visDist0_haze10.jpg

Here is the same haze value but visibility distance set to 100

withLensShader_visDist100_haze10.jpg

And here is another variation

withLensShader_visDist100_haze3.jpg

Summary: visibility distance only works if the mia_physicalsky is used as a lens shader.

Downloads

david | | Sunday, September 16th, 2007

DISCLAIMER: Some of the scripts here are modified versions of the ones installed with maya. If you overwrite an original maya script with one of my modified versions you risk messing up your install. Please install modified or custom scripts in a different folder to the maya installation so that you do not damage the original files. Then if maya stops working you will be able to uninstall the modified scripts by deleting them.

Some scripts are version specific and I try to keep them up to date, but if you encounter problems, let me know so I can fix them. If you are new to custom mel scripts and customizing maya in general then you may wish to have a look at my "Customizing Maya Guide".

 

 

AEconnectionTableTemplate.mel

Add a new button to the secondary lens shader list in the mentalray camera attributes so you can append an existing lens shader to the list. (maya 2008, 2009, 2010). Read more...

AEhardwareTextureTemplate.mel

Work around the "Found no attribute match" bug that causes colors and textures to display incorrectly in the maya viewport. (maya 2011) Read more

AEmia_material_xTemplate.mel

Bug fix for bump map disconnection problem in maya 2010. Read more

cMuscleCreatorUI.mel

Modified UI to make it easier to select from the list of cross-section curves and controls. (maya2008 ext2). Read more...

cMusclePaint.mel

Modified Right-Mouse-Button menu improves cMuscle workflow when painting weights. (maya2008 ext1+2). Read more...

cometSaveWeights.mel

Fixed for maya 2011 (maya 2011).

connectNodeToAttrOverride.mel

Override the default drag-and-drop behaviour for mia_material_x and mia_material_x_passes so instead of the connection editor opening, it simply connects to the attribute you dropped it on like every other material. (maya 2009, 2010) Read more...

createMentalRayGlobalsTab.mel (2008) & createMentalRayIndirectLightingTab.mel (2009, 2010,2011)

 

Add UI so you can choose the exposure shader when creating mia_physicalsky environment (maya 2008, 2009, 2010, 2011). Choose the one that's right for you. Read more...

dj_correctFilterList.mel

Includes modifications to maya's projectViewer.mel and renderWindowPanel.mel. Fixes a problem with the OS native dialog. (maya 2011) Read more...

djCreateTransformNodeAtFaces.mel

Select some faces, run the script and an empty transform node will be created at the center of each face and aligned to its normal. (maya 8.5, 2008)

djDisplayLocalAxis.mel

Turn on and off the local rotation axis for a single node or its heirarchy. (maya 2008) Read more...

djDepth mentalray phenomenon

A phenomenon built using shaders from Duiker Research to create a depth shader. (maya2008, 2009, 2010) Read more...

djFileSwitchRamp.mel & djPopulateSingleSwitch.mel

Two mel scripts to build a shader network based on a ramp and a singleShadingSwitch. (maya) Read more...

djFinalGatherHide.mel & djFinalGatherUnhide.mel

Two mel scripts to simplify the use of the miFinalGatherHide attribute. (maya) Read more...

dj_mix_colors mentalray phenomenon

A phenomenon based on the mib_color_mix shader, with a more intuitive UI. Read more...

djObjMenu.mel

Allow CTRL+LeftMouseClick to mimic the behaviour of RightMouseClick (maya) Read more...

djParentShape.mel

Parent a shapeNode to a transform with option to "move to position" or "preserve position". (maya) Read more...

djPFXUVs.py

Layout UVs into a tile pattern for leaves, or a distributed strip pattern for grass on meshes created by a conversion from paintFX to polys. (maya) Read more...

djResetBindPose.mel

Reset the bind pose after using the "Move Skinned Joints Tool" (maya 2008). Read more...

djRivet.mel

Constrain objects to surfaces using follicles so that the objects follow the surface when it is moved or deformed. (maya unlimited 7 through 2009 and maya 2010)

djSelectJointsBelow.mel & djSelectNonJointsBelow.mel

Select a node, run the script to select the joints or non-joints below it. (maya 2008) Read more...

djSetKeyframe.mel

Enables easier "straight ahead" animation by maintaing "hold" keyframes. (maya) Read more...

djSwitchManipOnSelection.mel

Automatically switch to a specified manipulator when an object is selected. (maya) Read more...

djToggleClippngPlanes.mel

Can be used as a shelf button, marking menu or hot key to easily toggle the clipping plane display for the selected camera(s). Read more...

djToggleUsePivotAsLocalSpace

Toggle the camera's "Use Pivot As Local Space" attribute. (2008) Read more...

djVRayCreateMatteLayer.mel

Create matte renders using vray multi matte render elements (maya 2010+ and vray 1.5sp1+) Read more...

djZDepthDOF.ma

Maya shader network for making a depth-of-field depth pass. Works in maya software and mentalray renderers. Read more...

djZeroJointRotations.mel

Zero's out a joints "rotate axis" values after manualy rotating it's local rotation axis. (maya 2008) Read more...

djZooSpaceSwitchingKeys.rar

Animation "jump prevention" feature for to zoo space switching. (Requires zooToolbox) Read more...

 

fStretch plugin for maya

This is an opensource plugin for maya, written by Matthieu Fiorilli, http://www.cgaddict.com All I've done is compile it. (windows 2014, 2015, 2016, 2017) Read more...

 

hyperShadePanel.mel

Modified version of a maya script. Adds a "disable thumbnail updates" button to the hypershade window. (2008 sp1, 2009, 2010 (use the 2009 version), 2011, 2012, 2013) Read more...

layerEditor.mel

Modified version of a maya script. Adds a "create layer from selected" button to the layer editor. (maya 8.5, 2008) (not required in 2009 or later)

 

mattePassMaker.mel

Matte Pass Creation tool. (maya 2009 or later) Read more...

 

mia_material_x_functions.mel

Modified version of maya script. Prevents Glossy Samples slider locking when Glossy=1. (2008, 2009, 2010) Read more...

mip hypershade icons (unofficial)

I wish I could remember where I found these, so I could give credit where credit is due.

mrCreateCustomNode.mel

Modified version of a maya process. Adds UI for extra connections (2008) Read more...

NOTE: This mod is not recommended for versions of maya later than 2008

 

performCamera.mel

Modified version of a maya script to change the camera defaults. (8.5, 2008)

physxUI.mel

Modified version of a mel script from Feeling Software Inc.'s physX maya 2012 plugin. Modified to prevent the physX shelf from being made active when maya starts. (maya 2012 + physX) Read more...

Pose Deformer

Maya plugin written by Michael Comet and released under the GNU General Public License. Some early versions of the plugin are available at Michael's site, along with the source code.

Versions:

mac 7.0, 8.0, 2008 ext2, 2009, 2011 x64 (2008 compile by Jan Berger (aka Buexe), 2011 x64 compile by Andreas Wöhrl (aka volderette) , 2009 intel binary compile by Cobranail),

osx 2009 & 2012 (compile by E.Ozgur Yilmaz),

linux 6.0 to 8.0, linux64 2009sp1a, 2011 & 2012 (compile by E.Ozgur Yilmaz),

windows 5.0 to 2012 (I have compiled it for windows: 8.5 x32,  2008-x32, 2008-x64, 2009-x32, 2009-x64, 2010-x64, 2011-x32, 2011-x64, 2012-x32, 2012-x64, 2013-x64, 2013.5-x64, 2014-x64, 2015-x64, 2016, 2017)

windows 2013-x32 compiled by Scott Englert

7z also includes source, mel scripts, sample scenes and some brief documentation.

To keep the file size down, poseDeformer.7z now only contains the last 3 versions (currently 2014, 2015, 2016 & 2017). If you want something older, you need poseDeformer_ALL.7z (which goes all the way back to maya 5, depending on os) Source code is included in both.

showEditor.mel

Modified version of maya 2012 installation file. Adds "Notes Display" switch to the attribute editor List menu. (maya 2012, 2013) Read more...

spReticle Plugin

Sony Pictures Imageworks plugin to create a customizable viewport overlay (aka reticle) modified and recompiled for maya (win 2011-x64, 2012-x64, 2013-x64, 2014-x64). Read more...

vrayCreateRenderElementsTab.mel

A modified version of a VRay for Maya script. Improves workflow when using render elements with render layers. (maya 2011, vray 1.5sp1) Read more...

zooAttrScroller.mel

Change attributes on one or more objects without leaving the viewport using virtual sliders. Based on one of Hamish McKenzie's zooToolbox scripts, but runs standalone. (maya) Read more...

« Previous Page

Powered by WordPress | Based on a theme by Roy Tanck