Archive for the ‘Download’ Category

Environment light in Nuke

Friday, March 6th, 2009

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])

madSplitToning

Friday, August 15th, 2008

This is a simple Nuke Gizmo that is similar to the Split Toning feature in Adobe Lightroom.

DOWNLOAD:

madsplittoning_v01

.

The MEL that you shouldn’t need

Wednesday, May 28th, 2008

madRecentCrashFile.mel

I wrote this script after a very buggy period of Maya use. After i found myself digging around in the temp directory, searching for the recently crashed file.

I run it at Maya startup so that it’s always there and up to date.

DOWNLOAD:

madRecentCrashFile.mel

.

Photoshop To Map

Thursday, August 23rd, 2007

Here’s two script for exporting textures from Photoshop to Mental Ray .map format.

(more…)

Posten Showroom Breakdown

Sunday, August 12th, 2007

posten.jpg

We have produced some animations for the swedish post office together with the advertising agency Ã…kestam Holst and the production company B-Reel. It is a stylistic 2D animation made in 3D. You can check them out here.
(more…)