Skip to content

Commit

Permalink
+ Fix rotation euler
Browse files Browse the repository at this point in the history
+ Deprecate NodeSocketFloatAngle, NodeSocketIntUnsigned, NodeSocketVectorXYZ, NodeSocketVectorTranslation
+ Fix AccumulateField outputs, + Fix Switch inputs
+ Change ShaderNodeBsdfVelvet
+ Fix leaf v2
+ Remove Transmission Roughness
+ Fix EvaluatedAtIndex
+ Change import and export operations, fix usdc operations
  • Loading branch information
JerryLingjieMei authored and pvl-bot committed Nov 11, 2024
1 parent b760f52 commit 58f1ccc
Show file tree
Hide file tree
Showing 77 changed files with 475 additions and 479 deletions.
2 changes: 1 addition & 1 deletion infinigen/assets/materials/beverage_fridge_shaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def shader_white_metal_001(nw: NodeWrangler):
"Roughness": 0.1000,
"Anisotropic": 0.9182,
"Sheen Weight": 0.0455,
"Sheen Tint": 0.4948,
"Sheen Tint": (0, 0, 0, 0.4948),
},
attrs={"subsurface_method": "BURLEY"},
)
Expand Down
6 changes: 3 additions & 3 deletions infinigen/assets/materials/fabrics/general_fabric.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def func_fabric(nw: NodeWrangler, **kwargs):

mix = nw.new_node(
Nodes.Mix,
input_kwargs={6: map_range.outputs["Result"], 7: map_range_1.outputs["Result"]},
input_kwargs={1: map_range.outputs["Result"], 2: map_range_1.outputs["Result"]},
attrs={"data_type": "RGBA"},
)

Expand Down Expand Up @@ -130,7 +130,7 @@ def func_fabric(nw: NodeWrangler, **kwargs):

mix_4 = nw.new_node(
Nodes.Mix,
input_kwargs={0: less_than, 6: mix_2.outputs[2], 7: group_input["Color1"]},
input_kwargs={0: less_than, 1: mix_2.outputs[2], 2: group_input["Color1"]},
attrs={"data_type": "RGBA"},
)

Expand Down Expand Up @@ -175,7 +175,7 @@ def func_fabric(nw: NodeWrangler, **kwargs):

mix_1 = nw.new_node(
Nodes.Mix,
input_kwargs={6: musgrave_texture, 7: mix.outputs[2]},
input_kwargs={1: musgrave_texture, 2: mix.outputs[2]},
attrs={"data_type": "RGBA"},
)

Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/fabrics/velvet.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def shader_velvet(nw: NodeWrangler, **kwargs):

mix_6 = nw.new_node(
Nodes.Mix,
input_kwargs={0: 0.1125, 6: voronoi_texture.outputs["Color"]},
input_kwargs={0: 0.1125, 1: voronoi_texture.outputs["Color"]},
attrs={"data_type": "RGBA"},
)

Expand Down
1 change: 0 additions & 1 deletion infinigen/assets/materials/lamp_shaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def shader_lampshade(nw: NodeWrangler):
"Roughness": U(0.5, 0.8),
"IOR": 4.0000,
"Transmission Weight": U(0.05, 0.2),
"Transmission Roughness": 1.0000,
},
)

