Heribert Raab

Online Portfoilo and Art Blog

Fractals of the week

splines101

splines103

splines102

Maya fluids render methods comparison

rendering fluids as particles or software clouds in mental ray or hardware render buffer gives a lots more details the rendering the fluids itself. the best part you can use real 3d motionblur for fluid in Maya !.





ExplosionLibrary_018 ExplosionLibrary_017 ExplosionLibrary_016 ExplosionLibrary_015 ExplosionLibrary_014 ExplosionLibrary_013 ExplosionLibrary_012 ExplosionLibrary_011 ExplosionLibrary_010 ExplosionLibrary_009 ExplosionLibrary_008 ExplosionLibrary_007 ExplosionLibrary_006 ExplosionLibrary_005 ExplosionLibrary_004 ExplosionLibrary_003 ExplosionLibrary_002 ExplosionLibrary

rendering maya fluids with motion blur using particles part 1

rendering Fluids as dense Particle cloud is common practice. the Krakatoa plus for maya or 3dmax is based on this concept. even without this plugin, you render the particles as point in maya hardware render or as clouds in maya software renderer or mental ray. the advantance: fast render times and most important –> motion blur !

this how it the particles look like:
ParticleAd4

on the right side i switched to software clouds mode and used radiusPP over lifetime

ParticleAd5

just place the emitter over your fluids emitter
ParticleAd2

set up the particle shape and use mayafluids as flied:
ParticleAd

fractals of the week

motion vector for fluids in Maya / Mental Ray

a while ago, i did some tests for calculating motion vector from maya fluids and override the fluids color to render a motion vector pass in mental ray. i wrote python script and it work very well but the motion vector math in python took 15-40 minutes pre re.  on positiv side it works with all kind of renderer, even the old school hardware render buffer.

Th result itself was good, it Fluids looking much better in motion,  when they are motion blurred.
ExplosionLibrary_paticleMV

maya sprites rendertest in arnold and rendeman

its a simple render test of maya sprites in arnold and renderman Studio. it uses a simple noise pattern on a 2d ramp with 2d ramp displacement. one simple noise plugged into a ramp can give a really complex shading behaviour. the extreme displacement come from a simple ramp, this give the smoke more depth.

 

maya sprite test from Heribert Raab on Vimeo.

maya tool: get speed from animated object live

i’ve wrote 2 handy tools in maya for getting a speed value from animated Objects.  it works on everything, which have a transform node. Locators, Geo etc…

this script add an extra attribute call Speed. its updates live, even when change keyframes. its very hand if you have to animate your force field based on speed /animation of other Objects. you can simply refer this attribude inside other expression.

this second script is pretty much the same, except it display the speed live in Maya’s HUB display. (inside a viewport)

when you activate the script again it will turn off the HUD display.

link to script

link to script 2

Python script:

import maya.cmds as cmds
import math

Psel = cmds.ls( selection=True )
try:

nodeT = cmds.nodeType( Psel[0] )
print nodeT
if nodeT == ‘transform':
checkAttr = cmds.objExists(Psel[0]+’.speed’)
print checkAttr
if checkAttr == True:
listexpr = cmds.listConnections(Psel[0]+’.speed’)
if listexpr == None :
ex1 = ‘float $lastPosX = getAttr -t (frame-1) '+Psel[0]+'.tx;’
ex2 = ‘float $lastPosY = getAttr -t (frame-1) '+Psel[0]+'.ty;’
ex3 = ‘float $lastPosZ = getAttr -t (frame-1) '+Psel[0]+'.tz;’
ex4 = Psel[0]+’.speed = abs (mag (<<‘+Psel[0]+’.translateX,’+Psel[0]+’.translateY,’+Psel[0]+’.translateZ>>)- mag (<<$lastPosX,$lastPosY,$lastPosZ>>) );’
exAll = ex1+ex2+ex3+ex4
cmds.expression( o=Psel[0], s=exAll)
else:
cmds.delete(listexpr[0])
ex1 = ‘float $lastPosX = getAttr -t (frame-1) '+Psel[0]+'.tx;’
ex2 = ‘float $lastPosY = getAttr -t (frame-1) '+Psel[0]+'.ty;’
ex3 = ‘float $lastPosZ = getAttr -t (frame-1) '+Psel[0]+'.tz;’
ex4 = Psel[0]+’.speed = abs (mag (<<‘+Psel[0]+’.translateX,’+Psel[0]+’.translateY,’+Psel[0]+’.translateZ>>)- mag (<<$lastPosX,$lastPosY,$lastPosZ>>) );’
exAll = ex1+ex2+ex3+ex4
cmds.expression( o=Psel[0], s=exAll)

