Skip to content

Commit

Permalink
Merge pull request #9 from iaiotom/meshAtoms3
Browse files Browse the repository at this point in the history
Added support to the new mesh format of atoms 3
  • Loading branch information
andrewkaufman authored Apr 5, 2019
2 parents 90134b3 + 6add849 commit 5a8f9df
Show file tree
Hide file tree
Showing 74 changed files with 2,057 additions and 468 deletions.
54 changes: 29 additions & 25 deletions examples/assets/atomsRobot/atomsRobot.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
]
],"lods":{

},"thumbnailPath":""
}
},"RedRobot":{
"combinations":[
[
Expand All @@ -25,15 +25,15 @@
"Body|RobotBody","red_material"
]
]
},"thumbnailPath":""
}
},"YellowRobot":{
"combinations":[
[
"Body|RobotBody","yellow_material"
]
],"lods":{

},"thumbnailPath":""
}
}
},"lookFilePath":"","materials":{
"purple_material":{
Expand All @@ -46,17 +46,17 @@
}
},"atomsRobot":{
"clothSetupPath":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/cloth\/atomsRobot\/clothsetup.atomscloth","geometries":{
"flag":{
"filter":"*","geometry":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/geometries\/atomsRobot\/flag.geos"
},"pole":{
"filter":"*","geometry":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/geometries\/atomsRobot\/pole.geos"
},"robot1_arms":{
"RobotSkin1|arms|robot1_arms":{
"filter":"*","geometry":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/geometries\/atomsRobot\/robot1_arms.geos"
},"robot1_body":{
},"RobotSkin1|body|robot1_body":{
"filter":"*","geometry":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/geometries\/atomsRobot\/robot1_body.geos"
},"robot1_head":{
},"RobotSkin1|flag_group|pPlane1":{
"filter":"*","geometry":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/geometries\/atomsRobot\/pPlane1.geos"
},"RobotSkin1|flag_group|pole":{
"filter":"*","geometry":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/geometries\/atomsRobot\/pole.geos"
},"RobotSkin1|head|robot1_head":{
"filter":"*","geometry":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/geometries\/atomsRobot\/robot1_head.geos"
},"robot1_legs":{
},"RobotSkin1|legs|robot1_legs":{
"filter":"*","geometry":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/geometries\/atomsRobot\/robot1_legs.geos"
},"robot2_arms":{
"filter":"*","geometry":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/geometries\/atomsRobot\/robot2_arms.geos"
Expand All @@ -71,31 +71,33 @@
"Robot1":{
"combinations":[
[
"pole","pole_material"
"RobotSkin1|flag_group|pPlane1","lambert1"
],[
"RobotSkin1|head|robot1_head","robot1_material"
],[
"robot1_arms","robot1_material"
"RobotSkin1|legs|robot1_legs","robot1_material"
],[
"robot1_legs","robot1_material"
"RobotSkin1|arms|robot1_arms","robot1_material"
],[
"robot1_head","robot1_material"
"RobotSkin1|body|robot1_body","robot1_material"
],[
"robot1_body","robot1_material"
"RobotSkin1|flag_group|pPlane1","lambert1"
],[
"flag","flag_material"
"RobotSkin1|flag_group|pole","pole_material"
]
],"lods":{
"A":[
[
"robot1_body","robot1_material"
"RobotSkin1|body|robot1_body","robot1_material"
],[
"robot1_head","robot1_material"
"RobotSkin1|head|robot1_head","robot1_material"
]
],"B":[
[
"robot1_body","robot1_material"
"RobotSkin1|body|robot1_body","robot1_material"
]
]
},"thumbnailPath":""
}
},"Robot2":{
"combinations":[
[
Expand All @@ -119,17 +121,19 @@
"robot2_body","robot2_material"
]
]
},"thumbnailPath":""
}
}
},"lookFilePath":"","materials":{
"flag_material":{
"diffuse":"","diffuseColorBlue":0,"diffuseColorGreen":128,"diffuseColorRed":0,"diffuseWeight":1,"material":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/materials\/atomsRobot\/flag_material_ARN_MAT.ass","normal":"","specular":"","specularColorBlue":127,"specularColorGreen":127,"specularColorRed":127,"specularEccentricity":0.300000011920929,"specularRollOff":0.699999988079071,"specularWeight":0
},"lambert1":{
"diffuse":"","diffuseColorBlue":127,"diffuseColorGreen":127,"diffuseColorRed":127,"diffuseWeight":1,"material":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/materials\/atomsRobot\/lambert1.ass","normal":"","specular":"","specularColorBlue":0,"specularColorGreen":0,"specularColorRed":0,"specularEccentricity":0.300000011920929,"specularRollOff":0.699999988079071,"specularWeight":0
},"pole_material":{
"diffuse":"","diffuseColorBlue":43,"diffuseColorGreen":43,"diffuseColorRed":43,"diffuseWeight":1,"material":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/materials\/atomsRobot\/pole_material_ARN_MAT.ass","normal":"","specular":"","specularColorBlue":127,"specularColorGreen":127,"specularColorRed":127,"specularEccentricity":0.300000011920929,"specularRollOff":0.699999988079071,"specularWeight":0
"diffuse":"","diffuseColorBlue":43,"diffuseColorGreen":43,"diffuseColorRed":43,"diffuseWeight":1,"material":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/materials\/atomsRobot\/pole_material.ass","normal":"","specular":"","specularColorBlue":127,"specularColorGreen":127,"specularColorRed":127,"specularEccentricity":0.300000011920929,"specularRollOff":0.699999988079071,"specularWeight":0
},"robot1_material":{
"diffuse":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/preview\/atomsRobot\/robot1_material_diff.jpg","diffuseColorBlue":170,"diffuseColorGreen":170,"diffuseColorRed":170,"diffuseWeight":1,"material":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/materials\/atomsRobot\/robot1_material_ARN_MAT.ass","normal":"","specular":"","specularColorBlue":127,"specularColorGreen":127,"specularColorRed":127,"specularEccentricity":0.300000011920929,"specularRollOff":0.699999988079071,"specularWeight":0
"diffuse":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/preview\/atomsRobot\/robot1_material_diff.jpg","diffuseColorBlue":170,"diffuseColorGreen":170,"diffuseColorRed":170,"diffuseWeight":1,"material":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/materials\/atomsRobot\/robot1_material.ass","normal":"","specular":"","specularColorBlue":127,"specularColorGreen":127,"specularColorRed":127,"specularEccentricity":0.300000011920929,"specularRollOff":0.699999988079071,"specularWeight":0
},"robot2_material":{
"diffuse":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/preview\/atomsRobot\/robot2_material_diff.jpg","diffuseColorBlue":170,"diffuseColorGreen":170,"diffuseColorRed":170,"diffuseWeight":1,"material":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/materials\/atomsRobot\/robot2_material_ARN_MAT.ass","normal":"","specular":"","specularColorBlue":127,"specularColorGreen":127,"specularColorRed":127,"specularEccentricity":0.300000011920929,"specularRollOff":0.699999988079071,"specularWeight":0
"diffuse":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/preview\/atomsRobot\/robot2_material_diff.jpg","diffuseColorBlue":170,"diffuseColorGreen":170,"diffuseColorRed":170,"diffuseWeight":1,"material":"${ATOMS_GAFFER_ROOT}\/examples\/assets\/atomsRobot\/materials\/atomsRobot\/robot2_material.ass","normal":"","specular":"","specularColorBlue":127,"specularColorGreen":127,"specularColorRed":127,"specularEccentricity":0.300000011920929,"specularRollOff":0.699999988079071,"specularWeight":0
}
}
}
Expand Down
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0001.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0002.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0003.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0004.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0005.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0006.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0007.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0008.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0009.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0010.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0011.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0012.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0013.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0014.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0015.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0016.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0017.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0018.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0019.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0020.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0021.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0022.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0023.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0024.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0025.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0026.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0027.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0028.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0029.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0030.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0031.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0032.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0033.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0034.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0035.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0036.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0037.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0038.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0039.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0040.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0041.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0042.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0043.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0044.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0045.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0046.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0047.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0048.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0049.clothcache
Binary file not shown.
Binary file modified examples/assets/atomsRobot/cloth_cache/cloth_sim.0050.clothcache
Binary file not shown.
Binary file not shown.
Binary file modified examples/assets/atomsRobot/geometries/atomsRobot/pole.geos
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified examples/assets/atomsRobot/geometries/atomsRobot/robot1_head.geos
Binary file not shown.
Binary file not shown.
18 changes: 18 additions & 0 deletions examples/assets/atomsRobot/materials/atomsRobot/lambert1.ass
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
### ATOMS: lambert1
### exported: Fri Mar 29 16:11:20 2019
### from: Arnold 5.2.1.0 [7c7c9701] linux clang-5.0.0 oiio-1.7.17 osl-1.9.9 vdb-4.0.0 clm-1.0.3.513 rlm-12.4.2 2018/10/19 22:25:43
### host app: MtoA 3.1.1 5d19efb6 (master) Maya 2018
### user: alan
### render_layer: rs_Robot1
### scene: /home/alan/projects/atomsDemo/scenes/AtomsRobotForGaffer.ma



