Arnold - Latlong Images and Light Filters

157 views
Skip to first unread message

Sumit Suri

unread,
Oct 23, 2018, 3:00:15 AM10/23/18
to gaffer-dev
Hi Guys,
I am having trouble loading Latlong images in Gaffer/Arnold, any ideas how I can load an hdri (latlong) with the skydome light ?

Also Arnold Light Filters, I was able to get Light decay to work with Arnold lights but having trouble with
Gobo, Lightblockers and Barndoors to work.

any information will be helpful.

regards
Sumit

Matti Grüner

unread,
Oct 23, 2018, 3:27:51 AM10/23/18
to gaffe...@googlegroups.com
Hey Sumit,

Also Arnold Light Filters, I was able to get Light decay to work with Arnold lights but having trouble with
Gobo, Lightblockers and Barndoors to work.

Can you tell us what you tried? All of those filters should work exactly like the light decay in terms of how things get set up. A simple ShaderAssignment node that assigns the filter to the light should do the trick. 

Matti.

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sumit Suri

unread,
Oct 23, 2018, 4:30:26 AM10/23/18
to gaffer-dev
Hi Matti,
I am able to assign these like decay filter using shader assignment, but

1. Barndoors - I guess parameters work between 0-1 (though I did try higher values too) but no effect visible in renders.

2. Gobos - I attached a .jpg image to gobo (slidemap) and connected the gobo to the shader assignment. but effect not visible in the renders. I have tried different maps too but the result is the same,

3. Blockers -  I attached a Light blocker using shader assignment. but no effect visible in renders. Also Geometry type - How can i place it in the scene at desired location and size. ?
Geometry Matrix - is this something that defines the placement of the blocker in the scene ?. how can I use this parameter ?

regards
Sumit

Matti Grüner

unread,
Oct 23, 2018, 11:38:08 AM10/23/18
to gaffe...@googlegroups.com
Hey Sumit,

apologies - I missed that you mentioned blockers, as well. Those will currently not work, but they are on my list of things to get to hopefully fairly soon.

The rest, however, should just work, I think. I will run some tests once I get into work. Which versions of Gaffer and Arnold are you using?

Thanks,

Matti.

Matti Gruner

unread,
Oct 23, 2018, 1:41:28 PM10/23/18
to gaffe...@googlegroups.com
Hey Sumit,

I've set up a simple demo box for you to look at. It works fine for me in Gaffer 0.51.0.1 and Arnold 5.1.1.0.

The box contains 3 lights affected by either a gobo, light_decay or barndoor node. Also note the visualizers in the viewport that should help with aligning things.

Please let me know if that doesn't work for you for some reason or if you have any other question. I'll work with our technical writer, Michael, to get something like this demo setup into our documentation so that we got that part of Gaffer covered a little bit better. 

Thanks,

Matti.


import Gaffer
import GafferArnold
import GafferOSL
import GafferScene
import IECore
import imath

Gaffer.Metadata.registerNodeValue( parent, "serialiser:milestoneVersion", 0, persistent=False )
Gaffer.Metadata.registerNodeValue( parent, "serialiser:majorVersion", 51, persistent=False )
Gaffer.Metadata.registerNodeValue( parent, "serialiser:minorVersion", 0, persistent=False )
Gaffer.Metadata.registerNodeValue( parent, "serialiser:patchVersion", 1, persistent=False )

__children = {}