else:
print “test”
cmds.addAttr( Psel[0],longName=’speed’ )
ex1 = ‘float $lastPosX = getAttr -t (frame-1) '+Psel[0]+'.tx;’
ex2 = ‘float $lastPosY = getAttr -t (frame-1) '+Psel[0]+'.ty;’
ex3 = ‘float $lastPosZ = getAttr -t (frame-1) '+Psel[0]+'.tz;’
ex4 = Psel[0]+’.speed = abs (mag (<<‘+Psel[0]+’.translateX,’+Psel[0]+’.translateY,’+Psel[0]+’.translateZ>>)- mag (<<$lastPosX,$lastPosY,$lastPosZ>>) );’
exAll = ex1+ex2+ex3+ex4
print exAll
cmds.expression( o=Psel[0], s=exAll)

else:
print ‘—> select transform !’

except TypeError :
print ‘—> select transform !’

 

 

 Script 2:


import maya.cmds as cmds
import math

def getSpeed(*args):

res = 0
Psel = cmds.ls( selection=True )
try:

nodeT = cmds.nodeType( Psel[0] )
print nodeT
if nodeT == ‘transform':
checkAttr = cmds.objExists(Psel[0]+’.speed’)
print checkAttr
if checkAttr == True:
listexpr = cmds.listConnections(Psel[0]+’.speed’)
if listexpr == None :
ex1 = ‘float $lastPosX = getAttr -t (frame-1) '+Psel[0]+'.tx;’
ex2 = ‘float $lastPosY = getAttr -t (frame-1) '+Psel[0]+'.ty;’
ex3 = ‘float $lastPosZ = getAttr -t (frame-1) '+Psel[0]+'.tz;’
ex4 = Psel[0]+’.speed = abs (mag (<<‘+Psel[0]+’.translateXA,’+Psel[0]+’.translateY,’+Psel[0]+’.translateZ>>)- mag (<<$lastPosX,$lastPosY,$lastPosZ>>) );’
exAll = ex1+ex2+ex3+ex4
cmds.expression( o=Psel[0], s=exAll)
else:
cmds.delete(listexpr[0])
ex1 = ‘float $lastPosX = getAttr -t (frame-1) '+Psel[0]+'.tx;’
ex2 = ‘float $lastPosY = getAttr -t (frame-1) '+Psel[0]+'.ty;’
ex3 = ‘float $lastPosZ = getAttr -t (frame-1) '+Psel[0]+'.tz;’
ex4 = Psel[0]+’.speed = abs (mag (<<‘+Psel[0]+’.translateX,’+Psel[0]+’.translateY,’+Psel[0]+’.translateZ>>)- mag (<<$lastPosX,$lastPosY,$lastPosZ>>) );’
exAll = ex1+ex2+ex3+ex4
cmds.expression( o=Psel[0], s=exAll)

else:
print “test”
cmds.addAttr( Psel[0],longName=’speed’ )
ex1 = ‘float $lastPosX = getAttr -t (frame-1) '+Psel[0]+'.tx;’
ex2 = ‘float $lastPosY = getAttr -t (frame-1) '+Psel[0]+'.ty;’
ex3 = ‘float $lastPosZ = getAttr -t (frame-1) '+Psel[0]+'.tz;’
ex4 = Psel[0]+’.speed = abs (mag (<<‘+Psel[0]+’.translateX,’+Psel[0]+’.translateY,’+Psel[0]+’.translateZ>>)- mag (<<$lastPosX,$lastPosY,$lastPosZ>>) );’
exAll = ex1+ex2+ex3+ex4
print exAll
cmds.expression( o=Psel[0], s=exAll)