lambert
{
name lambert1
Kd 1
Kd_color 0.5 0.5 0.5
opacity 1 1 1
}

27 changes: 27 additions & 0 deletions examples/assets/atomsRobot/materials/atomsRobot/pole_material.ass
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### ATOMS: pole_material
### exported: Fri Mar 29 16:11:20 2019
### from: Arnold 5.2.1.0 [7c7c9701] linux clang-5.0.0 oiio-1.7.17 osl-1.9.9 vdb-4.0.0 clm-1.0.3.513 rlm-12.4.2 2018/10/19 22:25:43
### host app: MtoA 3.1.1 5d19efb6 (master) Maya 2018
### user: alan
### render_layer: rs_Robot1
### scene: /home/alan/projects/atomsDemo/scenes/AtomsRobotForGaffer.ma



standard_surface
{
name pole_material
base_color 0.169270828 0.169270828 0.169270828
specular 1
specular_color 0.5 0.5 0.5
specular_roughness 0.28355819
specular_IOR 3
coat 0.5
coat_color 0 0 0
coat_roughness 0
coat_IOR 3
emission 1
emission_color 0 0 0
opacity 1 1 1
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
### ATOMS: robot1_material
### exported: Fri Mar 29 16:11:18 2019
### from: Arnold 5.2.1.0 [7c7c9701] linux clang-5.0.0 oiio-1.7.17 osl-1.9.9 vdb-4.0.0 clm-1.0.3.513 rlm-12.4.2 2018/10/19 22:25:43
### host app: MtoA 3.1.1 5d19efb6 (master) Maya 2018
### user: alan
### render_layer: rs_Robot1
### scene: /home/alan/projects/atomsDemo/scenes/AtomsRobotForGaffer.ma



standard_surface
{
name robot1_material
base_color robot2_file
specular 1
specular_color 0.5 0.5 0.5
specular_roughness 0.28355819
specular_IOR 3
coat 0.5
coat_color 0 0 0
coat_roughness 0
coat_IOR 3
emission 1
emission_color 0 0 0
opacity 1 1 1
}

image
{
name robot2_file
filename "/home/alan/projects/atomscrowd/deploy/data/robot1_diffuse.jpg"
color_space ""
filter "smart_bicubic"
swrap "periodic"
twrap "periodic"
sscale 1
tscale 1
soffset 0
toffset 0
uvset ""
ignore_missing_textures on
missing_texture_color 0.5 0.5 0.5 0
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### ATOMS: robot2_material
### exported: Fri Mar 29 16:11:20 2019
### from: Arnold 5.2.1.0 [7c7c9701] linux clang-5.0.0 oiio-1.7.17 osl-1.9.9 vdb-4.0.0 clm-1.0.3.513 rlm-12.4.2 2018/10/19 22:25:43
### host app: MtoA 3.1.1 5d19efb6 (master) Maya 2018
### user: alan
### render_layer: rs_Robot2
### scene: /home/alan/projects/atomsDemo/scenes/AtomsRobotForGaffer.ma



19 changes: 11 additions & 8 deletions examples/scripts/atomsExampleScene.gfr
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import GafferScene
import IECore
import imath

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

__children = {}

Expand Down Expand Up @@ -116,6 +116,7 @@ __children["Catalogue"] = GafferImage.Catalogue( "Catalogue" )
parent.addChild( __children["Catalogue"] )
__children["Catalogue"]["images"].addChild( GafferImage.Catalogue.Image( "Image", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Catalogue"]["images"].addChild( GafferImage.Catalogue.Image( "Image1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Catalogue"]["images"].addChild( GafferImage.Catalogue.Image( "Image2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Catalogue"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ShaderAssignment2"] = GafferScene.ShaderAssignment( "ShaderAssignment2" )
parent.addChild( __children["ShaderAssignment2"] )
Expand Down Expand Up @@ -211,7 +212,8 @@ __children["AtomsMetadata3"]["metadata"]["member2"].addChild( Gaffer.StringPlug(
__children["AtomsMetadata3"]["metadata"]["member2"].addChild( Gaffer.FloatPlug( "value", defaultValue = 0.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["AtomsMetadata3"]["metadata"]["member2"].addChild( Gaffer.BoolPlug( "enabled", defaultValue = True, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["AtomsMetadata3"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
parent["variables"]["imageCataloguePort"]["value"].setValue( 44349 )
parent["frame"].setValue( 3.0 )
parent["variables"]["imageCataloguePort"]["value"].setValue( 40547 )
Gaffer.Metadata.registerValue( parent["variables"]["imageCataloguePort"], 'readOnly', True )
Gaffer.Metadata.registerValue( parent["variables"]["projectName"]["name"], 'readOnly', True )
Gaffer.Metadata.registerValue( parent["variables"]["projectRootDirectory"]["name"], 'readOnly', True )
Expand Down Expand Up @@ -275,13 +277,14 @@ __children["Outputs"]["outputs"]["output1"]["type"].setValue( 'ieDisplay' )
__children["Outputs"]["outputs"]["output1"]["data"].setValue( 'rgba' )
__children["Outputs"]["__uiPosition"].setValue( imath.V2f( 35.2518997, -70.3297501 ) )
__children["InteractiveArnoldRender"]["in"].setInput( __children["Outputs"]["out"] )
__children["InteractiveArnoldRender"]["__uiPosition"].setValue( imath.V2f( 35.2499161, -78.4938126 ) )
__children["InteractiveArnoldRender"]["__uiPosition"].setValue( imath.V2f( 35.2518997, -78.4938126 ) )
Gaffer.Metadata.registerValue( __children["Catalogue"]["images"]["Image"], 'image:index', 0 )
__children["Catalogue"]["images"]["Image"]["fileName"].setValue( '/home/alan/gaffer/projects/default/catalogues/atomsExampleScene/28336951b30291dde594110611c694d8.exr' )
__children["Catalogue"]["images"]["Image1"]["fileName"].setValue( '/home/alan/gaffer/projects/default/catalogues/atomsExampleScene/1b607f54d2a160bbfb28297e445ada2a.exr' )
__children["Catalogue"]["images"]["Image2"]["fileName"].setValue( '/home/alan/gaffer/projects/default/catalogues/atomsExampleScene/370b89806b02f72c3a398502419a82cd.exr' )
__children["Catalogue"]["imageIndex"].setValue( 2 )
__children["Catalogue"]["directory"].setValue( '${project:rootDirectory}/catalogues/${script:name}' )
__children["Catalogue"]["__mapping"].setValue( IECore.CompoundData({'Image':IECore.IntData( 0 ),'Image1':IECore.IntData( 1 ),'Image2':IECore.IntData( 2 )}) )
__children["Catalogue"]["__mapping"].setValue( IECore.CompoundData({'Image':IECore.IntData( 0 ),'Image2':IECore.IntData( 2 ),'Image1':IECore.IntData( 1 )}) )
__children["Catalogue"]["__uiPosition"].setValue( imath.V2f( 16.6360798, -56.9887085 ) )
__children["ShaderAssignment2"]["in"].setInput( __children["ShaderAssignment1"]["out"] )
__children["ShaderAssignment2"]["filter"].setInput( __children["PathFilter2"]["out"] )
Expand Down Expand Up @@ -336,7 +339,7 @@ __children["flag_material"]["parameters"]["base_color"]["r"].setInput( __childre
__children["flag_material"]["parameters"]["base_color"]["g"].setInput( __children["user_data_rgb"]["out"]["g"] )
__children["flag_material"]["parameters"]["base_color"]["b"].setInput( __children["user_data_rgb"]["out"]["b"] )
__children["flag_material"]["__uiPosition"].setValue( imath.V2f( -5.06980801, 16.8256397 ) )
__children["PathFilter5"]["paths"].setValue( IECore.StringVectorData( [ '/atomsRobot/Robot1/flag' ] ) )
__children["PathFilter5"]["paths"].setValue( IECore.StringVectorData( [ '/atomsRobot/Robot1/RobotSkin1/flag_group/pPlane1' ] ) )
__children["PathFilter5"]["__uiPosition"].setValue( imath.V2f( 29.1910629, 21.9280891 ) )
__children["user_data_rgb"]["parameters"]["attribute"].setValue( 'user:atoms:flagColor' )
__children["user_data_rgb"]["parameters"]["default"].setValue( imath.Color3f( 1, 0, 0 ) )
Expand Down
9 changes: 6 additions & 3 deletions include/AtomsGaffer/AtomsCrowdGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,25 @@ class AtomsCrowdGenerator : public GafferScene::BranchCreator
IECoreScene::MeshPrimitivePtr& result,
IECoreScene::ConstMeshPrimitivePtr& meshPrim,
IECore::ConstCompoundObjectPtr& meshAttributes,
const std::vector<Imath::M44d>& worldMatrices
const std::vector<Imath::M44d>& worldMatrices,
const Imath::M44f& transformMatrix
) const;

void applyBlendShapesDeformer(
const ScenePath &branchPath,
IECoreScene::MeshPrimitivePtr& result,
const IECore::CompoundData* metadataData,
const IECore::CompoundDataMap& pointVariablesData,
const int agentIdPointIndex
const int agentIdPointIndex,
const Imath::M44f& transformMatrix
) const;

bool applyClothDeformer(
const ScenePath &branchPath,
IECoreScene::MeshPrimitivePtr& result,
IECore::ConstCompoundDataPtr& cloth,
const Imath::M44f rootMatrix
const Imath::M44f& rootMatrix,
const Imath::M44f& transformMatrix
) const;

Imath::M44f agentRootMatrix( const ScenePath &parentPath, const ScenePath &branchPath, const Gaffer::Context *context ) const;
Expand Down
4 changes: 2 additions & 2 deletions include/AtomsGaffer/AtomsMetadataTranslator.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ class AtomsMetadataTranslator

public:

typedef IECore::DataPtr( *Translator )( const AtomsPtr<AtomsCore::Metadata>& );
typedef IECore::DataPtr( *Translator )( const AtomsPtr<const AtomsCore::Metadata>& );

static AtomsMetadataTranslator& instance();

IECore::DataPtr translate( const AtomsPtr<AtomsCore::Metadata>& metadata );
IECore::DataPtr translate( const AtomsPtr<const AtomsCore::Metadata>& metadata ) const;

private:

Expand Down
13 changes: 10 additions & 3 deletions include/AtomsGaffer/AtomsVariationReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,20 @@ class AtomsVariationReader : public GafferScene::SceneNode

private:

AtomsPtr<const AtomsCore::MapMetadata> getNodeDataFromHierarchy( const ScenePath &path ) const;

void mergeUvSets( AtomsUtils::Mesh& mesh, AtomsUtils::Mesh& inMesh, size_t startSize ) const;

void mergeAtomsMesh(
void mergeBlendShapes(
AtomsPtr<AtomsCore::MapMetadata>& geoMap,
AtomsPtr<AtomsCore::ArrayMetadata>& outBlendMeta,
AtomsUtils::Mesh &inMesh,
size_t pointSize,
size_t normalSize ) const;

void mergeAtomsMesh(
AtomsPtr<AtomsCore::MapMetadata>& outGeoMap,
AtomsPtr<AtomsCore::MeshMetadata>& outMeshMeta,
AtomsPtr<AtomsCore::ArrayMetadata>& outBlendMeta
std::vector<AtomsPtr<AtomsCore::MapMetadata>>& geos
) const;

private :
Expand Down
13 changes: 8 additions & 5 deletions python/AtomsGafferTest/AtomsCrowdClothReaderTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,21 @@ def testCompute( self ) :
self.assertTrue( "17" in data )

agent_data = data["0"]
self.assertTrue( "flag" in agent_data )

flag_data = agent_data["flag"]
self.assertTrue( "RobotSkin1|flag_group|pPlane1" in agent_data )
flag_data = agent_data["RobotSkin1|flag_group|pPlane1"]
self.assertTrue( "P" in flag_data )
self.assertEqual( len(flag_data["P"]), 121 )
self.assertTrue( "N" in flag_data )
self.assertEqual( len(flag_data["N"]), 121 )
self.assertTrue( "stackOrder" in flag_data )
self.assertEqual( flag_data["stackOrder"].value, "last" )
self.assertTrue( "boundingBox" in flag_data )
self.assertAlmostEqual( flag_data["boundingBox"].value.min(), imath.V3d( -302.4302978515625, -0.043552137911319733, -367.09475708007812 ) )
self.assertAlmostEqual( flag_data["boundingBox"].value.max(), imath.V3d( -270.42013549804688, 32.08740234375, -297.2152099609375 ) )
self.assertAlmostEqual( flag_data["boundingBox"].value.min().x, -298.7542419433594 )
self.assertAlmostEqual( flag_data["boundingBox"].value.min().y, -42.13385772705078 )
self.assertAlmostEqual( flag_data["boundingBox"].value.min().z, -331.2435302734375 )
self.assertAlmostEqual( flag_data["boundingBox"].value.max().x, -272.296875 )
self.assertAlmostEqual( flag_data["boundingBox"].value.max().y, 22.100797653198242 )
self.assertAlmostEqual( flag_data["boundingBox"].value.max().z, -294.7496032714844 )


if __name__ == "__main__":
Expand Down
Loading

0 comments on commit 5a8f9df

Please sign in to comment.