Python scripts for Subdivision and Texture Input Gamma in Vray for Maya

The first Python script  will apply a Texture Input Gamma from Vray Attributes on selected File nodes.

The second script applies Subdivision from Vray Attributes on selected Shape nodes. The script automatically converts a selected transform node into a shape node, which means that you can select the objects you want to subdivide in the viewport. I also set the script to not Override Global Values in order for you to set the values you want in the Default Displacement and Subdivision tab, instead of typing them in on every object after you flagged the object for Subdivision.

 

Creating Mastering Vray style shaders in Maya

I’m a subscriber of Mastering Vray by Grant Warwick and I’ve been trying to implement some of his techniques in my own shaders. Since Grant is using 3ds Max I’ve been trying to adopt his techniques in Maya. Which is easier said than done sometimes. Mostly because Grant relies heavily on both the Falloff map and Bercon Maps, none of which exist in Maya. Especially the Falloff map is something that bugs me that Maya does not have any equivelent node of. Grant is using the Falloff map to create curves instead of plain numbers for the IOR. IOR values can be found at http://refractiveindex.info/. One way of doing this in Maya is using the Custom Fresnel Script created by TheRenderBlog. You can read more about it here: http://therenderblog.com/custom-fresnel-curves-in-maya-part-2/. This creates a fresnel curve using a Remap Value node. It works great if you want the correct physical values, but is not very easy to modify if you want to tweak the values later. I also used the Remap Value node to create my fresnel curves, and it worked okay but I really missed a Bezier handle which the Falloff map in Max has. First you need to create a Sampler Info and connect the Facing Ratio to a Reverse node. The output of the Reverse goes to the Input Value of the Remap Value node.

Anyway, here is some of the shaders I have created so far:

Plastic

Plastic

Gold

Gold

Green_Paint

Green Paint

Paint_Green_NodeTree

This is how complex the node tree for the Green Paint shader ended up.

Gold_NodeTree

And here is the node tree for the Gold shader.

Vray Water

I’ve been using Vray Water recently at work and wanted to share some tests that I did. Here is a daytime time test:

And here is a nighttime test:

The settings I used for the Vray Water was:

Height Multiplier: 1

Wind Direction: 0

Wind Magnitude: 10

Wind Direction Multiplier: 0

Choppy Multiplier: 0

Rate: 1

Seed: 1

Resolution: 1024

Patch Size: 1024

Some notes on the settings: The wind direction values 0 and 180 is moving the waves along the X-axis while 90 and 270 moves it along the Z-axis. However, there is no difference between 0 and 180 respective 90 and 270 which I found a little bit strange. For example, a scene with Wind Direction set to 90 will behave exactly like a scene with Wind Direction set to 270. It is also worth noting that Wind Direction Multipler has to be greater than 0 for the Wind Direction to have any effect at all.

The Patch Size is dependent on the scene scale and in my case a value of 1024 worked well since my scene was setup in approximately real world scale. I haven’t figured out exactly how the settings work for it thought. The description on Chaos Groups website says: ”Patch size – specifies the real world size of one patch of the VRayWater texture outside of which the surface is perfectly periodic”. 

The rest of the scene setup was really simple with the light coming from a Vray Domelight with an HDR. The shader for the water was a highly reflective VrayMtl with slightly glossy reflections.