else:
print ‘—> select transform !’

except TypeError :
print ‘—> select transform !’
res = cmds.getAttr(Psel[0]+’.speed’)
return res
try:
cmds.headsUpDisplay( ‘voxelsHUD’, section=1, block=0, blockSize=’small’, label=’Speed’, command=getSpeed, event=’timeChanged’, nodeChanges=’attributeChange’ )
except RuntimeError:
cmds.headsUpDisplay(‘voxelsHUD’, remove=True)

 

fractals of the week

Maya Fluid alpha issue with Container Scale?

sometimes when you fluids container size is too big and you get wired alpha channel issues in mental ray like this:
container_alpha

there is an easy fix to this. just turn off “pass custom alpha channel” in custom entries option of the rendersettings. in some cases you should only overlapping fluids container in one render layer.

alphachannel

Ratchet and Clank trailer

what i am currently working on :

i’ve worked on 4 shots in the trailer.

sculptris head

i found Sculptirs on my hard disk and this lead me to quick and dirty 3d sketch

Fractals of the week

new paintings

rushed paintings in few minutes…. just for training

fractals of the week

more daily 5 minutes sketches…. the last ones…

mandebulb

testing Mandelbulb volume rendering inside maya:

procedural scripting

i trying to get more art out of the procedural power of houdini

5 line in houdini and instance cubes on it (rendered in mantra):

brzel_sin_v002

 

 

5 minutes sketches

maya tip: passing on deformed particle and geomtrie

nonlinear deformers or scuplting on geo/partilces are great to tweak your sims. but it will not written into the cache file. the deformation gets always added on top of the cache. this is little bumpy, example: if wanna use the deformed nParticle to emitt into a fluids container.
in this case, you can use the new node editor to plug the outGeometry of the deformer into you depending geo/nodes like the fluids emitters. easy !

Screenshot-1

one way doodles

during the bus drive usin a nice app to draw on galaxy note. it contains cools brushs and canvas to paint on, but no undo.
if i make mistake, i have work/paint around…

Maya playblast tool2

here is an improved version of the playblast script. Jean Denis pointed out the playblasting of more cameras is sequential and parallel. (thanks for that!) which would extreme slow in heavy scene with complex characters or large cache file. the new version of the script capture all cameras on each frame at the same time.  this way, maya have evaluate once on each frame and not do extra evaluation for each camera.  this way you can playblast simulations with different camera without caching.

i am using the active viewport for each camera to keep resolution constant. (and it avoid maya viewport issues).

* just made a little update to free maya after player is showing up

** another update: i added 2 more botton’s for houdini “mplay” tool. if you have houdini installed (even the demo version) it will bring up a mplay app and play until 4 cameras simultaneity in one window. (row or quas view)
tip: with shortcut “s” you link all view together and zoom synchronously

*** you use rv tile option (menu tools–>tile) to view all cameras side by side. i set it to default in the script

**** bugfix with timerange

 

get the latest version here: github

 

Screenshot
download it here

// written ny Heribert Raab heribertraab@gmail.com
// the tool create outliner with contain just cameras
// clicking on each camera switches through camera on your active viewport
// playblast botton will playblast all selected camera with aktiv viewport and load them into fcheck or rv

