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.



12/11/14

MAYA _ can't do planar mapping uv / OBJ group problem

Sometimes, there is some buggy mesh on which Maya can't apply a planar mapping and when trying to export and import obj to clean the mesh we get this warning :
"Your OBJ file contains faces shared by multiple groups. Maya cannot create multiple objects for this file. A single mesh object will be created instead. The OBJ group information will be captured in Maya sets."

Here is a trick (for multiple objects) :
export to OBJ turning groups and point groups option off then import it in Maya then mesh > separate.



12/10/14

MAYA _ same uv square size multiple mesh

In UV texture editor : polygons > layout  and set "Prescale" to "World".
maya help

12/1/14

MAYA _ Particle

Volume noise fitting particle 
http://www.djx.com.au/blog/2008/07/21/particlesamplerinfo-smoke/

See the particule after converting to mesh :
nParticleShape > attribute editor > object display > unchek intermediate object
When converted to mesh increse the max triangle resolution

Delete particule with an uniform field : https://www.youtube.com/watch?v=fZWa43u8KB4
create an uniform field, set lifespan > lifespanPP only, add expression before dynamics in lifespanPP
if(nParticle_verreShape.inputForce[0] >= 0.0001)
{nParticle_verreShape.lifespanPP = 0.0;}

Multiple emitters for same nParticuleShape :
Select nParticle, shift select emitter > nParticule > Use selected emitter
or
duplicate emitter using CTRL+d then Window -> Relationship Editors -> Dynamic Relationships, select the particles in the left side of the window, check Emitters in the upper part of the right window, and select both emitters. source

Change particule color with age - Vray
Add Vray per particle attribute export to nParticleShape.
Scroll down to extra attribute and check "age".
Assign a shader with a U ramp in diffuse (delete the placement node of the ramp) to the particle.
Create a particleSampler node and connect to ramp : particlesampler.age -> ramp.uCoord.

Randomize particule color - Vray
Add user scaler 1pp attribute to nParticleSHape
add runtime before dynamics expression to it : nParticleShape.userScalar1PP = rand(1);
Add Vray per particle attribute export to nParticleShape.
Scroll down to extra attribute and check "userScalar1PP"
Assign a shader with a U ramp in diffuse (delete the placement node of the ramp) to the particle.
Create a particleSampler node and connect to ramp : particlesampler.userScalar1PP -> ramp.uCoord.

Sprite
For simple setup use nParticles -> sprite Wizard.
For sequence file texture without spriteWizard in file node animate image number and check interactive sequence caching.
if random on birth, create spriteNumPP et expression nParticleShape1.spriteNumPP = int(rand(1,4));
For scale add dynamic attribute sprite scaleX PP and spritescale Y PP, right click and create ramp
For random rotate add attribute sprite twist PP and add creation expression nParticleShape1.spriteTwistPP = rand(-180,180);
pour animer rotation dans runtime expression :
nParticleShape1.spriteTwistPP += 1;

Display age (or other attribute) in viewport
particleShape -> shading -> numeric
attribute name : age
attribute name list

Move bad particle to hide them (dirty way)
Select individual particle (right click -> particle) then add a cluster to them and move the cluster !

http://www.tokeru.com/mayawiki/index.php?title=Particles

Steppy movement (ex : when attach emitter to motion path)
Create cache : evaluate every 0.2  and save every 5 and change the subframe in nucleus if needed.