Showing posts with label vray. Show all posts
Showing posts with label vray. Show all posts
8/30/17
6/3/17
VRAY // environnement variable
source
utilize the threads on systems with more then 64 but if want to no reset affinity thread VRAY_USE_THREAD_AFFINITY=0
limit the number of threads that V-Ray uses VRAY_NUM_THREADS
utilize the threads on systems with more then 64 but if want to no reset affinity thread VRAY_USE_THREAD_AFFINITY=0
limit the number of threads that V-Ray uses VRAY_NUM_THREADS
5/13/17
VRAY // Diffuse pass not flat color
Sometimes the Diffuse RE of V-ray is not full flat colors but has some sort of shading/fresnel.
That is normal as it's the Diffuse Filter RE and is affected by reflections. To have full flat colors on compositing do the following :
Diffuse RE divided by the invert of the Reflection Filter RE
source
That is normal as it's the Diffuse Filter RE and is affected by reflections. To have full flat colors on compositing do the following :
Diffuse RE divided by the invert of the Reflection Filter RE
source
11/10/16
Maya / Vray _ random color for all objects
"- add extra vray attributes to a samplerInfo node (this will expose additional outputs to the samplerInfo)
- connect the samplerInfo.vrayRndomByID to a ramp's vCoord (if you're using a vRamp) OR uCoord (for a uRamp) | or both, if you intend to switch between ramp modes
--> the ramp's position and color values will be the range of colors to be distributed to the objects
--> plug the ramp into a shader and use the same shader on lots of objects"
source
- connect the samplerInfo.vrayRndomByID to a ramp's vCoord (if you're using a vRamp) OR uCoord (for a uRamp) | or both, if you intend to switch between ramp modes
--> the ramp's position and color values will be the range of colors to be distributed to the objects
--> plug the ramp into a shader and use the same shader on lots of objects"
source
7/20/16
1/10/16
MAYA / VRAY / MEL _ viewport snapshot in Vray VFB
// Vray VFB viewport snapshot
// create it in maya's renderview then load it in Vray VFB
global proc VrayVFBsnapshot ()
{
// create snapashot from current viewport camera
RenderViewWindow; // open renderview
string $panel = `getPanel -wf`;
string $camera = `modelEditor -q -camera $panel`;
renderWindowRenderCamera snapshot renderView $camera; // create snapshot
// get path to TMP image
string $workspaceDir = `workspace -q -fullName`;
string $imageDir = `workspace -q -fileRuleEntry "images"`;
string $imagePath = $workspaceDir + "/" + $imageDir + "/" + "TMP_snapshot";
print $imagePath;
sysFile -delete ($imagePath+".jpg"); // delete previous snapshot -- Windows
setAttr "defaultRenderGlobals.imageFormat" 8; // set maya software to .jpg to save it as a jpg
renderWindowSaveImageCallback "renderView" $imagePath ""; // save snapashot to .jpg file
// open image in vray vfb
vrayShowVFB; // open Vray VFB
vray vfbControl -loadimage ($imagePath+".jpg");
}
5/30/15
MAYA / VRay _ sprite texture pixelated
If sprite particles get pixelated with Vray (when they scale) :
Vray -> Global Option -> Materials -> uncheck texture filter map
Vray -> Global Option -> Materials -> uncheck texture filter map
12/12/14
MAYA / VRAY _ wave with distanceTex node
To procedurally create wave near object :
- create a VRayDistanceTex, a ramp and a shader.
- add object to distTex_set
- set the ramp like below.
- connect VRayDistanceTex.outColorR to ramp.Vcoord
- connect ramp to shader diffuse.
As it's heavy to calculate, it's better to bake it to a texture file map before rendering a long animation.
11/7/14
9/27/14
MAYA/VRAY/PYTHON _ fallof - occlusion shader
create a fallof and occlusion shader for Vray using python
#____________ FALLOF ____________#
def shFallof():
# gamma node
cmds.shadingNode('gammaCorrect',asUtility=True, n='GammaTemp')
cmds.setAttr('GammaTemp.gammaX', 0.455)
cmds.setAttr('GammaTemp.gammaY', 0.455)
cmds.setAttr('GammaTemp.gammaZ', 0.455)
#Creates Ramp
cmds.shadingNode('ramp', asTexture=True, n='facingRampTemp')
# Remove middle color of ramp
cmds.removeMultiInstance( 'facingRampTemp.colorEntryList[1]', b=True )
#Modify Ramp
cmds.setAttr('facingRampTemp.colorEntryList[2].color', 0,0,0, type='double3' )
cmds.setAttr('facingRampTemp.colorEntryList[0].color', 1,1,1, type='double3' )
cmds.setAttr('facingRampTemp.colorEntryList[2].position', 1)
cmds.setAttr('facingRampTemp.interpolation', 1)
#Creates Sampler Info node
cmds.shadingNode('samplerInfo', asUtility=True, n='facingSamplerTemp')
#Connects Ramp and Sampler
cmds.connectAttr('facingSamplerTemp.facingRatio', 'facingRampTemp.vCoord', f=True)
cmds.connectAttr('facingRampTemp.outColor', 'GammaTemp.value', f=True)
# connect it to a surface shader
cmds.shadingNode('surfaceShader', asShader=True, n='SH_TMP_Fallof')
cmds.connectAttr('GammaTemp.outValue', 'SH_TMP_Fallof.outColor', f=True)
# Select Ramp
cmds.select('facingRampTemp', r=True)
#Renames nodes so you can use the script as many times as you want
cmds.rename('facingRampTemp', 'facingRamp_F')
cmds.rename('facingSamplerTemp', 'facingSampler_F')
cmds.rename('SH_TMP_Fallof', 'SH_Fallof')
cmds.rename('GammaTemp', 'gammaCorrect_F')
shFallof()
#____________ OCCLU ____________#
def shOcclu():
# surface shader
cmds.shadingNode('surfaceShader', asShader=True, n='SH_TMP_Occlu')
cmds.shadingNode('VRayDirt', asShader=True, n='VrayDirt_TMP')
cmds.connectAttr('VrayDirt_TMP.outColor', 'SH_TMP_Occlu.outColor', f=True)
#Renames nodes so you can use the script as many times as you want
cmds.rename('SH_TMP_Occlu', 'SH_Occlu')
cmds.rename('VrayDirt_TMP', 'VrayDirt_O')
shOcclu()
9/21/14
MAYA/VRAY _ linear workflow
Render and VFB settings
For texture map add a Vray texture input gamma attribute
Create a standard gray shader : Vray MTL with gamma correct node in diffuse, 0.5 value color and gamma value 0.455
Subscribe to:
Posts (Atom)