__children["LightFilterDemo"] = Gaffer.Box( "LightFilterDemo" )
parent.addChild( __children["LightFilterDemo"] )
__children["LightFilterDemo"].addChild( GafferScene.Plane( "Plane" ) )
__children["LightFilterDemo"]["Plane"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferScene.Group( "Left" ) )
__children["LightFilterDemo"]["Left"]["in"].addChild( GafferScene.ScenePlug( "in1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["Left"]["in"].addChild( GafferScene.ScenePlug( "in2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["Left"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferArnold.ArnoldLight( "spot_light" ) )
__children["LightFilterDemo"]["spot_light"].loadShader( "spot_light" )
__children["LightFilterDemo"]["spot_light"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferScene.Group( "Group" ) )
__children["LightFilterDemo"]["Group"]["in"].addChild( GafferScene.ScenePlug( "in1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["Group"]["in"].addChild( GafferScene.ScenePlug( "in2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["Group"]["in"].addChild( GafferScene.ScenePlug( "in3", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["Group"]["in"].addChild( GafferScene.ScenePlug( "in4", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["Group"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferScene.ScenePlug( "out", direction = Gaffer.Plug.Direction.Out, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferScene.Plane( "Plane1" ) )
__children["LightFilterDemo"]["Plane1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferScene.Group( "Center" ) )
__children["LightFilterDemo"]["Center"]["in"].addChild( GafferScene.ScenePlug( "in1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["Center"]["in"].addChild( GafferScene.ScenePlug( "in2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["Center"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferArnold.ArnoldLight( "spot_light1" ) )
__children["LightFilterDemo"]["spot_light1"].loadShader( "spot_light" )
__children["LightFilterDemo"]["spot_light1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferScene.Camera( "Camera" ) )
__children["LightFilterDemo"]["Camera"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferScene.ShaderAssignment( "ShaderAssignment1" ) )
__children["LightFilterDemo"]["ShaderAssignment1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferScene.ShaderAssignment( "ShaderAssignment2" ) )
__children["LightFilterDemo"]["ShaderAssignment2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferArnold.ArnoldShader( "Barndoor" ) )
__children["LightFilterDemo"]["Barndoor"].loadShader( "barndoor" )
__children["LightFilterDemo"]["Barndoor"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferArnold.ArnoldShader( "Gobo" ) )
__children["LightFilterDemo"]["Gobo"].loadShader( "gobo" )
__children["LightFilterDemo"]["Gobo"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferOSL.OSLCode( "OSLCode" ) )
__children["LightFilterDemo"]["OSLCode"]["out"].addChild( Gaffer.Color3fPlug( "outColor", direction = Gaffer.Plug.Direction.Out, defaultValue = imath.Color3f( 0, 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["OSLCode"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( Gaffer.BoxOut( "BoxOut" ) )
__children["LightFilterDemo"]["BoxOut"].addChild( GafferScene.ScenePlug( "in", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["BoxOut"].addChild( GafferScene.ScenePlug( "__out", direction = Gaffer.Plug.Direction.Out, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["BoxOut"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferScene.ShaderAssignment( "ShaderAssignment" ) )
__children["LightFilterDemo"]["ShaderAssignment"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferScene.PathFilter( "PathFilter" ) )
__children["LightFilterDemo"]["PathFilter"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferArnold.ArnoldShader( "standard_surface" ) )
__children["LightFilterDemo"]["standard_surface"].loadShader( "standard_surface" )
__children["LightFilterDemo"]["standard_surface"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferScene.Plane( "Plane2" ) )
__children["LightFilterDemo"]["Plane2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferScene.Group( "Right" ) )
__children["LightFilterDemo"]["Right"]["in"].addChild( GafferScene.ScenePlug( "in1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["Right"]["in"].addChild( GafferScene.ScenePlug( "in2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["Right"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferArnold.ArnoldLight( "spot_light2" ) )
__children["LightFilterDemo"]["spot_light2"].loadShader( "spot_light" )
__children["LightFilterDemo"]["spot_light2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferScene.ShaderAssignment( "ShaderAssignment3" ) )
__children["LightFilterDemo"]["ShaderAssignment3"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"].addChild( GafferArnold.ArnoldShader( "decay" ) )
__children["LightFilterDemo"]["decay"].loadShader( "light_decay" )
__children["LightFilterDemo"]["decay"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["LightFilterDemo"]["Plane"]["__uiPosition"].setValue( imath.V2f( -46.7685165, 5.43458796 ) )
__children["LightFilterDemo"]["Left"]["in"]["in0"].setInput( __children["LightFilterDemo"]["ShaderAssignment2"]["out"] )
__children["LightFilterDemo"]["Left"]["in"]["in1"].setInput( __children["LightFilterDemo"]["Plane"]["out"] )
__children["LightFilterDemo"]["Left"]["transform"]["translate"].setValue( imath.V3f( -1, 0, 0 ) )
__children["LightFilterDemo"]["Left"]["__uiPosition"].setValue( imath.V2f( -46.7685165, -18.4103127 ) )
__children["LightFilterDemo"]["spot_light"]["transform"]["translate"].setValue( imath.V3f( 0, 0, 0.75 ) )
__children["LightFilterDemo"]["spot_light"]["__uiPosition"].setValue( imath.V2f( -49.7685165, -2.08218813 ) )
__children["LightFilterDemo"]["Group"]["in"]["in0"].setInput( __children["LightFilterDemo"]["Left"]["out"] )
__children["LightFilterDemo"]["Group"]["in"]["in1"].setInput( __children["LightFilterDemo"]["Center"]["out"] )
__children["LightFilterDemo"]["Group"]["in"]["in2"].setInput( __children["LightFilterDemo"]["Right"]["out"] )
__children["LightFilterDemo"]["Group"]["in"]["in3"].setInput( __children["LightFilterDemo"]["Camera"]["out"] )
__children["LightFilterDemo"]["Group"]["__uiPosition"].setValue( imath.V2f( -5.88885498, -26.5743752 ) )
__children["LightFilterDemo"]["out"].setInput( __children["LightFilterDemo"]["BoxOut"]["__out"] )
Gaffer.Metadata.registerValue( __children["LightFilterDemo"]["out"], 'nodule:color', imath.Color3f( 0.240099996, 0.339399993, 0.485000014 ) )
Gaffer.Metadata.registerValue( __children["LightFilterDemo"]["out"], 'connectionGadget:color', imath.Color3f( 0.119999997, 0.150000006, 0.349999994 ) )
Gaffer.Metadata.registerValue( __children["LightFilterDemo"]["out"], 'nodule:type', 'GafferUI::StandardNodule' )
Gaffer.Metadata.registerValue( __children["LightFilterDemo"]["out"], 'description', 'The processed output scene.' )
__children["LightFilterDemo"]["Plane1"]["__uiPosition"].setValue( imath.V2f( -8.88885498, 7.78299522 ) )
__children["LightFilterDemo"]["Center"]["in"]["in0"].setInput( __children["LightFilterDemo"]["ShaderAssignment1"]["out"] )
__children["LightFilterDemo"]["Center"]["in"]["in1"].setInput( __children["LightFilterDemo"]["Plane1"]["out"] )
__children["LightFilterDemo"]["Center"]["__uiPosition"].setValue( imath.V2f( -8.88885498, -4.88537025 ) )
__children["LightFilterDemo"]["spot_light1"]["transform"]["translate"].setValue( imath.V3f( 0, 0, 0.75 ) )
__children["LightFilterDemo"]["spot_light1"]["__uiPosition"].setValue( imath.V2f( -11.888855, 22.4847565 ) )
__children["LightFilterDemo"]["Camera"]["transform"]["translate"].setValue( imath.V3f( 0, 0, 2 ) )
__children["LightFilterDemo"]["Camera"]["__uiPosition"].setValue( imath.V2f( 15.3607731, -18.4103127 ) )
__children["LightFilterDemo"]["ShaderAssignment1"]["in"].setInput( __children["LightFilterDemo"]["spot_light1"]["out"] )
__children["LightFilterDemo"]["ShaderAssignment1"]["shader"].setInput( __children["LightFilterDemo"]["Gobo"]["out"] )
__children["LightFilterDemo"]["ShaderAssignment1"]["__uiPosition"].setValue( imath.V2f( -11.888855, 14.320693 ) )
__children["LightFilterDemo"]["ShaderAssignment2"]["in"].setInput( __children["LightFilterDemo"]["spot_light"]["out"] )
__children["LightFilterDemo"]["ShaderAssignment2"]["shader"].setInput( __children["LightFilterDemo"]["Barndoor"]["out"] )
__children["LightFilterDemo"]["ShaderAssignment2"]["__uiPosition"].setValue( imath.V2f( -49.7685165, -10.2462502 ) )
__children["LightFilterDemo"]["Barndoor"]["attributeSuffix"].setValue( 'barndoor' )
__children["LightFilterDemo"]["Barndoor"]["parameters"]["barndoor_top_left"].setValue( 0.20000000298023224 )
__children["LightFilterDemo"]["Barndoor"]["parameters"]["barndoor_top_right"].setValue( 0.5 )
__children["LightFilterDemo"]["Barndoor"]["parameters"]["barndoor_top_edge"].setValue( 0.10000000149011612 )
__children["LightFilterDemo"]["Barndoor"]["__uiPosition"].setValue( imath.V2f( -67.5196838, -10.2462502 ) )
__children["LightFilterDemo"]["Gobo"]["attributeSuffix"].setValue( 'gobo' )
__children["LightFilterDemo"]["Gobo"]["parameters"]["slidemap"].setInput( __children["LightFilterDemo"]["OSLCode"]["out"]["outColor"] )
__children["LightFilterDemo"]["Gobo"]["parameters"]["slidemap"]["r"].setInput( __children["LightFilterDemo"]["OSLCode"]["out"]["outColor"]["r"] )
__children["LightFilterDemo"]["Gobo"]["parameters"]["slidemap"]["g"].setInput( __children["LightFilterDemo"]["OSLCode"]["out"]["outColor"]["g"] )
__children["LightFilterDemo"]["Gobo"]["parameters"]["slidemap"]["b"].setInput( __children["LightFilterDemo"]["OSLCode"]["out"]["outColor"]["b"] )
__children["LightFilterDemo"]["Gobo"]["__uiPosition"].setValue( imath.V2f( -24.3949585, 14.320693 ) )
__children["LightFilterDemo"]["OSLCode"]["code"].setValue( 'outColor = noise( P * 25 );' )
__children["LightFilterDemo"]["OSLCode"]["__uiPosition"].setValue( imath.V2f( -35.2660522, 14.320693 ) )
__children["LightFilterDemo"]["BoxOut"]["in"].setInput( __children["LightFilterDemo"]["ShaderAssignment"]["out"] )
__children["LightFilterDemo"]["BoxOut"]["__out"].setInput( __children["LightFilterDemo"]["BoxOut"]["in"] )
Gaffer.Metadata.registerValue( __children["LightFilterDemo"]["BoxOut"]["__out"], 'nodule:color', imath.Color3f( 0.240099996, 0.339399993, 0.485000014 ) )
Gaffer.Metadata.registerValue( __children["LightFilterDemo"]["BoxOut"]["__out"], 'connectionGadget:color', imath.Color3f( 0.119999997, 0.150000006, 0.349999994 ) )
Gaffer.Metadata.registerValue( __children["LightFilterDemo"]["BoxOut"]["__out"], 'labelPlugValueWidget:renameable', True )
Gaffer.Metadata.registerValue( __children["LightFilterDemo"]["BoxOut"]["__out"], 'nodule:type', 'GafferUI::StandardNodule' )
Gaffer.Metadata.registerValue( __children["LightFilterDemo"]["BoxOut"]["__out"], 'description', 'The processed output scene.' )
__children["LightFilterDemo"]["BoxOut"]["__uiPosition"].setValue( imath.V2f( -5.88885498, -53.1073761 ) )
__children["LightFilterDemo"]["__uiPosition"].setValue( imath.V2f( -1.95168495, -44.1797791 ) )
__children["LightFilterDemo"]["ShaderAssignment"]["in"].setInput( __children["LightFilterDemo"]["Group"]["out"] )
__children["LightFilterDemo"]["ShaderAssignment"]["filter"].setInput( __children["LightFilterDemo"]["PathFilter"]["out"] )
__children["LightFilterDemo"]["ShaderAssignment"]["shader"].setInput( __children["LightFilterDemo"]["standard_surface"]["out"] )
__children["LightFilterDemo"]["ShaderAssignment"]["__uiPosition"].setValue( imath.V2f( -5.88885498, -44.7753448 ) )
__children["LightFilterDemo"]["PathFilter"]["paths"].setValue( IECore.StringVectorData( [ '/group/group/plane', '/group/group1/plane', '/group/group2/plane' ] ) )
__children["LightFilterDemo"]["PathFilter"]["__uiPosition"].setValue( imath.V2f( 9.24274445, -36.5660133 ) )
__children["LightFilterDemo"]["standard_surface"]["parameters"]["aov_id1"].setValue( 'id_1' )
__children["LightFilterDemo"]["standard_surface"]["parameters"]["aov_id2"].setValue( 'id_2' )
__children["LightFilterDemo"]["standard_surface"]["parameters"]["aov_id3"].setValue( 'id_3' )
__children["LightFilterDemo"]["standard_surface"]["parameters"]["aov_id4"].setValue( 'id_4' )
__children["LightFilterDemo"]["standard_surface"]["parameters"]["aov_id5"].setValue( 'id_5' )
__children["LightFilterDemo"]["standard_surface"]["parameters"]["aov_id6"].setValue( 'id_6' )
__children["LightFilterDemo"]["standard_surface"]["parameters"]["aov_id7"].setValue( 'id_7' )
__children["LightFilterDemo"]["standard_surface"]["parameters"]["aov_id8"].setValue( 'id_8' )
__children["LightFilterDemo"]["standard_surface"]["__uiPosition"].setValue( imath.V2f( -40.9373512, -44.7753448 ) )
__children["LightFilterDemo"]["Plane2"]["__uiPosition"].setValue( imath.V2f( 27.9168015, 16.454546 ) )
__children["LightFilterDemo"]["Right"]["in"]["in0"].setInput( __children["LightFilterDemo"]["ShaderAssignment3"]["out"] )
__children["LightFilterDemo"]["Right"]["in"]["in1"].setInput( __children["LightFilterDemo"]["Plane2"]["out"] )
__children["LightFilterDemo"]["Right"]["transform"]["translate"].setValue( imath.V3f( 1, 0, 0 ) )
__children["LightFilterDemo"]["Right"]["__uiPosition"].setValue( imath.V2f( 27.9168015, 3.43969536 ) )
__children["LightFilterDemo"]["spot_light2"]["transform"]["translate"].setValue( imath.V3f( 0, 0, 0.75 ) )
__children["LightFilterDemo"]["spot_light2"]["__uiPosition"].setValue( imath.V2f( 24.9168015, 30.4633389 ) )
__children["LightFilterDemo"]["ShaderAssignment3"]["in"].setInput( __children["LightFilterDemo"]["spot_light2"]["out"] )
__children["LightFilterDemo"]["ShaderAssignment3"]["shader"].setInput( __children["LightFilterDemo"]["decay"]["out"] )
__children["LightFilterDemo"]["ShaderAssignment3"]["__uiPosition"].setValue( imath.V2f( 24.9168015, 22.2992744 ) )
__children["LightFilterDemo"]["decay"]["attributeSuffix"].setValue( 'light_decay' )
__children["LightFilterDemo"]["decay"]["parameters"]["use_near_atten"].setValue( True )
__children["LightFilterDemo"]["decay"]["parameters"]["near_end"].setValue( 3.0 )
__children["LightFilterDemo"]["decay"]["__uiPosition"].setValue( imath.V2f( 10.7151413, 22.2992744 ) )


del __children


Matti Gruner - R&D Software Developer
Image Engine
studio: +1 (604) 874-5634 | mat...@image-engine.com | www.image-engine.com



15 West 5th Avenue, Vancouver, BC, V5Y 1H4, Canada

If you are not the intended recipient, disclosure, copying, distribution and use of this email is prohibited. Please notify us immediately and delete this email from your systems. You may contact us at in...@image-engine.com if you do not wish to receive further commercial electronic messages. We may still send you messages for which we do not require consent.

dan...@image-engine.com

unread,
Oct 23, 2018, 3:18:23 PM10/23/18
to gaffer-dev
As for your other question about skydome lights, all that should be necessary to get a latlong image hooked up is:

* create a skydome_light
* create an Arnold "image" shader, and connect it to "color" on the light
* set "Format" on the skydome_light to "latlong"

Here's a quick test I did, which seems to work ( as a copy-and-pastable network ):



import Gaffer

import GafferArnold

import GafferOSL

import GafferScene

import IECore

import imath


Gaffer.Metadata.registerNodeValue( parent, "serialiser:milestoneVersion", 0, persistent=False )

Gaffer.Metadata.registerNodeValue( parent, "serialiser:majorVersion", 52, persistent=False )

Gaffer.Metadata.registerNodeValue( parent, "serialiser:minorVersion", 0, persistent=False )

Gaffer.Metadata.registerNodeValue( parent, "serialiser:patchVersion", 0, persistent=False )


__children = {}


__children["skydome_light"] = GafferArnold.ArnoldLight( "skydome_light" )

parent.addChild( __children["skydome_light"] )

__children["skydome_light"].loadShader( "skydome_light" )

__children["skydome_light"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )

__children["image"] = GafferArnold.ArnoldShader( "image" )

parent.addChild( __children["image"] )

__children["image"].loadShader( "image" )

__children["image"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )

__children["skydome_light"]["parameters"]["color"].setInput( __children["image"]["out"] )

__children["skydome_light"]["parameters"]["color"]["r"].setInput( __children["image"]["out"]["r"] )

__children["skydome_light"]["parameters"]["color"]["g"].setInput( __children["image"]["out"]["g"] )

__children["skydome_light"]["parameters"]["color"]["b"].setInput( __children["image"]["out"]["b"] )

__children["skydome_light"]["parameters"]["format"].setValue( 'latlong' )

__children["skydome_light"]["__uiPosition"].setValue( imath.V2f( 84.9489822, 16.6277504 ) )

__children["image"]["parameters"]["filename"].setValue( '/home/danield/test_crud/mandrill.tx' )

__children["image"]["__uiPosition"].setValue( imath.V2f( 72.2624588, 17.2277508 ) )



del __children

Sumit Suri

unread,
Oct 23, 2018, 11:45:12 PM10/23/18
to gaffer-dev
Hi Guys,
thanks guys very helpful.
Latlong on skydome works fine.

Arnold Filters -
1. Gobos, barndoors work well with Spot Light but I not with quad lights. I am not sure if thats how arnold quad lights work or its a limitation with the current version.

I am still having issues getting blockers to work, would be great if I can get an example of that aswell.

thanks once again
Sumit

Matti Grüner

unread,
Oct 24, 2018, 1:01:35 AM10/24/18
to gaffe...@googlegroups.com
Hey Sumit,

I'm glad we could help.

In regards of your remaining questions:

  • Light Filters and Light Types
I am quoting from the Arnold docs in the following.

Light Decay

This filter can be added to all Arnold Lights. This is where you will specify the attenuation ranges. All lights in Arnold use a physically-based falloff by default, but the light_decay filter can be used to adjust the falloff for artistic purposes.   

Barndoor

This light filter can only be used with spot lights.
  
Gobo

The gobo filter can only be used with spot lights.

  • Blocker
Like I said in a previous email, currently there is no support for blockers, but they are slowly bubbling up to the top of my list of things to look into. They are a little bit different than the rest of the filters in that they are not attached to a single light and can be transformed independently. Some extra development will be needed because of that.


Matti.

--

Sumit Suri

unread,
Oct 24, 2018, 2:05:10 AM10/24/18
to gaffer-dev
sounds great
cheers
Sumit
Reply all
Reply to author
Forward
0 new messages