Expand Down
6 changes: 1 addition & 5 deletions infinigen/assets/materials/succulent.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ def shader_pink_transition_succulent(nw: NodeWrangler):
"Subsurface Color": colorramp_1.outputs["Color"],
"Specular IOR Level": 0.0,
"Roughness": 2.0,
"Sheen Tint": 0.0,
"Coat Roughness": 0.0,
"IOR": 1.3,
"Emission Strength": 0.0,
Expand Down Expand Up @@ -233,7 +232,6 @@ def shader_green_succulent(nw: NodeWrangler):
"Subsurface Color": colorramp_1.outputs["Color"],
"Specular IOR Level": 0.0,
"Roughness": 2.0,
"Sheen Tint": 0.0,
"Coat Roughness": 0.0,
"IOR": 1.3,
"Emission Strength": 0.0,
Expand Down Expand Up @@ -310,10 +308,9 @@ def shader_yellow_succulent(nw: NodeWrangler):
"Base Color": colorramp_1.outputs["Color"],
"Subsurface Weight": 0.01,
"Subsurface Radius": (1.0, 1.0, 1.0),
"Subsurface Color": colorramp_1.outputs["Alpha"],
"Subsurface Color": nw.combine(*([colorramp_1.outputs["Alpha"]] * 3)),
"Specular IOR Level": 0.0,
"Roughness": 2.0,
"Sheen Tint": 0.0,
"Coat Roughness": 0.0,
"IOR": 1.3,
"Emission Strength": 0.0,
Expand Down Expand Up @@ -406,7 +403,6 @@ def shader_whitish_green_succulent(nw: NodeWrangler):
"Subsurface Color": colorramp.outputs["Color"],
"Specular IOR Level": 0.0,
"Roughness": 2.0,
"Sheen Tint": 0.0,
"Coat Roughness": 0.0,
"IOR": 1.3,
"Emission Strength": 0.0,
Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def shader_text(nw: NodeWrangler, **kwargs):
"Roughness": roughness,
"Metallic": uniform(0, 0.5),
"Specular IOR Level": uniform(0, 0.2),
"Emission": emission,
"Emission Color": emission,
"Emission Strength": self.emission,
},
)
Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/tiles/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def nodegroup_u_v_recenter(nw: NodeWrangler):
expose_input=[
("NodeSocketVector", "UV", (0.0000, 0.0000, 0.0000)),
("NodeSocketVector", "HalfSize", (0.0000, 0.0000, 0.0000)),
("NodeSocketFloatAngle", "Rot Angle", 0.0000),
("NodeSocketFloat", "Rot Angle", 0.0000),
],
)

