Human motion on graphics
February 12th, 2010This is a litle test to apply human motions to graphics.
The plan is to build a database of motion that can be used in both 2D and 3D.
This is a litle test to apply human motions to graphics.
The plan is to build a database of motion that can be used in both 2D and 3D.
I added Maya2010 versions of the KP_PointCache plugin.
This is the compiled version of the plugin for Maya 2008, 2009 and 2010 64bit on Linux.
the same source code as for the mac build. I attached the sourcecode and the makefile.
KP_PointCache is a plugin created by Kai Wolter, all creds to him.
I have compiled the KP_PointCache plugin by Kai Wolter for MacOSX and Maya 2008, 2009 and 2010.
I have attached the XProject files and compiled plugins.
I had to change two line of codes to get it to compile.
KP_PointCache.cpp line:434
from: long beforeFrameInBuffer = max(0, firstFrameInBuffer – 1);
to: long beforeFrameInBuffer = max<long>(0, firstFrameInBuffer – 1);
KP_PointCache.cpp line:435
from: long afterFrameInBuffer = min(numSamples -1, nextFrameInBuffer + 1);
to: long afterFrameInBuffer = min<long>(numSamples -1, nextFrameInBuffer + 1);
Back at the hotel after a so far very nice day in Annecy! We just saw short films in competition block nr 4 and it was really great! Go go Finland!
During the day we have seen the latest short from Pixar “Partly Cloudy” and listened to the director Peter Sohn who gave us some background information about the project. It was a blast! Before that we attended the special FX conference and listened to speakers from Double negative, MPC, BUF and Mikros images. Very interesting and inspiering.
At 18.00 we got to experience “3D 3D” at monsters VS aliens. It was cool and all but it felt like you got a beating over the nose from the glasses. It was worth it though!
Fast recap on day one, two and three:
Attended seminars about stereoscopic cinema and listened to the pioneers in that field discussing the pros and cons. Interesting of course and we are going to test it out our selves on our upcoming short “TV Guy”
We went on the seminar “Animated features case studies” and listened to everything from budgets to production pipelines. Also very educational and interesting.
The night is still young and we are about to hit the pub for a beer (ten?). Got to love animation festivals!
We went to pickup our badges and catalogs at the festival centre.
Then the fridge in the hotel room got an facelift.
Reminds me off this.
We have just arrived to Annecy Animation Festival for the third time.
This year we have the pleasure to enjoy the festival togheter with our friend Robban.
Here’s a python script that translates Lighting Coefficients from the paper by Ravi Ramamoorthi to a expression node. Connect a normal pass to the expression node.
import nuke
import string
def LCoeff2Nuke():
p = nuke.Panel("Paste Lighting Coefficients")
p.addMultilineTextInput("Coefficients:", '')
p.addButton("Cancel")
p.addButton("OK")
p.show()
coeffVal= p.value("Coefficients:")
#CONSTANTS
c1 = '0.429043'
c2 = '0.511664'
c3 = '0.743125'
c4 = '0.886227'
c5 = '0.247708'
Coefficients =[]
i=0
for line in coeffVal.split('\n'):
if line.startswith('L_'):
Coefficients.append(line.split()[1:4])
print line
i+=1
expTemplate = 'c1*L22*(pow2(r)-pow2(g)) + (c3*L20*pow2(b)) + c4*L00-(c5*-L20) + 2*c1*((L2m2*r*g)+(L21*r*b)+(L2m1*g*b)) + 2*c2*((L11*r)+(L1m1*g) + (L10*b))'
expressions = ['','','']
for i in range(3):
expressions[i] = expTemplate
expressions[i] = expressions[i].replace('c1', c1) #
expressions[i] = expressions[i].replace('c2', c2) #
expressions[i] = expressions[i].replace('c3', c3) #
expressions[i] = expressions[i].replace('c4', c4) #
expressions[i] = expressions[i].replace('c5', c5) #
expressions[i] = expressions[i].replace('L00', Coefficients[0][i]) #
expressions[i] = expressions[i].replace('L1m1', Coefficients[1][i]) #
expressions[i] = expressions[i].replace('L10', Coefficients[2][i]) #
expressions[i] = expressions[i].replace('L11', Coefficients[3][i]) #
expressions[i] = expressions[i].replace('L2m2', Coefficients[4][i])#
expressions[i] = expressions[i].replace('L2m1', Coefficients[5][i])#
expressions[i] = expressions[i].replace('L20', Coefficients[6][i]) #
expressions[i] = expressions[i].replace('L21', Coefficients[7][i]) #
expressions[i] = expressions[i].replace('L22', Coefficients[8][i]) #
expNode = nuke.nodes.Expression(expr0=expressions[0],expr1=expressions[1],expr2=expressions[2])
Here’s a python script to submit scripts from Nuke to Muster.
Change: server, username and password to your muster server account.
Usage: If you run the script with nothing selected it renders all Write nodes.
Otherwise it renders the selected Writenodes.
Remember to save your script before submitting.
import re, os
import nuke
server = "address"
username = "username"
password = "password"
def madSubmit():
a = nuke.knob("first_frame")
b = nuke.knob("last_frame")
start = int(a)
end = int(b)
incr = 1
_range = a+","+b
r = nuke.getInput("Frames to render:", _range)
if r is not None:
r = re.sub("[,|-|/]", " ", r)
t = r.split()
else:
return
if len(t) > 0:
start = int(t[0])
end = start
else:
return
if len(t) > 1: end = int(t[1])
if len(t) > 2: incr = int(t[2])
cmd = '""%s\\Mrtool.exe" -s %s -u %s -p %s -b -pk 10 -e 28 -n %s -sf %i -ef %i -bf 1 -st 1 -f %s' % (os.getenv("MUSTER", "Failed"), server, username, password, os.path.basename(nuke.value("root.name")).split(".")[0], int(start) ,int(end), nuke.value("root.name"))
writeNodes = [n for n in nuke.selectedNodes() if n.Class() == "Write"]
if writeNodes:
cmd += ' -add "-X '+','.join([node.name() for node in writeNodes])+'"'
cmd +='"'
print cmd
os.system(cmd)