global proc playB(string $player)
{
string $select[] = ls -sl;

// setup playblast dir
//string $path = “/tmp/test/”;
string $frames2[] ;
string $fl[] = renderSettings -firstImageName -fullPathTemp;
string $f2[] = renderSettings -firstImageName;
string $path = substituteAllString($fl[0], $f2[0], “”);
int $min = playbackOptions -q -minTime;
int $max = playbackOptions -q -maxTime;
int $fr = $max – $min;

int $f;
string $all;
string $play;
string $scene = file -q -sn -shn;
string $scname = substituteAllString($scene, “.”, “_”);

for ($f=$min;$f <$max;$f++)
{
// playblast selected Cameras
$numInts = size($select);
$ridNum = $numInts +1;
int $i=0;
string $seq[];

for ($i=0;$i < $numInts; $i++)
{
lookThru ($select[$i]);
$frames2[$i] = $path+$scname+”_”+$select[$i];
//print ($frames2[$i]+”.”+$f+”\n”);
playblast -st $f -et $f -forceOverwrite -format image -fp 4 -compression “jpg” -f($frames2[$i]) -viewer 0 -offScreen -percent 100 -quality 70;
}
}
$all = stringArrayToString($frames2, “.* “);

//image player command
$play = ($player+” “+$all+”*”);

if ($player ==”mplay”) $play= ($player+” -V 2 2 -g “+$all+”* &”);
if ($player ==”mplay2″) $play= (“mplay -V 4 1 -g “+$all+”* &”);
if ($player ==”rv”) $play_rv = ($player+” -tile “+$all+”* &”);
if ($player ==”fcheck”) {$play = ($player+” -S “+$all+”* &”);}

print $play;print “\n”;
system( $play );
}

global proc look(){lookThru ls -sl;}

string $filterP = itemFilter -byType camera;

window cameras;
frameLayout -labelVisible false ;
string $panel = outlinerPanel;
columnLayout -adjustableColumn true;
button -label “Playblast selected Cams with RV” -command “playB rv”;
button -label “Playblast selected Cams with Fcheck” -command “playB fcheck”;
button -label “Playblast selected Cams with mPlay quad” -command “playB mplay”;
button -label “Playblast selected Cams with mPlay row” -command “playB mplay2″;

string $outliner = outlinerPanel -query -outlinerEditor $panel;
outlinerEditor -edit
-mainListConnection “worldList”
-selectionConnection “modelList”
-f $filterP
-selectCommand look
-showSetMembers true
-setFilter defaultSetFilter
$outliner;
showWindow;

maya effects outliner

its not always easy to find effects-related nodes in bigger maya scene files

this effects outliner shows only “effects”items and adds an handy dynamic Relationshipeditor botton.
(python script)
download it here

import maya.cmds as cmds
import math

# written ny Heribert Raab heribertraab@gmail.com
# create outliner window with show only effect related item’s

#setup filter with nodetypes
filterDyn = cmds.itemFilter(byType=(‘fluidEmitter’,’pointEmitter’,’rigidBody’,’nRigid’,’fluidShape’,’nParticle’,’nucleus’,’particle’,’nCloth’,’rigidConstraint’))

#delete allready open effects outlines
renUI = ‘EffectsOutliner’
if cmds.window(renUI, exists = True):
cmds.deleteUI(renUI)
def dynEditor(*args):
cmds.DynamicRelationshipEditor()

cmds.window(‘EffectsOutliner’,title=’EffectsOutliner’)
cmds.frameLayout( labelVisible=False,)
panel = cmds.outlinerPanel()
outliner = cmds.outlinerPanel(panel, query=True,outlinerEditor=True)
cmds.outlinerEditor( outliner, edit=True, mainListConnection=’worldList’, selectionConnection=’modelList’, filter=filterDyn , showShapes=True, showAttributes=False, showConnected=False, showAnimCurvesOnly=False, autoExpand=True, showDagOnly=True, ignoreDagHierarchy=True, expandConnections=False, showNamespace=True, showCompounds=True, showNumericAttrsOnly=False, highlightActive=True, autoSelectNewObjects=False, doNotSelectNewObjects=False, transmitFilters=False, showSetMembers=True, setFilter=’defaultSetFilter’ )

cmds.columnLayout( adjustableColumn=True )
cmds.button( label=’DynamicRelationshipEditor’, command=dynEditor)
cmds.showWindow()

Procedural drawings

Quick doodles I did on the bus

image

image

image_3_20140221213741932

fractals.procedural of the week 07

fractals.procedural of the week 06

fractals.procedural of the week 05

fractals.procedural of the week 04

exploring new little tool named fractaline.  interesting concept, putting all tranforms into connected line.  very intuitive to use.

fractals.procedural of the week 03

chaotics splines:

fractals.procedural of the week 02

fractals.procedural of the week 01