Expand Down
30 changes: 15 additions & 15 deletions infinigen/assets/objects/appliances/beverage_fridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def nodegroup_text(nw: NodeWrangler):
group_input = nw.new_node(
Nodes.GroupInput,
expose_input=[
("NodeSocketVectorTranslation", "Translation", (1.5000, 0.0000, 0.0000)),
("NodeSocketVector", "Translation", (1.5000, 0.0000, 0.0000)),
("NodeSocketString", "String", "BrandName"),
("NodeSocketFloat", "Size", 0.0500),
("NodeSocketFloat", "Offset Scale", 0.0020),
Expand Down Expand Up @@ -572,7 +572,7 @@ def nodegroup_cube(nw: NodeWrangler):
group_input = nw.new_node(
Nodes.GroupInput,
expose_input=[
("NodeSocketVectorTranslation", "Size", (0.1000, 10.0000, 4.0000)),
("NodeSocketVector", "Size", (0.1000, 10.0000, 4.0000)),
("NodeSocketVector", "Pos", (0.0000, 0.0000, 0.0000)),
("NodeSocketInt", "Resolution", 2),
],
Expand Down Expand Up @@ -638,7 +638,7 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
group_input = nw.new_node(
Nodes.GroupInput,
expose_input=[
("NodeSocketVectorTranslation", "Size", (0.1000, 10.0000, 4.0000)),
("NodeSocketVector", "Size", (0.1000, 10.0000, 4.0000)),
("NodeSocketVector", "Pos", (0.0000, 0.0000, 0.0000)),
("NodeSocketInt", "Resolution", 2),
("NodeSocketFloat", "Thickness", 0.0000),
Expand Down Expand Up @@ -750,7 +750,7 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
)

switch_2 = nw.new_node(
Nodes.Switch, input_kwargs={1: group_input.outputs["Switch3"], 14: transform_2}
Nodes.Switch, input_kwargs={0: group_input.outputs["Switch3"], 1: transform_2}
)

subtract_3 = nw.new_node(
Expand Down Expand Up @@ -817,7 +817,7 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
)

switch_1 = nw.new_node(
Nodes.Switch, input_kwargs={1: group_input.outputs["Switch2"], 14: transform_1}
Nodes.Switch, input_kwargs={0: group_input.outputs["Switch2"], 1: transform_1}
)

subtract_5 = nw.new_node(
Expand Down Expand Up @@ -879,7 +879,7 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
)

switch = nw.new_node(
Nodes.Switch, input_kwargs={1: group_input.outputs["Switch1"], 14: transform}
Nodes.Switch, input_kwargs={0: group_input.outputs["Switch1"], 1: transform}
)

subtract_6 = nw.new_node(
Expand Down Expand Up @@ -953,7 +953,7 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
)

switch_3 = nw.new_node(
Nodes.Switch, input_kwargs={1: group_input.outputs["Switch4"], 14: transform_3}
Nodes.Switch, input_kwargs={0: group_input.outputs["Switch4"], 1: transform_3}
)

combine_xyz_9 = nw.new_node(
Expand Down Expand Up @@ -1012,7 +1012,7 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
)

switch_4 = nw.new_node(
Nodes.Switch, input_kwargs={1: group_input.outputs["Switch5"], 14: transform_4}
Nodes.Switch, input_kwargs={0: group_input.outputs["Switch5"], 1: transform_4}
)

combine_xyz_10 = nw.new_node(
Expand Down Expand Up @@ -1073,19 +1073,19 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
)

switch_5 = nw.new_node(
Nodes.Switch, input_kwargs={1: group_input.outputs["Switch6"], 14: transform_5}
Nodes.Switch, input_kwargs={0: group_input.outputs["Switch6"], 1: transform_5}
)

join_geometry = nw.new_node(
Nodes.JoinGeometry,
input_kwargs={
"Geometry": [
switch_2.outputs[6],
switch_1.outputs[6],
switch.outputs[6],
switch_3.outputs[6],
switch_4.outputs[6],
switch_5.outputs[6],
switch_2,
switch_1,
switch,
switch_3,
switch_4,
switch_5,
]
},
)
Expand Down
30 changes: 15 additions & 15 deletions infinigen/assets/objects/appliances/dishwasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def nodegroup_text(nw: NodeWrangler):
group_input = nw.new_node(
Nodes.GroupInput,
expose_input=[
("NodeSocketVectorTranslation", "Translation", (1.5000, 0.0000, 0.0000)),
("NodeSocketVector", "Translation", (1.5000, 0.0000, 0.0000)),
("NodeSocketString", "String", "BrandName"),
("NodeSocketFloat", "Size", 0.0500),
("NodeSocketFloat", "Offset Scale", 0.0020),
Expand Down Expand Up @@ -641,7 +641,7 @@ def nodegroup_cube(nw: NodeWrangler):
group_input = nw.new_node(
Nodes.GroupInput,
expose_input=[
("NodeSocketVectorTranslation", "Size", (0.1000, 10.0000, 4.0000)),
("NodeSocketVector", "Size", (0.1000, 10.0000, 4.0000)),
("NodeSocketVector", "Pos", (0.0000, 0.0000, 0.0000)),
("NodeSocketInt", "Resolution", 2),
],
Expand Down Expand Up @@ -707,7 +707,7 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
group_input = nw.new_node(
Nodes.GroupInput,
expose_input=[
("NodeSocketVectorTranslation", "Size", (0.1000, 10.0000, 4.0000)),
("NodeSocketVector", "Size", (0.1000, 10.0000, 4.0000)),
("NodeSocketVector", "Pos", (0.0000, 0.0000, 0.0000)),
("NodeSocketInt", "Resolution", 2),
("NodeSocketFloat", "Thickness", 0.0000),
Expand Down Expand Up @@ -819,7 +819,7 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
)

switch_2 = nw.new_node(
Nodes.Switch, input_kwargs={1: group_input.outputs["Switch3"], 14: transform_2}
Nodes.Switch, input_kwargs={0: group_input.outputs["Switch3"], 2: transform_2}
)

subtract_3 = nw.new_node(
Expand Down Expand Up @@ -886,7 +886,7 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
)

switch_1 = nw.new_node(
Nodes.Switch, input_kwargs={1: group_input.outputs["Switch2"], 14: transform_1}
Nodes.Switch, input_kwargs={0: group_input.outputs["Switch2"], 1: transform_1}
)

subtract_5 = nw.new_node(
Expand Down Expand Up @@ -948,7 +948,7 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
)

switch = nw.new_node(
Nodes.Switch, input_kwargs={1: group_input.outputs["Switch1"], 14: transform}
Nodes.Switch, input_kwargs={0: group_input.outputs["Switch1"], 1: transform}
)

subtract_6 = nw.new_node(
Expand Down Expand Up @@ -1022,7 +1022,7 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
)

switch_3 = nw.new_node(
Nodes.Switch, input_kwargs={1: group_input.outputs["Switch4"], 14: transform_3}
Nodes.Switch, input_kwargs={0: group_input.outputs["Switch4"], 1: transform_3}
)

combine_xyz_9 = nw.new_node(
Expand Down Expand Up @@ -1081,7 +1081,7 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
)

switch_4 = nw.new_node(
Nodes.Switch, input_kwargs={1: group_input.outputs["Switch5"], 14: transform_4}
Nodes.Switch, input_kwargs={0: group_input.outputs["Switch5"], 1: transform_4}
)

combine_xyz_10 = nw.new_node(
Expand Down Expand Up @@ -1142,19 +1142,19 @@ def nodegroup_hollow_cube(nw: NodeWrangler):
)

switch_5 = nw.new_node(
Nodes.Switch, input_kwargs={1: group_input.outputs["Switch6"], 14: transform_5}
Nodes.Switch, input_kwargs={0: group_input.outputs["Switch6"], 1: transform_5}
)

join_geometry = nw.new_node(
Nodes.JoinGeometry,
input_kwargs={
"Geometry": [
switch_2.outputs[6],
switch_1.outputs[6],
switch.outputs[6],
switch_3.outputs[6],
switch_4.outputs[6],
switch_5.outputs[6],
switch_2,
switch_1,
switch,
switch_3,
switch_4,
switch_5,
]
},
)
Expand Down
6 changes: 3 additions & 3 deletions infinigen/assets/objects/appliances/microwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def nodegroup_plate(nw: NodeWrangler):

group_input = nw.new_node(
Nodes.GroupInput,
expose_input=[("NodeSocketVectorXYZ", "Scale", (1.0000, 1.0000, 1.0000))],
expose_input=[("NodeSocketVector", "Scale", (1.0000, 1.0000, 1.0000))],
)

transform_1 = nw.new_node(
Expand All @@ -161,7 +161,7 @@ def nodegroup_text(nw: NodeWrangler):
group_input = nw.new_node(
Nodes.GroupInput,
expose_input=[
("NodeSocketVectorTranslation", "Translation", (1.5000, 0.0000, 0.0000)),
("NodeSocketVector", "Translation", (1.5000, 0.0000, 0.0000)),
("NodeSocketString", "String", "BrandName"),
("NodeSocketFloat", "Size", 0.0500),
("NodeSocketFloat", "Offset Scale", 0.0020),
Expand Down Expand Up @@ -324,7 +324,7 @@ def nodegroup_cube(nw: NodeWrangler):
group_input = nw.new_node(
Nodes.GroupInput,
expose_input=[
("NodeSocketVectorTranslation", "Size", (0.1000, 10.0000, 4.0000)),
("NodeSocketVector", "Size", (0.1000, 10.0000, 4.0000)),
("NodeSocketVector", "Pos", (0.0000, 0.0000, 0.0000)),
("NodeSocketInt", "Resolution", 10),
],
Expand Down
Loading

0 comments on commit 58f1ccc

Please sign in to comment.