diff --git a/infinigen/assets/fluid/fluid.py b/infinigen/assets/fluid/fluid.py index 6d9c8f748..cb7ff93c3 100644 --- a/infinigen/assets/fluid/fluid.py +++ b/infinigen/assets/fluid/fluid.py @@ -24,9 +24,8 @@ from infinigen.core.nodes.node_wrangler import ( Nodes, NodeWrangler, - infer_input_socket, - infer_output_socket, ) +from infinigen.core.nodes.utils import infer_input_socket, infer_output_socket from infinigen.core.util import blender as butil from infinigen.core.util.blender import deep_clone_obj from infinigen.core.util.logging import Timer diff --git a/infinigen/assets/fluid/liquid_particle_material.py b/infinigen/assets/fluid/liquid_particle_material.py index 4196256e2..ed7978306 100644 --- a/infinigen/assets/fluid/liquid_particle_material.py +++ b/infinigen/assets/fluid/liquid_particle_material.py @@ -17,12 +17,12 @@ def liquid_particle_material(nw: NodeWrangler): input_kwargs={ "Base Color": (1.0000, 1.0000, 1.0000, 1.0000), "Subsurface Color": (0.7147, 0.6062, 0.8000, 1.0000), - "Specular": 0.0886, + "Specular IOR Level": 0.0886, "Roughness": 0.2705 + (0.1 * normal()), "Sheen Tint": 0.0000, - "Clearcoat Roughness": 0.0000, + "Coat Roughness": 0.0000, "IOR": 1.2000, - "Transmission": 0.2818 + (0.1 * normal()), + "Transmission Weight": 0.2818 + (0.1 * normal()), }, attrs={"distribution": "MULTI_GGX"}, ) diff --git a/infinigen/assets/materials/bark_random.py b/infinigen/assets/materials/bark_random.py index f32850d27..6ce11d8c0 100644 --- a/infinigen/assets/materials/bark_random.py +++ b/infinigen/assets/materials/bark_random.py @@ -243,7 +243,7 @@ def nodegroup_primary_voronoi(nw): expose_input=[ ("NodeSocketVector", "Coordinate", (0.0, 0.0, 0.0)), ("NodeSocketFloat", "Texture Scale", 20.0), - ("NodeSocketFloatFactor", "Randomness", 1.0), + ("NodeSocketFloat", "Randomness", 1.0), ], ) @@ -401,7 +401,7 @@ def nodegroup_voronoi(nw): expose_input=[ ("NodeSocketVector", "Coordinate", (0.0, 0.0, 0.0)), ("NodeSocketFloat", "Texture Scale", 5.0), - ("NodeSocketFloatFactor", "Randomness", 1.0), + ("NodeSocketFloat", "Randomness", 1.0), ], ) @@ -525,7 +525,7 @@ def nodegroup_random_bark_geo(nw): ("NodeSocketFloat", "Noise Scale", 2.0), ("NodeSocketFloat", "Noise Amount", 1.0), ("NodeSocketFloat", "Texture Scale", 30.0), - ("NodeSocketFloatFactor", "Randomness", 1.0), + ("NodeSocketFloat", "Randomness", 1.0), ("NodeSocketFloat", "Value", 0.05), ("NodeSocketFloat", "Mix Weight", 0.1), ("NodeSocketFloat", "Scale", 15.0), @@ -814,7 +814,7 @@ def geo_bark_random(nw, base_color, geo_params, selection=None): geo_params["Primary Voronoi Scale"], ), ( - "NodeSocketFloatFactor", + "NodeSocketFloat", "Primary Voronoi Randomness", geo_params["Primary Voronoi Randomness"], ), diff --git a/infinigen/assets/materials/basic_bsdf.py b/infinigen/assets/materials/basic_bsdf.py index 9e8a4bdb0..4e851d918 100644 --- a/infinigen/assets/materials/basic_bsdf.py +++ b/infinigen/assets/materials/basic_bsdf.py @@ -22,7 +22,7 @@ def shader_basic_bsdf(nw): "Base Color": color, "Roughness": np.clip(normal(0.6, 0.3), 0.05, 0.95), "Metallic": uniform(0, 1) if uniform() < 0.3 else 0, - "Subsurface": 0 if uniform() < 0.8 else uniform(0, 0.2), + "Subsurface Weight": 0 if uniform() < 0.8 else uniform(0, 0.2), }, attrs={"subsurface_method": "BURLEY"}, ) diff --git a/infinigen/assets/materials/beverage_fridge_shaders.py b/infinigen/assets/materials/beverage_fridge_shaders.py index 571a224a8..d56966c67 100644 --- a/infinigen/assets/materials/beverage_fridge_shaders.py +++ b/infinigen/assets/materials/beverage_fridge_shaders.py @@ -70,10 +70,10 @@ def shader_white_metal_001(nw: NodeWrangler): "Base Color": colorramp.outputs["Color"], "Subsurface Color": (1.0000, 1.0000, 1.0000, 1.0000), "Metallic": 1.0000, - "Specular": 1.0000, + "Specular IOR Level": 1.0000, "Roughness": 0.1000, "Anisotropic": 0.9182, - "Sheen": 0.0455, + "Sheen Weight": 0.0455, "Sheen Tint": 0.4948, }, attrs={"subsurface_method": "BURLEY"}, diff --git a/infinigen/assets/materials/bird.py b/infinigen/assets/materials/bird.py index 643ebcf80..9b20d5c66 100644 --- a/infinigen/assets/materials/bird.py +++ b/infinigen/assets/materials/bird.py @@ -395,8 +395,8 @@ def shader_bird_body(nw: NodeWrangler, rand=True, kind="duck", **input_kwargs): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": group, - "Subsurface IOR": 0.0, - "Specular": 0.0, + "IOR": 0.0, + "Specular IOR Level": 0.0, "Roughness": 1.0, }, ) @@ -487,7 +487,11 @@ def shader_bird_feather( principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Base Color": (mix, "Result"), "Specular": 0.0, "Roughness": 1.0}, + input_kwargs={ + "Base Color": (mix, "Result"), + "Specular IOR Level": 0.0, + "Roughness": 1.0, + }, attrs={"subsurface_method": "BURLEY"}, ) @@ -605,7 +609,7 @@ def shader_bird_claw(nw: NodeWrangler, rand=True, **input_kwargs): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": (0.0091, 0.0091, 0.0091, 1.0), - "Specular": 0.0, + "Specular IOR Level": 0.0, "Roughness": 0.4409, }, ) diff --git a/infinigen/assets/materials/bumpy_rubber_floor.py b/infinigen/assets/materials/bumpy_rubber_floor.py index f3b488a81..d86dc7741 100644 --- a/infinigen/assets/materials/bumpy_rubber_floor.py +++ b/infinigen/assets/materials/bumpy_rubber_floor.py @@ -24,7 +24,7 @@ def nodegroup_node_group(nw: NodeWrangler): ("NodeSocketColor", "Base Color", (0.8000, 0.8000, 0.8000, 1.0000)), ("NodeSocketFloat", "Scale", 1.0000), ("NodeSocketFloat", "Seed", 0.0000), - ("NodeSocketFloatFactor", "Roughness", 0.4000), + ("NodeSocketFloat", "Roughness", 0.4000), ], ) @@ -71,7 +71,7 @@ def nodegroup_node_group(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": hue_saturation_value, - "Specular": 0.9, + "Specular IOR Level": 0.9, "Roughness": group_input.outputs["Roughness"], }, ) diff --git a/infinigen/assets/materials/ceramic.py b/infinigen/assets/materials/ceramic.py index 7341271c3..9cb8a278f 100644 --- a/infinigen/assets/materials/ceramic.py +++ b/infinigen/assets/materials/ceramic.py @@ -30,11 +30,11 @@ def shader_ceramic( Nodes.PrincipledBSDF, input_kwargs={ "Roughness": roughness, - "Clearcoat": 1, - "Clearcoat Roughness": clearcoat_roughness, - "Specular": 1, + "Coat Weight": 1, + "Coat Roughness": clearcoat_roughness, + "Specular IOR Level": 1, "Base Color": color, - "Subsurface": uniform(0.02, 0.05), + "Subsurface Weight": uniform(0.02, 0.05), "Subsurface Radius": (0.02, 0.02, 0.02), }, ) diff --git a/infinigen/assets/materials/cobble_stone.py b/infinigen/assets/materials/cobble_stone.py index 0971462d4..f6ff056e3 100644 --- a/infinigen/assets/materials/cobble_stone.py +++ b/infinigen/assets/materials/cobble_stone.py @@ -102,10 +102,6 @@ def geo_cobblestone(nw: NodeWrangler, selection=None, random_seed=0, geometry=Tr # depth of stone dep_sto = nw.new_value(U(0.02, 0.04), "dep_sto") - group_input = nw.new_node( - Nodes.GroupInput, expose_input=[("NodeSocketGeometry", "Geometry", None)] - ) - noise_texture = nw.new_node( Nodes.NoiseTexture, input_kwargs={ @@ -196,6 +192,10 @@ def geo_cobblestone(nw: NodeWrangler, selection=None, random_seed=0, geometry=Tr if not geometry: return colorramp + group_input = nw.new_node( + Nodes.GroupInput, expose_input=[("NodeSocketGeometry", "Geometry", None)] + ) + multiply_1 = nw.new_node( Nodes.VectorMath, input_kwargs={0: colorramp.outputs["Color"], 1: normal}, diff --git a/infinigen/assets/materials/cracked_ground.py b/infinigen/assets/materials/cracked_ground.py index a9a2d9762..cca06fe00 100644 --- a/infinigen/assets/materials/cracked_ground.py +++ b/infinigen/assets/materials/cracked_ground.py @@ -134,7 +134,11 @@ def shader_cracked_ground(nw: NodeWrangler, random_seed=0): principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Base Color": mix_2, "Specular": 0.2000, "Roughness": 0.9000}, + input_kwargs={ + "Base Color": mix_2, + "Specular IOR Level": 0.2000, + "Roughness": 0.9000, + }, ) material_output = nw.new_node( diff --git a/infinigen/assets/materials/dishwasher_shaders.py b/infinigen/assets/materials/dishwasher_shaders.py index e70ab1e1a..f06540b63 100644 --- a/infinigen/assets/materials/dishwasher_shaders.py +++ b/infinigen/assets/materials/dishwasher_shaders.py @@ -149,10 +149,10 @@ def shader_white_metal_002(nw: NodeWrangler): "Base Color": colorramp.outputs["Color"], "Subsurface Color": (1.0000, 1.0000, 1.0000, 1.0000), "Metallic": 1.0000, - "Specular": 1.0000, + "Specular IOR Level": 1.0000, "Roughness": 0.1000, "Anisotropic": 0.9182, - "Sheen": 0.0455, + "Sheen Weight": 0.0455, "Sheen Tint": 0.4948, }, attrs={"subsurface_method": "BURLEY"}, diff --git a/infinigen/assets/materials/fabrics/coarse_knit_fabric.py b/infinigen/assets/materials/fabrics/coarse_knit_fabric.py index ebb9dda0c..24449bffa 100644 --- a/infinigen/assets/materials/fabrics/coarse_knit_fabric.py +++ b/infinigen/assets/materials/fabrics/coarse_knit_fabric.py @@ -148,7 +148,11 @@ def shader_fabric_base( principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Base Color": reroute, "Specular": 0.6309, "Roughness": 0.9945}, + input_kwargs={ + "Base Color": reroute, + "Specular IOR Level": 0.6309, + "Roughness": 0.9945, + }, ) combine_color = nw.new_node( @@ -160,7 +164,7 @@ def shader_fabric_base( Nodes.PrincipledBSDF, input_kwargs={ "Base Color": combine_color, - "Specular": 0.6309, + "Specular IOR Level": 0.6309, "Roughness": 0.9945, }, ) diff --git a/infinigen/assets/materials/fabrics/general_fabric.py b/infinigen/assets/materials/fabrics/general_fabric.py index 89299619c..d8ac97a23 100644 --- a/infinigen/assets/materials/fabrics/general_fabric.py +++ b/infinigen/assets/materials/fabrics/general_fabric.py @@ -153,7 +153,7 @@ def func_fabric(nw: NodeWrangler, **kwargs): input_kwargs={ "Base Color": mix_3.outputs[2], "Roughness": map_range_2.outputs["Result"], - "Sheen": 1.0000, + "Sheen Weight": 1.0000, "Sheen Tint": 1.0000, }, ) diff --git a/infinigen/assets/materials/fabrics/sofa_fabric.py b/infinigen/assets/materials/fabrics/sofa_fabric.py index 4d77ffdf2..b4397b467 100644 --- a/infinigen/assets/materials/fabrics/sofa_fabric.py +++ b/infinigen/assets/materials/fabrics/sofa_fabric.py @@ -46,7 +46,7 @@ def shader_sofa_fabric(nw: NodeWrangler, scale=1, **kwargs): input_kwargs={ "Base Color": brick_texture.outputs["Color"], "Roughness": 0.8624, - "Sheen": 1.0000, + "Sheen Weight": 1.0000, }, ) diff --git a/infinigen/assets/materials/fabrics/velvet.py b/infinigen/assets/materials/fabrics/velvet.py index eed291ecd..22bf81978 100644 --- a/infinigen/assets/materials/fabrics/velvet.py +++ b/infinigen/assets/materials/fabrics/velvet.py @@ -84,12 +84,11 @@ def shader_velvet(nw: NodeWrangler, **kwargs): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": mix_2.outputs[2], - "Specular": 0.0000, + "Specular IOR Level": 0.0000, "Roughness": uniform(0.4, 0.9), "Anisotropic": 0.7614, "Anisotropic Rotation": 1.0000, - "Sheen": 16.2273, - "Sheen Tint": 1.0000, + "Sheen Weight": 16.2273, }, ) diff --git a/infinigen/assets/materials/fish_eye_shader.py b/infinigen/assets/materials/fish_eye_shader.py index 190865169..48c0b8e6d 100644 --- a/infinigen/assets/materials/fish_eye_shader.py +++ b/infinigen/assets/materials/fish_eye_shader.py @@ -403,7 +403,11 @@ def shader_eyeball_fish(nw: NodeWrangler): principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Base Color": mix_8, "Specular": 0.0000, "Roughness": 0.0000}, + input_kwargs={ + "Base Color": mix_8, + "Specular IOR Level": 0.0000, + "Roughness": 0.0000, + }, ) glossy_bsdf = nw.new_node("ShaderNodeBsdfGlossy") diff --git a/infinigen/assets/materials/fishbody.py b/infinigen/assets/materials/fishbody.py index 776560e3e..e5dfe6098 100644 --- a/infinigen/assets/materials/fishbody.py +++ b/infinigen/assets/materials/fishbody.py @@ -902,7 +902,7 @@ def shader_fish_body_regular(nw: NodeWrangler, rand=True, **input_kwargs): "Subsurface Radius": (0.36, 0.46, 0.6), "Subsurface Color": (1.0, 0.9405, 0.7747, 1.0), "Metallic": 0.8, - "Specular": 0.9, + "Specular IOR Level": 0.9, "Roughness": 0.3, "IOR": 1.69, }, @@ -1099,7 +1099,7 @@ def shader_fish_body_gold(nw: NodeWrangler, rand=True, **input_kwargs): "Subsurface Radius": (0.36, 0.46, 0.6), "Subsurface Color": (1.0, 0.9405, 0.7747, 1.0), "Metallic": 0.5, - "Specular": 0.5273, + "Specular IOR Level": 0.5273, "Roughness": 0.1, "IOR": 1.69, }, diff --git a/infinigen/assets/materials/glass_volume.py b/infinigen/assets/materials/glass_volume.py index 884458ae4..d03a3b00a 100644 --- a/infinigen/assets/materials/glass_volume.py +++ b/infinigen/assets/materials/glass_volume.py @@ -20,7 +20,8 @@ def shader_glass_volume(nw: NodeWrangler, color=None, density=100.0, **kwargs): color = hsv2rgba(uniform(0, 1), uniform(0.5, 0.9), uniform(0.6, 0.9)) principled_bsdf = nw.new_node( - Nodes.PrincipledBSDF, input_kwargs={"Roughness": 0.0000, "Transmission": 1.0000} + Nodes.PrincipledBSDF, + input_kwargs={"Roughness": 0.0000, "Transmission Weight": 1.0000}, ) volume_absorption = nw.new_node( diff --git a/infinigen/assets/materials/ice.py b/infinigen/assets/materials/ice.py index e6c1df207..ce12b8102 100644 --- a/infinigen/assets/materials/ice.py +++ b/infinigen/assets/materials/ice.py @@ -46,7 +46,7 @@ def shader_ice(nw: NodeWrangler): principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, input_kwargs={ - "Subsurface": 1.0000, + "Subsurface Weight": 1.0000, "Subsurface Radius": (0.0010, 0.0010, 0.0020), "Subsurface Color": tuple(col_ice), "Roughness": color_ramp.outputs["Color"], diff --git a/infinigen/assets/materials/lamp_shaders.py b/infinigen/assets/materials/lamp_shaders.py index 25b68de8f..22f389736 100644 --- a/infinigen/assets/materials/lamp_shaders.py +++ b/infinigen/assets/materials/lamp_shaders.py @@ -50,12 +50,11 @@ def shader_lampshade(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": mix.outputs[2], - "Subsurface": U(0.03, 0.08), + "Subsurface Weight": U(0.03, 0.08), "Subsurface Radius": (0.1000, 0.1000, 0.1000), - "Subsurface IOR": 1.6029, "Roughness": U(0.5, 0.8), "IOR": 4.0000, - "Transmission": U(0.05, 0.2), + "Transmission Weight": U(0.05, 0.2), "Transmission Roughness": 1.0000, }, ) diff --git a/infinigen/assets/materials/lava.py b/infinigen/assets/materials/lava.py index a501b87e5..293011c95 100644 --- a/infinigen/assets/materials/lava.py +++ b/infinigen/assets/materials/lava.py @@ -218,7 +218,9 @@ def lava_shader(nw): ) noise_emission = nw.new_node( - Nodes.NoiseTexture, input_kwargs={"W": uniform(0, 10), "Scale": 0.5} + Nodes.NoiseTexture, + input_kwargs={"W": uniform(0, 10), "Scale": 0.5}, + attrs={"noise_dimensions": "4D"}, ) strength_emission = nw.new_node( @@ -282,10 +284,6 @@ def lava_geo(nw, selection=None, random_seed=0, geometry=True): dir_x = nw.new_value(dir_x, "dir_x") # print(f"{wave_sca=} {dir_x=} {dir_y=}") - group_input = nw.new_node( - Nodes.GroupInput, expose_input=[("NodeSocketGeometry", "Geometry", None)] - ) - noise_texture_1 = nw.new_node( Nodes.NoiseTexture, attrs={"noise_dimensions": "4D"}, diff --git a/infinigen/assets/materials/metal/brushed_metal.py b/infinigen/assets/materials/metal/brushed_metal.py index 3ae66bc9d..ae19dfe63 100644 --- a/infinigen/assets/materials/metal/brushed_metal.py +++ b/infinigen/assets/materials/metal/brushed_metal.py @@ -128,7 +128,7 @@ def nodegroup_brushed_metal(nw: NodeWrangler): input_kwargs={ "Base Color": hue_saturation_value, "Metallic": 1.0000, - "Specular": 0.0000, + "Specular IOR Level": 0.0000, "Roughness": map_range_1.outputs["Result"], }, ) diff --git a/infinigen/assets/materials/metal/galvanized_metal.py b/infinigen/assets/materials/metal/galvanized_metal.py index ffcdb5744..68debfd48 100644 --- a/infinigen/assets/materials/metal/galvanized_metal.py +++ b/infinigen/assets/materials/metal/galvanized_metal.py @@ -83,7 +83,7 @@ def nodegroup_galvanized_metal(nw: NodeWrangler): input_kwargs={ "Base Color": group_input.outputs["Base Color"], "Metallic": 1.0000, - "Specular": 0.0000, + "Specular IOR Level": 0.0000, "Roughness": map_range.outputs["Result"], }, ) diff --git a/infinigen/assets/materials/metal/grained_and_polished_metal.py b/infinigen/assets/materials/metal/grained_and_polished_metal.py index 73e0dea0f..b81c58f18 100644 --- a/infinigen/assets/materials/metal/grained_and_polished_metal.py +++ b/infinigen/assets/materials/metal/grained_and_polished_metal.py @@ -36,7 +36,7 @@ def nodegroup_grained_metal(nw: NodeWrangler): input_kwargs={ "Base Color": group_input.outputs["Base Color"], "Metallic": 1.0000, - "Specular": 0.0000, + "Specular IOR Level": 0.0000, "Roughness": map_range.outputs["Result"], }, ) diff --git a/infinigen/assets/materials/metal/hammered_metal.py b/infinigen/assets/materials/metal/hammered_metal.py index e7e329e54..bf808caba 100644 --- a/infinigen/assets/materials/metal/hammered_metal.py +++ b/infinigen/assets/materials/metal/hammered_metal.py @@ -32,7 +32,7 @@ def nodegroup_hammered_metal(nw: NodeWrangler): input_kwargs={ "Base Color": group_input.outputs["Base Color"], "Metallic": 1.0000, - "Specular": 0.0000, + "Specular IOR Level": 0.0000, "Roughness": 0.1000, }, ) diff --git a/infinigen/assets/materials/metal/metal_basic.py b/infinigen/assets/materials/metal/metal_basic.py index 6f938baa3..615e6c1be 100644 --- a/infinigen/assets/materials/metal/metal_basic.py +++ b/infinigen/assets/materials/metal/metal_basic.py @@ -21,7 +21,7 @@ def shader_metal(nw: NodeWrangler, color=None, **kwargs): Nodes.PrincipledBSDF, input_kwargs={ "Metallic": 1.0, - "Specular": uniform(0.5, 1.0), + "Specular IOR Level": uniform(0.5, 1.0), "Base Color": color, "Roughness": roughness, }, diff --git a/infinigen/assets/materials/mud.py b/infinigen/assets/materials/mud.py index f757c3974..ab9874c40 100644 --- a/infinigen/assets/materials/mud.py +++ b/infinigen/assets/materials/mud.py @@ -100,7 +100,7 @@ def shader_mud(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": colorramp_3.outputs["Color"], - "Specular": colorramp_6.outputs["Color"], + "Specular IOR Level": colorramp_6.outputs["Color"], "Roughness": mix_3, }, ) diff --git a/infinigen/assets/materials/new_whitewater.py b/infinigen/assets/materials/new_whitewater.py index 7f0986413..0b2056c99 100644 --- a/infinigen/assets/materials/new_whitewater.py +++ b/infinigen/assets/materials/new_whitewater.py @@ -20,12 +20,11 @@ def new_whitewater(nw: NodeWrangler): "Subsurface Color": random_color_neighbour( (0.7147, 0.6062, 0.8000, 1.0000), 0.05, 0.05, 0.05 ), - "Specular": 0.0886 + 0.01 * normal(), + "Specular IOR Level": 0.0886 + 0.01 * normal(), "Roughness": 0.1500, - "Sheen Tint": 0.0000, - "Clearcoat Roughness": 0.0000, + "Coat Roughness": 0.0000, "IOR": 1.1000, - "Transmission": 0.5000, + "Transmission Weight": 0.5000, }, attrs={"distribution": "MULTI_GGX"}, ) diff --git a/infinigen/assets/materials/reptile_two_color_attr.py b/infinigen/assets/materials/reptile_two_color_attr.py index 833665e7b..09089cc35 100644 --- a/infinigen/assets/materials/reptile_two_color_attr.py +++ b/infinigen/assets/materials/reptile_two_color_attr.py @@ -163,7 +163,7 @@ def shader_two_color(nw: NodeWrangler, rand=True, **input_kwargs): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": mix_1, - "Specular": 0.0, + "Specular IOR Level": 0.0, "Roughness": colorramp_2.outputs["Color"], }, ) diff --git a/infinigen/assets/materials/river_water.py b/infinigen/assets/materials/river_water.py index a7e88e773..27a24afa4 100644 --- a/infinigen/assets/materials/river_water.py +++ b/infinigen/assets/materials/river_water.py @@ -25,7 +25,11 @@ def shader_river_water(nw: NodeWrangler): principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Roughness": 0.0000, "IOR": 1.3300, "Transmission": 1.0000}, + input_kwargs={ + "Roughness": 0.0000, + "IOR": 1.3300, + "Transmission Weight": 1.0000, + }, ) mix_shader = nw.new_node( diff --git a/infinigen/assets/materials/sandstone.py b/infinigen/assets/materials/sandstone.py index 886c698c6..fbe19650d 100644 --- a/infinigen/assets/materials/sandstone.py +++ b/infinigen/assets/materials/sandstone.py @@ -391,7 +391,7 @@ def shader(nw: NodeWrangler, color=("palette", "sandstone")): input_kwargs={ "Base Color": colorramp_1.outputs["Color"], "Roughness": 0.9, - "Specular": 0.1, + "Specular IOR Level": 0.1, }, ) diff --git a/infinigen/assets/materials/scale.py b/infinigen/assets/materials/scale.py index bb3caf349..826fa259a 100644 --- a/infinigen/assets/materials/scale.py +++ b/infinigen/assets/materials/scale.py @@ -134,7 +134,7 @@ def shader_scale(nw, rand=True, **input_kwargs): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": colormap, - "Subsurface": 0.2, + "Subsurface Weight": 0.2, "Subsurface Radius": (0.36, 0.46, 0.6), "Subsurface Color": (1.0, 0.9405, 0.7747, 1.0), "Metallic": 0.8, diff --git a/infinigen/assets/materials/slimy.py b/infinigen/assets/materials/slimy.py index 04fe95196..1b7bbff42 100644 --- a/infinigen/assets/materials/slimy.py +++ b/infinigen/assets/materials/slimy.py @@ -73,9 +73,9 @@ def shader_slimy(nw, rand=False, **input_kwargs): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": (0.6605, 0.0279, 0.0359, 1.0), - "Subsurface": 0.2, + "Subsurface Weight": 0.2, "Subsurface Color": (0.4621, 0.0213, 0.0265, 1.0), - "Specular": 0.8591, + "Specular IOR Level": 0.8591, "Roughness": mix_1, }, ) diff --git a/infinigen/assets/materials/snake_plant.py b/infinigen/assets/materials/snake_plant.py index 666c19fcf..cd7417088 100644 --- a/infinigen/assets/materials/snake_plant.py +++ b/infinigen/assets/materials/snake_plant.py @@ -140,7 +140,7 @@ def shader_snake_plant(nw: NodeWrangler): input_kwargs={ "Base Color": mix, "Roughness": U(8.0, 15.0), - "Clearcoat Roughness": 0.0, + "Coat Roughness": 0.0, }, ) diff --git a/infinigen/assets/materials/snake_scale.py b/infinigen/assets/materials/snake_scale.py index 329e6b8e7..451994118 100644 --- a/infinigen/assets/materials/snake_scale.py +++ b/infinigen/assets/materials/snake_scale.py @@ -168,9 +168,9 @@ def nodegroup_scale(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Radius", 0.040000000000000001), + ("NodeSocketFloat", "Radius", 0.040000000000000001), ("NodeSocketFloat", "thickness", 0.10000000000000001), - ("NodeSocketVectorEuler", "Rotation", (0.0, -0.17449999999999999, 0.0)), + ("NodeSocketVector", "Rotation", (0.0, -0.17449999999999999, 0.0)), ], ) diff --git a/infinigen/assets/materials/snake_shaders.py b/infinigen/assets/materials/snake_shaders.py index f95689a81..b05ee7180 100644 --- a/infinigen/assets/materials/snake_shaders.py +++ b/infinigen/assets/materials/snake_shaders.py @@ -77,7 +77,7 @@ def shader_black_white_snake(nw: NodeWrangler, rand=True): input_kwargs={ "Base Color": colorramp.outputs["Color"], "Metallic": 0.6, - "Specular": 0.2, + "Specular IOR Level": 0.2, "Roughness": 0.4, }, attrs={"subsurface_method": "BURLEY"}, @@ -124,7 +124,7 @@ def shader_brown(nw: NodeWrangler, rand=False): input_kwargs={ "Base Color": colorramp_2.outputs["Color"], "Metallic": 0.4, - "Specular": 0.3, + "Specular IOR Level": 0.3, "Roughness": 1, }, attrs={"subsurface_method": "BURLEY"}, @@ -289,7 +289,7 @@ def shader_golden(nw: NodeWrangler, rand=False): input_kwargs={ "Base Color": colorramp.outputs["Color"], "Metallic": 0.4, - "Specular": 0.2, + "Specular IOR Level": 0.2, "Roughness": 0.4, }, attrs={"subsurface_method": "BURLEY"}, diff --git a/infinigen/assets/materials/soil.py b/infinigen/assets/materials/soil.py index d0a5d9503..5e4a083ea 100644 --- a/infinigen/assets/materials/soil.py +++ b/infinigen/assets/materials/soil.py @@ -208,7 +208,7 @@ def shader_soil(nw, random_seed=0): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": mix, - "Specular": 0.2, + "Specular IOR Level": 0.2, "Roughness": colorramp_2.outputs["Color"], }, ) diff --git a/infinigen/assets/materials/spider_plant.py b/infinigen/assets/materials/spider_plant.py index 239e87f47..d38b4dc3b 100644 --- a/infinigen/assets/materials/spider_plant.py +++ b/infinigen/assets/materials/spider_plant.py @@ -20,7 +20,7 @@ def shader_spider_plant(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": main_color, - "Subsurface IOR": 1.01, + "IOR": 1.01, "Roughness": 2.0, }, ) diff --git a/infinigen/assets/materials/spot_sparse_attr.py b/infinigen/assets/materials/spot_sparse_attr.py index 7ae76b972..ff7880986 100644 --- a/infinigen/assets/materials/spot_sparse_attr.py +++ b/infinigen/assets/materials/spot_sparse_attr.py @@ -69,7 +69,7 @@ def getcolor(): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": mix, - "Specular": 0.0, + "Specular IOR Level": 0.0, "Roughness": colorramp.outputs["Color"], }, ) diff --git a/infinigen/assets/materials/stone_and_concrete/concrete.py b/infinigen/assets/materials/stone_and_concrete/concrete.py index cae4f3c0b..89e1c7f32 100644 --- a/infinigen/assets/materials/stone_and_concrete/concrete.py +++ b/infinigen/assets/materials/stone_and_concrete/concrete.py @@ -23,7 +23,7 @@ def nodegroup_crack(nw: NodeWrangler): ("NodeSocketFloat", "Seed", 0.0000), ("NodeSocketFloat", "Amount", 1.0000), ("NodeSocketFloat", "Scale", 0.0000), - ("NodeSocketFloatFactor", "Snake Crack", 0.3000), + ("NodeSocketFloat", "Snake Crack", 0.3000), ], ) @@ -189,7 +189,7 @@ def nodegroup_concrete(nw: NodeWrangler): ("NodeSocketFloat", "Roughness", 0.0000), ("NodeSocketFloat", "Crack Amount", 0.0000), ("NodeSocketFloat", "Crack Scale", 0.0000), - ("NodeSocketFloatFactor", "Snake Crack", 0.3000), + ("NodeSocketFloat", "Snake Crack", 0.3000), ], ) diff --git a/infinigen/assets/materials/succulent.py b/infinigen/assets/materials/succulent.py index fd586ccda..7892a6fea 100644 --- a/infinigen/assets/materials/succulent.py +++ b/infinigen/assets/materials/succulent.py @@ -71,14 +71,12 @@ def shader_green_transition_succulent(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": colorramp_1.outputs["Color"], - "Subsurface": uniform(0.01, 0.03), + "Subsurface Weight": uniform(0.01, 0.03), "Subsurface Radius": (0.01, 0.1, 0.1), "Subsurface Color": colorramp_1.outputs["Color"], - "Subsurface IOR": 0.0, - "Specular": 0.0, + "Specular IOR Level": 0.0, "Roughness": 2.0, - "Sheen Tint": 0.0, - "Clearcoat Roughness": 0.0, + "Coat Roughness": 0.0, "IOR": 1.3, "Emission Strength": 0.0, }, @@ -153,14 +151,13 @@ def shader_pink_transition_succulent(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": colorramp_1.outputs["Color"], - "Subsurface": uniform(0.01, 0.05), + "Subsurface Weight": uniform(0.01, 0.05), "Subsurface Radius": (0.01, 0.03, 0.03), "Subsurface Color": colorramp_1.outputs["Color"], - "Subsurface IOR": 0.0, - "Specular": 0.0, + "Specular IOR Level": 0.0, "Roughness": 2.0, "Sheen Tint": 0.0, - "Clearcoat Roughness": 0.0, + "Coat Roughness": 0.0, "IOR": 1.3, "Emission Strength": 0.0, }, @@ -231,14 +228,13 @@ def shader_green_succulent(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": colorramp_1.outputs["Color"], - "Subsurface": uniform(0.01, 0.05), + "Subsurface Weight": uniform(0.01, 0.05), "Subsurface Radius": (0.1, 0.1, 0.1), "Subsurface Color": colorramp_1.outputs["Color"], - "Subsurface IOR": 0.0, - "Specular": 0.0, + "Specular IOR Level": 0.0, "Roughness": 2.0, "Sheen Tint": 0.0, - "Clearcoat Roughness": 0.0, + "Coat Roughness": 0.0, "IOR": 1.3, "Emission Strength": 0.0, }, @@ -312,14 +308,13 @@ def shader_yellow_succulent(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": colorramp_1.outputs["Color"], - "Subsurface": 0.01, + "Subsurface Weight": 0.01, "Subsurface Radius": (1.0, 1.0, 1.0), "Subsurface Color": colorramp_1.outputs["Alpha"], - "Subsurface IOR": 1.3, - "Specular": 0.0, + "Specular IOR Level": 0.0, "Roughness": 2.0, "Sheen Tint": 0.0, - "Clearcoat Roughness": 0.0, + "Coat Roughness": 0.0, "IOR": 1.3, "Emission Strength": 0.0, }, @@ -406,14 +401,13 @@ def shader_whitish_green_succulent(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": colorramp.outputs["Color"], - "Subsurface": 0.01, + "Subsurface Weight": 0.01, "Subsurface Radius": (1.0, 1.0, 1.0), "Subsurface Color": colorramp.outputs["Color"], - "Subsurface IOR": 1.3, - "Specular": 0.0, + "Specular IOR Level": 0.0, "Roughness": 2.0, "Sheen Tint": 0.0, - "Clearcoat Roughness": 0.0, + "Coat Roughness": 0.0, "IOR": 1.3, "Emission Strength": 0.0, }, diff --git a/infinigen/assets/materials/table_marble.py b/infinigen/assets/materials/table_marble.py index 1023d92fb..78c463495 100644 --- a/infinigen/assets/materials/table_marble.py +++ b/infinigen/assets/materials/table_marble.py @@ -138,7 +138,7 @@ def shader_marble(nw: NodeWrangler, **kwargs): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": mix_1.outputs[2], - "Specular": 0.6000, + "Specular IOR Level": 0.6000, "Roughness": 0.1000, "Normal": bump, }, diff --git a/infinigen/assets/materials/table_materials.py b/infinigen/assets/materials/table_materials.py index 348a04299..48dbef091 100644 --- a/infinigen/assets/materials/table_materials.py +++ b/infinigen/assets/materials/table_materials.py @@ -142,7 +142,7 @@ def shader_marble(nw: NodeWrangler, **kwargs): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": mix_1.outputs[2], - "Specular": 0.6000, + "Specular IOR Level": 0.6000, "Roughness": 0.1000, "Normal": bump, }, diff --git a/infinigen/assets/materials/text.py b/infinigen/assets/materials/text.py index 6fb62336c..d6f03aa53 100644 --- a/infinigen/assets/materials/text.py +++ b/infinigen/assets/materials/text.py @@ -433,7 +433,7 @@ def shader_text(nw: NodeWrangler, **kwargs): "Base Color": color, "Roughness": roughness, "Metallic": uniform(0, 0.5), - "Specular": uniform(0, 0.2), + "Specular IOR Level": uniform(0, 0.2), "Emission": emission, "Emission Strength": self.emission, }, diff --git a/infinigen/assets/materials/tiger_attr.py b/infinigen/assets/materials/tiger_attr.py index e3567b128..87d18f874 100644 --- a/infinigen/assets/materials/tiger_attr.py +++ b/infinigen/assets/materials/tiger_attr.py @@ -210,7 +210,7 @@ def shader_tiger_attr(nw: NodeWrangler): principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Base Color": mix_5, "Specular": 0.0}, + input_kwargs={"Base Color": mix_5, "Specular IOR Level": 0.0}, attrs={"subsurface_method": "BURLEY"}, ) diff --git a/infinigen/assets/materials/tiles/advanced_tiles.py b/infinigen/assets/materials/tiles/advanced_tiles.py index 8f7a8cebb..486a6ab20 100644 --- a/infinigen/assets/materials/tiles/advanced_tiles.py +++ b/infinigen/assets/materials/tiles/advanced_tiles.py @@ -200,7 +200,7 @@ def get_connected_links(nw, input_socket): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": seam_color, - "Specular": 0.0000, + "Specular IOR Level": 0.0000, "Roughness": 0.9000, }, ) diff --git a/infinigen/assets/materials/tiles/basket_weave.py b/infinigen/assets/materials/tiles/basket_weave.py index bd63dce0d..b8fca80e5 100644 --- a/infinigen/assets/materials/tiles/basket_weave.py +++ b/infinigen/assets/materials/tiles/basket_weave.py @@ -23,8 +23,8 @@ def nodegroup_basket_weave(nw: NodeWrangler): ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "Subtiles Number", 1.0000), ("NodeSocketFloat", "Aspect Ratio", 5.0000), - ("NodeSocketFloatFactor", "border", 0.1000), - ("NodeSocketFloatFactor", "Flatness", 0.9000), + ("NodeSocketFloat", "border", 0.1000), + ("NodeSocketFloat", "Flatness", 0.9000), ], ) diff --git a/infinigen/assets/materials/tiles/brick.py b/infinigen/assets/materials/tiles/brick.py index 7418a5cb6..b27ff2673 100644 --- a/infinigen/assets/materials/tiles/brick.py +++ b/infinigen/assets/materials/tiles/brick.py @@ -106,8 +106,8 @@ def nodegroup_birck(nw: NodeWrangler): ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "Subtiles Number", 1.0000), ("NodeSocketFloat", "Aspect Ratio", 5.0000), - ("NodeSocketFloatFactor", "border", 0.1000), - ("NodeSocketFloatFactor", "Flatness", 0.9000), + ("NodeSocketFloat", "border", 0.1000), + ("NodeSocketFloat", "Flatness", 0.9000), ], ) diff --git a/infinigen/assets/materials/tiles/cheveron.py b/infinigen/assets/materials/tiles/cheveron.py index e7994bc15..c4f612873 100644 --- a/infinigen/assets/materials/tiles/cheveron.py +++ b/infinigen/assets/materials/tiles/cheveron.py @@ -21,8 +21,8 @@ def nodegroup_cheveron(nw: NodeWrangler): ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "Subtiles Number", 1.0000), ("NodeSocketFloat", "Aspect Ratio", 5.0000), - ("NodeSocketFloatFactor", "border", 0.1000), - ("NodeSocketFloatFactor", "Flatness", 0.9000), + ("NodeSocketFloat", "border", 0.1000), + ("NodeSocketFloat", "Flatness", 0.9000), ], ) diff --git a/infinigen/assets/materials/tiles/diamond.py b/infinigen/assets/materials/tiles/diamond.py index f6c6061e8..1343778b2 100644 --- a/infinigen/assets/materials/tiles/diamond.py +++ b/infinigen/assets/materials/tiles/diamond.py @@ -201,8 +201,8 @@ def nodegroup_diamond(nw: NodeWrangler): ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "Subtiles Number", 1.0000), ("NodeSocketFloat", "Aspect Ratio", 5.0000), - ("NodeSocketFloatFactor", "border", 0.1000), - ("NodeSocketFloatFactor", "Flatness", 0.9000), + ("NodeSocketFloat", "border", 0.1000), + ("NodeSocketFloat", "Flatness", 0.9000), ], ) diff --git a/infinigen/assets/materials/tiles/herringbone.py b/infinigen/assets/materials/tiles/herringbone.py index e4a0ae164..7a2cd8217 100644 --- a/infinigen/assets/materials/tiles/herringbone.py +++ b/infinigen/assets/materials/tiles/herringbone.py @@ -69,8 +69,8 @@ def nodegroup_herringbone(nw: NodeWrangler): ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "Subtiles Number", 1.0000), ("NodeSocketFloat", "Aspect Ratio", 5.0000), - ("NodeSocketFloatFactor", "border", 0.1000), - ("NodeSocketFloatFactor", "Flatness", 0.9000), + ("NodeSocketFloat", "border", 0.1000), + ("NodeSocketFloat", "Flatness", 0.9000), ], ) diff --git a/infinigen/assets/materials/tiles/hexagon.py b/infinigen/assets/materials/tiles/hexagon.py index 8eb586627..6ad8e3d9e 100644 --- a/infinigen/assets/materials/tiles/hexagon.py +++ b/infinigen/assets/materials/tiles/hexagon.py @@ -222,8 +222,8 @@ def nodegroup_hexagon(nw: NodeWrangler): ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "Subtiles Number", 1.0000), ("NodeSocketFloat", "Aspect Ratio", 5.0000), - ("NodeSocketFloatFactor", "border", 0.1000), - ("NodeSocketFloatFactor", "Flatness", 0.9000), + ("NodeSocketFloat", "border", 0.1000), + ("NodeSocketFloat", "Flatness", 0.9000), ], ) diff --git a/infinigen/assets/materials/tiles/shell.py b/infinigen/assets/materials/tiles/shell.py index 03fb45f46..a7b416006 100644 --- a/infinigen/assets/materials/tiles/shell.py +++ b/infinigen/assets/materials/tiles/shell.py @@ -20,8 +20,8 @@ def nodegroup_half_shell(nw: NodeWrangler): expose_input=[ ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "Radius", 0.0000), - ("NodeSocketFloatFactor", "Edge", 0.0000), - ("NodeSocketFloatFactor", "3D-ness", 0.8333), + ("NodeSocketFloat", "Edge", 0.0000), + ("NodeSocketFloat", "3D-ness", 0.8333), ], ) @@ -260,8 +260,8 @@ def nodegroup_shell(nw: NodeWrangler): ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "Subtiles Number", 1.0000), ("NodeSocketFloat", "Aspect Ratio", 5.0000), - ("NodeSocketFloatFactor", "border", 0.1000), - ("NodeSocketFloatFactor", "Flatness", 0.9000), + ("NodeSocketFloat", "border", 0.1000), + ("NodeSocketFloat", "Flatness", 0.9000), ], ) diff --git a/infinigen/assets/materials/tiles/spanish_bound.py b/infinigen/assets/materials/tiles/spanish_bound.py index 921c987ff..3f9fac4f7 100644 --- a/infinigen/assets/materials/tiles/spanish_bound.py +++ b/infinigen/assets/materials/tiles/spanish_bound.py @@ -23,8 +23,8 @@ def nodegroup_spanish_bond(nw: NodeWrangler): ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "Subtiles Number", 1.0000), ("NodeSocketFloat", "Aspect Ratio", 5.0000), - ("NodeSocketFloatFactor", "border", 0.1000), - ("NodeSocketFloatFactor", "Flatness", 0.9000), + ("NodeSocketFloat", "border", 0.1000), + ("NodeSocketFloat", "Flatness", 0.9000), ], ) diff --git a/infinigen/assets/materials/tiles/star.py b/infinigen/assets/materials/tiles/star.py index 2303f11bf..70caf8c3a 100644 --- a/infinigen/assets/materials/tiles/star.py +++ b/infinigen/assets/materials/tiles/star.py @@ -20,8 +20,8 @@ def nodegroup_star_single(nw: NodeWrangler): expose_input=[ ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "Radius", 0.0000), - ("NodeSocketFloatFactor", "Edge", 0.0000), - ("NodeSocketFloatFactor", "3D-ness", 0.8333), + ("NodeSocketFloat", "Edge", 0.0000), + ("NodeSocketFloat", "3D-ness", 0.8333), ], ) @@ -198,8 +198,8 @@ def nodegroup_moon_single(nw: NodeWrangler): expose_input=[ ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "Radius", 0.0000), - ("NodeSocketFloatFactor", "Edge", 0.0000), - ("NodeSocketFloatFactor", "3D-ness", 0.8333), + ("NodeSocketFloat", "Edge", 0.0000), + ("NodeSocketFloat", "3D-ness", 0.8333), ], ) @@ -407,8 +407,8 @@ def nodegroup_star(nw: NodeWrangler): ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "Subtiles Number", 1.0000), ("NodeSocketFloat", "Aspect Ratio", 5.0000), - ("NodeSocketFloatFactor", "border", 0.1000), - ("NodeSocketFloatFactor", "Flatness", 0.9000), + ("NodeSocketFloat", "border", 0.1000), + ("NodeSocketFloat", "Flatness", 0.9000), ], ) diff --git a/infinigen/assets/materials/tiles/triangle.py b/infinigen/assets/materials/tiles/triangle.py index 602e80c94..3cd7af894 100644 --- a/infinigen/assets/materials/tiles/triangle.py +++ b/infinigen/assets/materials/tiles/triangle.py @@ -184,8 +184,8 @@ def nodegroup_triangle(nw: NodeWrangler): ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "Subtiles Number", 1.0000), ("NodeSocketFloat", "Aspect Ratio", 5.0000), - ("NodeSocketFloatFactor", "border", 0.1000), - ("NodeSocketFloatFactor", "Flatness", 0.9000), + ("NodeSocketFloat", "border", 0.1000), + ("NodeSocketFloat", "Flatness", 0.9000), ], ) diff --git a/infinigen/assets/materials/tongue.py b/infinigen/assets/materials/tongue.py index bec370d02..7038458dd 100644 --- a/infinigen/assets/materials/tongue.py +++ b/infinigen/assets/materials/tongue.py @@ -23,7 +23,7 @@ def shader_tongue(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": (0.8, 0.0605, 0.0437, 1.0), - "Subsurface": 0.0312, + "Subsurface Weight": 0.0312, "Subsurface Color": (0.8, 0.0, 0.2679, 1.0), "Roughness": colorramp.outputs["Color"], }, diff --git a/infinigen/assets/materials/twocolorz.py b/infinigen/assets/materials/twocolorz.py index 3e57bcdff..36d874c5e 100644 --- a/infinigen/assets/materials/twocolorz.py +++ b/infinigen/assets/materials/twocolorz.py @@ -80,7 +80,7 @@ def shader_twocolorz(nw, rand=True, **input_kwargs): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": colorramp.outputs["Color"], - "Specular": 0.0, + "Specular IOR Level": 0.0, "Roughness": colorramp_1.outputs["Color"], }, ) diff --git a/infinigen/assets/materials/vase_shaders.py b/infinigen/assets/materials/vase_shaders.py index d50b2b528..483cb13bc 100644 --- a/infinigen/assets/materials/vase_shaders.py +++ b/infinigen/assets/materials/vase_shaders.py @@ -21,15 +21,14 @@ def shader_ceramic(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": rgb, - "Subsurface": 0.3, + "Subsurface Weight": 0.3, "Subsurface Radius": (0.002, 0.002, 0.002), "Subsurface Color": rgb, - "Subsurface IOR": 1.4700, "Subsurface Anisotropy": 0.2000, - "Specular": 0.2000, + "Specular IOR Level": 0.2000, "Roughness": 0.0500, - "Clearcoat": 0.5000, - "Clearcoat Roughness": 0.0500, + "Coat Weight": 0.5000, + "Coat Roughness": 0.0500, "IOR": 1.4700, }, ) diff --git a/infinigen/assets/materials/water.py b/infinigen/assets/materials/water.py index bc678bc22..bc16177e4 100644 --- a/infinigen/assets/materials/water.py +++ b/infinigen/assets/materials/water.py @@ -267,7 +267,7 @@ def shader( "Base Color": color_of_transparent_bsdf_principled_bsdf, "Roughness": 0.0, "IOR": 1.33, - "Transmission": 1.0, + "Transmission Weight": 1.0, }, ) if mix_surface: diff --git a/infinigen/assets/materials/waterfall_material.py b/infinigen/assets/materials/waterfall_material.py index 2adb18511..002b849e1 100644 --- a/infinigen/assets/materials/waterfall_material.py +++ b/infinigen/assets/materials/waterfall_material.py @@ -24,7 +24,7 @@ def waterfall_shader(nw: NodeWrangler): "Base Color": rgb, "Roughness": 0.0, "IOR": 1.33, - "Transmission": 1.0, + "Transmission Weight": 1.0, }, ) @@ -64,10 +64,10 @@ def waterfall_shader(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Metallic": 0.2636, - "Specular": 1.0, + "Specular IOR Level": 1.0, "Roughness": 0.0, "IOR": 1.333, - "Transmission": 0.8205, + "Transmission Weight": 0.8205, "Alpha": colorramp.outputs["Color"], }, ) diff --git a/infinigen/assets/materials/wear_tear/procedural_edge_wear.py b/infinigen/assets/materials/wear_tear/procedural_edge_wear.py index fa4a8cdba..737a35a04 100644 --- a/infinigen/assets/materials/wear_tear/procedural_edge_wear.py +++ b/infinigen/assets/materials/wear_tear/procedural_edge_wear.py @@ -214,7 +214,7 @@ def shader_edge_tear_free_node_group( input_kwargs={ "Base Color": reroute, "Metallic": 0.3745, - "Specular": 0.0000, + "Specular IOR Level": 0.0000, "Roughness": 0.1436, }, ) @@ -297,7 +297,7 @@ def shader_edge_tear_free_node_group( input_kwargs={ "Base Color": reroute, "Metallic": 0.3855, - "Specular": 0.0000, + "Specular IOR Level": 0.0000, "Roughness": 0.0000, }, ) diff --git a/infinigen/assets/materials/woods/wood.py b/infinigen/assets/materials/woods/wood.py index 60cbe405c..65f378e3f 100644 --- a/infinigen/assets/materials/woods/wood.py +++ b/infinigen/assets/materials/woods/wood.py @@ -182,7 +182,7 @@ def shader_wood(nw: NodeWrangler, color=None, w=None, vertical=False, **kwargs): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Clearcoat": np.clip(uniform(0, 1.4), 0, 1), + "Coat Weight": np.clip(uniform(0, 1.4), 0, 1), }, ) nw.new_node( diff --git a/infinigen/assets/objects/appliances/beverage_fridge.py b/infinigen/assets/objects/appliances/beverage_fridge.py index 20f31fd37..39ac14b7a 100644 --- a/infinigen/assets/objects/appliances/beverage_fridge.py +++ b/infinigen/assets/objects/appliances/beverage_fridge.py @@ -128,9 +128,9 @@ def nodegroup_oven_rack(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Width", 2.0000), - ("NodeSocketFloatDistance", "Height", 2.0000), - ("NodeSocketFloatDistance", "Radius", 0.0200), + ("NodeSocketFloat", "Width", 2.0000), + ("NodeSocketFloat", "Height", 2.0000), + ("NodeSocketFloat", "Radius", 0.0200), ("NodeSocketInt", "Amount", 5), ], ) @@ -275,7 +275,7 @@ def nodegroup_text(nw: NodeWrangler): expose_input=[ ("NodeSocketVectorTranslation", "Translation", (1.5000, 0.0000, 0.0000)), ("NodeSocketString", "String", "BrandName"), - ("NodeSocketFloatDistance", "Size", 0.0500), + ("NodeSocketFloat", "Size", 0.0500), ("NodeSocketFloat", "Offset Scale", 0.0020), ], ) @@ -1111,7 +1111,7 @@ def nodegroup_beverage_fridge_geometry(nw: NodeWrangler, preprocess: bool = Fals ("NodeSocketFloat", "Height", 1.0000), ("NodeSocketFloat", "DoorThickness", 0.0700), ("NodeSocketFloat", "DoorRotation", 0.0000), - ("NodeSocketFloatDistance", "RackRadius", 0.0100), + ("NodeSocketFloat", "RackRadius", 0.0100), ("NodeSocketInt", "RackDAmount", 5), ("NodeSocketInt", "RackHAmount", 2), ("NodeSocketString", "BrandName", "BrandName"), diff --git a/infinigen/assets/objects/appliances/dishwasher.py b/infinigen/assets/objects/appliances/dishwasher.py index d05483b6c..cba6d0966 100644 --- a/infinigen/assets/objects/appliances/dishwasher.py +++ b/infinigen/assets/objects/appliances/dishwasher.py @@ -137,9 +137,9 @@ def nodegroup_dish_rack(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Depth", 2.0000), - ("NodeSocketFloatDistance", "Width", 2.0000), - ("NodeSocketFloatDistance", "Radius", 0.0200), + ("NodeSocketFloat", "Depth", 2.0000), + ("NodeSocketFloat", "Width", 2.0000), + ("NodeSocketFloat", "Radius", 0.0200), ("NodeSocketInt", "Amount", 5), ("NodeSocketFloat", "Height", 0.5000), ], @@ -344,7 +344,7 @@ def nodegroup_text(nw: NodeWrangler): expose_input=[ ("NodeSocketVectorTranslation", "Translation", (1.5000, 0.0000, 0.0000)), ("NodeSocketString", "String", "BrandName"), - ("NodeSocketFloatDistance", "Size", 0.0500), + ("NodeSocketFloat", "Size", 0.0500), ("NodeSocketFloat", "Offset Scale", 0.0020), ], ) @@ -1180,7 +1180,7 @@ def nodegroup_dishwasher_geometry(nw: NodeWrangler, preprocess: bool = False): ("NodeSocketFloat", "Height", 1.0000), ("NodeSocketFloat", "DoorThickness", 0.0700), ("NodeSocketFloat", "DoorRotation", 0.0000), - ("NodeSocketFloatDistance", "RackRadius", 0.0100), + ("NodeSocketFloat", "RackRadius", 0.0100), ("NodeSocketInt", "RackAmount", 2), ("NodeSocketString", "BrandName", "BrandName"), ("NodeSocketMaterial", "Surface", None), diff --git a/infinigen/assets/objects/appliances/microwave.py b/infinigen/assets/objects/appliances/microwave.py index e7b5d597b..859d2ad6c 100644 --- a/infinigen/assets/objects/appliances/microwave.py +++ b/infinigen/assets/objects/appliances/microwave.py @@ -163,7 +163,7 @@ def nodegroup_text(nw: NodeWrangler): expose_input=[ ("NodeSocketVectorTranslation", "Translation", (1.5000, 0.0000, 0.0000)), ("NodeSocketString", "String", "BrandName"), - ("NodeSocketFloatDistance", "Size", 0.0500), + ("NodeSocketFloat", "Size", 0.0500), ("NodeSocketFloat", "Offset Scale", 0.0020), ], ) diff --git a/infinigen/assets/objects/appliances/oven.py b/infinigen/assets/objects/appliances/oven.py index 685378c35..df0364147 100644 --- a/infinigen/assets/objects/appliances/oven.py +++ b/infinigen/assets/objects/appliances/oven.py @@ -837,7 +837,7 @@ def nodegroup_o(nw: NodeWrangler): ) group_input = nw.new_node( - Nodes.GroupInput, expose_input=[("NodeSocketFloatDistance", "Size", 1.0000)] + Nodes.GroupInput, expose_input=[("NodeSocketFloat", "Size", 1.0000)] ) curve_circle_1 = nw.new_node( @@ -1035,9 +1035,9 @@ def nodegroup_oven_rack(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Width", 2.0000), - ("NodeSocketFloatDistance", "Height", 2.0000), - ("NodeSocketFloatDistance", "Radius", 0.0200), + ("NodeSocketFloat", "Width", 2.0000), + ("NodeSocketFloat", "Height", 2.0000), + ("NodeSocketFloat", "Radius", 0.0200), ("NodeSocketInt", "Amount", 5), ], ) @@ -1182,7 +1182,7 @@ def nodegroup_text(nw: NodeWrangler): expose_input=[ ("NodeSocketVectorTranslation", "Translation", (1.5000, 0.0000, 0.0000)), ("NodeSocketString", "String", "BrandName"), - ("NodeSocketFloatDistance", "Size", 0.0500), + ("NodeSocketFloat", "Size", 0.0500), ("NodeSocketFloat", "Offset Scale", 0.0020), ], ) @@ -1555,13 +1555,13 @@ def nodegroup_oven_geometry( ("NodeSocketFloat", "Height", 1.0000), ("NodeSocketFloat", "DoorThickness", 0.0700), ("NodeSocketFloat", "DoorRotation", 0.0000), - ("NodeSocketFloatDistance", "RackRadius", 0.0100), + ("NodeSocketFloat", "RackRadius", 0.0100), ("NodeSocketInt", "RackHAmount", 2), ("NodeSocketInt", "RackDAmount", 5), ("NodeSocketFloat", "PanelHeight", 0.3000), ("NodeSocketFloat", "PanelThickness", 0.2000), ("NodeSocketInt", "BottonAmount", 4), - ("NodeSocketFloatDistance", "BottonRadius", 0.0500), + ("NodeSocketFloat", "BottonRadius", 0.0500), ("NodeSocketFloat", "BottonThickness", 0.0300), ("NodeSocketFloat", "HeaterRadiusRatio", 0.1500), ("NodeSocketString", "BrandName", "BrandName"), diff --git a/infinigen/assets/objects/cactus/generate.py b/infinigen/assets/objects/cactus/generate.py index faaf21e81..a121c6819 100644 --- a/infinigen/assets/objects/cactus/generate.py +++ b/infinigen/assets/objects/cactus/generate.py @@ -105,7 +105,7 @@ def shader_cactus(nw: NodeWrangler, base_hue): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Specular": specular, + "Specular IOR Level": specular, }, ) return bsdf diff --git a/infinigen/assets/objects/cactus/spike.py b/infinigen/assets/objects/cactus/spike.py index 4b530d25a..94efd0214 100644 --- a/infinigen/assets/objects/cactus/spike.py +++ b/infinigen/assets/objects/cactus/spike.py @@ -132,8 +132,8 @@ def shader_spikes(nw: NodeWrangler): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Specular": specular, - "Subsurface": 0.1, + "Specular IOR Level": specular, + "Subsurface Weight": 0.1, }, ) transparent_bsdf = nw.new_node(Nodes.TranslucentBSDF, [color]) diff --git a/infinigen/assets/objects/corals/generate.py b/infinigen/assets/objects/corals/generate.py index b00a6dd36..707c156de 100644 --- a/infinigen/assets/objects/corals/generate.py +++ b/infinigen/assets/objects/corals/generate.py @@ -172,8 +172,8 @@ def shader_coral(nw: NodeWrangler, base_hue): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Specular": specular, - "Subsurface": subsurface_ratio, + "Specular IOR Level": specular, + "Subsurface Weight": subsurface_ratio, "Subsurface Radius": subsurface_radius, "Subsurface Color": subsurface_color, }, diff --git a/infinigen/assets/objects/corals/tentacles.py b/infinigen/assets/objects/corals/tentacles.py index d7eb27042..056fa7712 100644 --- a/infinigen/assets/objects/corals/tentacles.py +++ b/infinigen/assets/objects/corals/tentacles.py @@ -136,8 +136,8 @@ def shader_tentacles(nw: NodeWrangler, base_hue=0.3): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Specular": specular, - "Subsurface": 0.01, + "Specular IOR Level": specular, + "Subsurface Weight": 0.01, }, ) fresnel_color = hsv2rgba(uniform(0, 1), 0.6, 0.6) diff --git a/infinigen/assets/objects/creatures/crustacean.py b/infinigen/assets/objects/creatures/crustacean.py index d0318615c..62da7d55a 100644 --- a/infinigen/assets/objects/creatures/crustacean.py +++ b/infinigen/assets/objects/creatures/crustacean.py @@ -224,9 +224,9 @@ def shader_crustacean(nw: NodeWrangler, params): "Base Color": color, "Metallic": metallic, "Roughness": roughness, - "Specular": specular, - "Specular Tint": specular_tint, - "Clearcoat": clearcoat, + "Specular IOR Level": specular, + "Specular IOR Level Tint": specular_tint, + "Coat Weight": clearcoat, }, ) return bsdf @@ -235,7 +235,7 @@ def shader_crustacean(nw: NodeWrangler, params): def shader_eye(nw: NodeWrangler): return nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Base Color": (0.1, 0.1, 0.1, 1), "Specular": 0}, + input_kwargs={"Base Color": (0.1, 0.1, 0.1, 1), "Specular IOR Level": 0}, ) diff --git a/infinigen/assets/objects/creatures/insects/parts/body/dragonfly_body.py b/infinigen/assets/objects/creatures/insects/parts/body/dragonfly_body.py index 9dab4c5d9..1e5a7601e 100644 --- a/infinigen/assets/objects/creatures/insects/parts/body/dragonfly_body.py +++ b/infinigen/assets/objects/creatures/insects/parts/body/dragonfly_body.py @@ -146,7 +146,7 @@ def shader_dragonfly_body_shader(nw: NodeWrangler, base_color, v): input_kwargs={ "Base Color": mix, "Metallic": 0.2182, - "Specular": 0.8318, + "Specular IOR Level": 0.8318, "Roughness": 0.1545, }, ) diff --git a/infinigen/assets/objects/creatures/insects/parts/eye/dragonfly_eye.py b/infinigen/assets/objects/creatures/insects/parts/eye/dragonfly_eye.py index 73ce2b41c..b14630e1c 100644 --- a/infinigen/assets/objects/creatures/insects/parts/eye/dragonfly_eye.py +++ b/infinigen/assets/objects/creatures/insects/parts/eye/dragonfly_eye.py @@ -70,7 +70,7 @@ def shader_dragonfly_eye_shader(nw: NodeWrangler, base_color, v): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": mix, - "Specular": map_range_1.outputs["Result"], + "Specular IOR Level": map_range_1.outputs["Result"], "Roughness": 0.0, }, ) diff --git a/infinigen/assets/objects/creatures/insects/parts/head/dragonfly_head.py b/infinigen/assets/objects/creatures/insects/parts/head/dragonfly_head.py index 7dec045a3..3e8e2af61 100644 --- a/infinigen/assets/objects/creatures/insects/parts/head/dragonfly_head.py +++ b/infinigen/assets/objects/creatures/insects/parts/head/dragonfly_head.py @@ -93,7 +93,11 @@ def shader_dragonfly_head_shader(nw: NodeWrangler, base_color, v): principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Base Color": mix, "Specular": 0.7545, "Roughness": 0.0636}, + input_kwargs={ + "Base Color": mix, + "Specular IOR Level": 0.7545, + "Roughness": 0.0636, + }, ) material_output = nw.new_node( diff --git a/infinigen/assets/objects/creatures/insects/parts/tail/dragonfly_tail.py b/infinigen/assets/objects/creatures/insects/parts/tail/dragonfly_tail.py index 0ff9ceb1c..0f4420f0d 100644 --- a/infinigen/assets/objects/creatures/insects/parts/tail/dragonfly_tail.py +++ b/infinigen/assets/objects/creatures/insects/parts/tail/dragonfly_tail.py @@ -154,7 +154,7 @@ def shader_dragonfly_tail_shader(nw: NodeWrangler, base_color, v, ring_length): input_kwargs={ "Base Color": mix_1, "Metallic": 0.5, - "Specular": 0.5114, + "Specular IOR Level": 0.5114, "Roughness": 0.2568, }, ) @@ -178,7 +178,7 @@ def nodegroup_dragonfly_tail( ("NodeSocketVectorTranslation", "Start", (0.0, 0.0, 0.0)), ("NodeSocketVectorTranslation", "Middle", (1.84, 0.0, 0.14)), ("NodeSocketVectorTranslation", "End", (3.14, 0.0, -0.32)), - ("NodeSocketFloatDistance", "Segment Length", 0.44), + ("NodeSocketFloat", "Segment Length", 0.44), ("NodeSocketFloat", "Segment Scale", 0.25), ("NodeSocketFloat", "Random Seed", 3.2), ("NodeSocketFloat", "Radius", 0.9), @@ -641,7 +641,7 @@ def nodegroup_add_vertical_stripes(nw: NodeWrangler): # input_kwargs={'Fac': maximum, 'Color1': group_1, 'Color2': mix_1}) # principled_bsdf = nw.new_node(Nodes.PrincipledBSDF, -# input_kwargs={'Base Color': mix, 'Metallic': 0.9, 'Specular': 0.5114, 'Roughness': 0.2568}) +# input_kwargs={'Base Color': mix, 'Metallic': 0.9, 'Specular IOR Level': 0.5114, 'Roughness': 0.2568}) # material_output = nw.new_node(Nodes.MaterialOutput, # input_kwargs={'Surface': principled_bsdf}) diff --git a/infinigen/assets/objects/creatures/insects/utils/geom_utils.py b/infinigen/assets/objects/creatures/insects/utils/geom_utils.py index 6874ec382..7b62ff07b 100644 --- a/infinigen/assets/objects/creatures/insects/utils/geom_utils.py +++ b/infinigen/assets/objects/creatures/insects/utils/geom_utils.py @@ -114,8 +114,8 @@ def nodegroup_attach_part(nw: NodeWrangler): ("NodeSocketGeometry", "Skin Mesh", None), ("NodeSocketGeometry", "Skeleton Curve", None), ("NodeSocketGeometry", "Geometry", None), - ("NodeSocketFloatFactor", "Length Fac", 0.0), - ("NodeSocketVectorEuler", "Ray Rot", (0.0, 0.0, 0.0)), + ("NodeSocketFloat", "Length Fac", 0.0), + ("NodeSocketVector", "Ray Rot", (0.0, 0.0, 0.0)), ("NodeSocketFloat", "Rad", 0.0), ("NodeSocketVector", "Part Rot", (0.0, 0.0, 0.0)), ("NodeSocketBool", "Do Normal Rot", False), @@ -260,8 +260,8 @@ def nodegroup_instance_on_points(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketVectorEuler", "rotation base", (0.0, 0.0, 0.0)), - ("NodeSocketVectorEuler", "rotation delta", (-1.5708, 0.0, 0.0)), + ("NodeSocketVector", "rotation base", (0.0, 0.0, 0.0)), + ("NodeSocketVector", "rotation delta", (-1.5708, 0.0, 0.0)), ("NodeSocketVectorTranslation", "translation", (0.0, -0.5, 0.0)), ("NodeSocketFloat", "scale", 0.0), ("NodeSocketGeometry", "Points", None), @@ -402,7 +402,7 @@ def shader_dragonfly_body_shader(nw: NodeWrangler): input_kwargs={ "Base Color": group_1, "Metallic": 0.2182, - "Specular": 0.8318, + "Specular IOR Level": 0.8318, "Roughness": 0.1545, }, ) @@ -599,7 +599,7 @@ def nodegroup_raycast_rotation(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketVectorEuler", "Rotation", (0.0, 0.0, 0.0)), + ("NodeSocketVector", "Rotation", (0.0, 0.0, 0.0)), ("NodeSocketVector", "Hit Normal", (0.0, 0.0, 1.0)), ("NodeSocketVector", "Curve Tangent", (0.0, 0.0, 1.0)), ("NodeSocketBool", "Do Normal Rot", False), @@ -675,8 +675,8 @@ def nodegroup_part_surface(nw: NodeWrangler): expose_input=[ ("NodeSocketGeometry", "Skeleton Curve", None), ("NodeSocketGeometry", "Skin Mesh", None), - ("NodeSocketFloatFactor", "Length Fac", 0.0), - ("NodeSocketVectorEuler", "Ray Rot", (0.0, 0.0, 0.0)), + ("NodeSocketFloat", "Length Fac", 0.0), + ("NodeSocketVector", "Ray Rot", (0.0, 0.0, 0.0)), ("NodeSocketFloat", "Rad", 0.0), ], ) @@ -1325,7 +1325,7 @@ def nodegroup_profile_part(nw: NodeWrangler): expose_input=[ ("NodeSocketGeometry", "Skeleton Curve", None), ("NodeSocketGeometry", "Profile Curve", None), - ("NodeSocketFloatDistance", "Radius Func", 1.0), + ("NodeSocketFloat", "Radius Func", 1.0), ], ) diff --git a/infinigen/assets/objects/creatures/insects/utils/shader_utils.py b/infinigen/assets/objects/creatures/insects/utils/shader_utils.py index 31826f4f7..c35ce4af1 100644 --- a/infinigen/assets/objects/creatures/insects/utils/shader_utils.py +++ b/infinigen/assets/objects/creatures/insects/utils/shader_utils.py @@ -21,7 +21,7 @@ def shader_black_w_noise_shader(nw: NodeWrangler): input_kwargs={ "Base Color": group, "Metallic": 0.9, - "Specular": 0.5114, + "Specular IOR Level": 0.5114, "Roughness": 0.2568, }, ) diff --git a/infinigen/assets/objects/creatures/parts/chameleon.py b/infinigen/assets/objects/creatures/parts/chameleon.py index a62ca6712..8f9e142b1 100644 --- a/infinigen/assets/objects/creatures/parts/chameleon.py +++ b/infinigen/assets/objects/creatures/parts/chameleon.py @@ -294,7 +294,7 @@ def nodegroup_chameleon_claw_shape(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketVectorEuler", "Rotation", (0.0000, 1.0472, 0.0000)), + ("NodeSocketVector", "Rotation", (0.0000, 1.0472, 0.0000)), ("NodeSocketVectorXYZ", "Scale", (0.2000, 0.2000, 0.4000)), ], ) @@ -383,8 +383,8 @@ def nodegroup_chameleon_foot_shape(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketVectorEuler", "ouRotation", (0.0000, 1.0472, 0.0000)), - ("NodeSocketVectorEuler", "inRotation", (0.0000, 2.0944, 3.1416)), + ("NodeSocketVector", "ouRotation", (0.0000, 1.0472, 0.0000)), + ("NodeSocketVector", "inRotation", (0.0000, 2.0944, 3.1416)), ("NodeSocketVectorXYZ", "ouScale", (1.0000, 1.0000, 1.0000)), ("NodeSocketVectorXYZ", "inScale", (1.0000, 1.0000, 1.0000)), ], @@ -2358,7 +2358,7 @@ def shader_chameleon(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": combine_color, - "Specular": 0.3000, + "Specular IOR Level": 0.3000, "Roughness": 0.6000, }, ) @@ -2383,7 +2383,7 @@ def nodegroup_chameleon_leg_shape(nw: NodeWrangler): ("NodeSocketFloat", "body_position", 0.1000), ("NodeSocketFloat", "body_thickness", 0.0500), ("NodeSocketFloat", "body_height", -0.1000), - ("NodeSocketVectorEuler", "Rotation", (0.0000, -0.6981, 0.0000)), + ("NodeSocketVector", "Rotation", (0.0000, -0.6981, 0.0000)), ("NodeSocketFloat", "thigh_length", 0.6000), ("NodeSocketFloat", "calf_length", 0.5000), ("NodeSocketFloat", "thigh_body_rotation", 25.0000), @@ -3272,7 +3272,7 @@ def nodegroup_round_bump(nw: NodeWrangler): Nodes.GroupInput, expose_input=[ ("NodeSocketGeometry", "Geometry", None), - ("NodeSocketFloatDistance", "Distance", 0.0200), + ("NodeSocketFloat", "Distance", 0.0200), ("NodeSocketFloat", "Offset Scale", 0.0100), ("NodeSocketInt", "Level", 1), ], @@ -3479,7 +3479,7 @@ def shader_chameleon_eye(nw: NodeWrangler): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": combine_color, - "Specular": 0.3000, + "Specular IOR Level": 0.3000, "Roughness": 0.6000, }, ) @@ -3504,8 +3504,8 @@ def nodegroup_chameleon(nw: NodeWrangler): ("NodeSocketFloat", "head_crown", 0.2000), ("NodeSocketFloat", "head_eyebrow", 0.0200), ("NodeSocketVectorXYZ", "head_scale", (1.0000, 1.0000, 1.0000)), - ("NodeSocketVectorEuler", "left_eye_rotation", (0.0000, 0.0000, -1.5)), - ("NodeSocketVectorEuler", "right_eye_rotation", (0.0000, 0.0000, 1.5)), + ("NodeSocketVector", "left_eye_rotation", (0.0000, 0.0000, -1.5)), + ("NodeSocketVector", "right_eye_rotation", (0.0000, 0.0000, 1.5)), ("NodeSocketFloat", "pupil_radius", 0.2200), ("NodeSocketFloat", "front_leg_position", 0.0800), ("NodeSocketFloat", "back_leg_position", 0.8500), diff --git a/infinigen/assets/objects/creatures/parts/eye.py b/infinigen/assets/objects/creatures/parts/eye.py index f4bf9737a..040dc97b2 100644 --- a/infinigen/assets/objects/creatures/parts/eye.py +++ b/infinigen/assets/objects/creatures/parts/eye.py @@ -150,7 +150,7 @@ def nodegroup_mammal_eye(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Radius", 0.050000000000000003), + ("NodeSocketFloat", "Radius", 0.050000000000000003), ("NodeSocketFloat", "Eyelid Thickness Ratio", 0.34999999999999998), ("NodeSocketFloat", "Eyelid Fullness", 2.0), ("NodeSocketBool", "Eyelids", True), diff --git a/infinigen/assets/objects/creatures/parts/eye_new.py b/infinigen/assets/objects/creatures/parts/eye_new.py index 15de54705..cbb9ffecb 100644 --- a/infinigen/assets/objects/creatures/parts/eye_new.py +++ b/infinigen/assets/objects/creatures/parts/eye_new.py @@ -152,7 +152,7 @@ def nodegroup_cornea(nw: NodeWrangler): expose_input=[ ("NodeSocketFloat", "ScaleX", 0.5000), ("NodeSocketFloat", "Height", 2.0000), - ("NodeSocketFloatFactor", "ScaleZ", 0.0000), + ("NodeSocketFloat", "ScaleZ", 0.0000), ("NodeSocketFloat", "Y", 20.0000), ("NodeSocketInt", "Resolution", 128), ], @@ -649,7 +649,7 @@ def nodegroup_eye_ball(nw: NodeWrangler): expose_input=[ ("NodeSocketFloat", "CorneaScaleX", 0.52), ("NodeSocketFloat", "Height", 1.2), - ("NodeSocketFloatFactor", "CorneaScaleZ", 0.8), + ("NodeSocketFloat", "CorneaScaleZ", 0.8), ("NodeSocketFloat", "Y", 20.0), ("NodeSocketInt", "EyeballResolution", 32), ("NodeSocketInt", "CorneaResolution", 128), @@ -1337,16 +1337,20 @@ def shader_eyeball_fish(nw: NodeWrangler, rand=True, **input_kwargs): principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Base Color": mix_2, "Specular": 0.0000, "Roughness": 0.0000}, + input_kwargs={ + "Base Color": mix_2, + "Specular IOR Level": 0.0000, + "Roughness": 0.0000, + }, ) principled_bsdf_1 = nw.new_node( Nodes.PrincipledBSDF, input_kwargs={ - "Specular": 1.0000, + "Specular IOR Level": 1.0000, "Roughness": 0.0000, "IOR": 1.3500, - "Transmission": 1.0000, + "Transmission Weight": 1.0000, }, ) @@ -1705,7 +1709,7 @@ def nodegroup_append_eye(nw: NodeWrangler): ("NodeSocketGeometry", "Geometry", None), ("NodeSocketVector", "Translation", (0.0, 0.0, 0.0)), ("NodeSocketFloat", "Scale", 0.0), - ("NodeSocketVectorEuler", "Rotation", (0.1745, 0.0, -1.3963)), + ("NodeSocketVector", "Rotation", (0.1745, 0.0, -1.3963)), ("NodeSocketVector", "Ray Direction", (-1.0, 0.0, 0.0)), ("NodeSocketFloat", "Default Offset", -0.002), ], @@ -2274,7 +2278,7 @@ def nodegroup_profile_part(nw: NodeWrangler): expose_input=[ ("NodeSocketGeometry", "Skeleton Curve", None), ("NodeSocketGeometry", "Profile Curve", None), - ("NodeSocketFloatDistance", "Radius Func", 1.0), + ("NodeSocketFloat", "Radius Func", 1.0), ], ) @@ -2450,7 +2454,7 @@ def nodegroup_solidify(nw: NodeWrangler): Nodes.GroupInput, expose_input=[ ("NodeSocketGeometry", "Mesh", None), - ("NodeSocketFloatDistance", "Distance", 0.0), + ("NodeSocketFloat", "Distance", 0.0), ], ) @@ -2572,7 +2576,7 @@ def nodegroup_raycast_rotation(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketVectorEuler", "Rotation", (0.0, 0.0, 0.0)), + ("NodeSocketVector", "Rotation", (0.0, 0.0, 0.0)), ("NodeSocketVector", "Hit Normal", (0.0, 0.0, 1.0)), ("NodeSocketVector", "Curve Tangent", (0.0, 0.0, 1.0)), ("NodeSocketBool", "Do Normal Rot", False), @@ -2648,8 +2652,8 @@ def nodegroup_part_surface(nw: NodeWrangler): expose_input=[ ("NodeSocketGeometry", "Skeleton Curve", None), ("NodeSocketGeometry", "Skin Mesh", None), - ("NodeSocketFloatFactor", "Length Fac", 0.0), - ("NodeSocketVectorEuler", "Ray Rot", (0.0, 0.0, 0.0)), + ("NodeSocketFloat", "Length Fac", 0.0), + ("NodeSocketVector", "Ray Rot", (0.0, 0.0, 0.0)), ("NodeSocketFloat", "Rad", 0.0), ], ) @@ -2742,7 +2746,7 @@ def nodegroup_eyeball_eyelid(nw: NodeWrangler): ), ("NodeSocketVector", "OffsetPreAppending", (0.0120, 0.0000, 0.0000)), ("NodeSocketFloat", "Scale", 1.0), - ("NodeSocketVectorEuler", "Rotation", (0.1745, 0.0000, -1.3963)), + ("NodeSocketVector", "Rotation", (0.1745, 0.0000, -1.3963)), ("NodeSocketVector", "RayDirection", (-1.0000, 0.0000, 0.0000)), ("NodeSocketFloat", "DefaultAppendDistance", -0.0020), ("NodeSocketVector", "EyeSocketRot", (0.0000, 0.0000, 0.0000)), @@ -3195,11 +3199,11 @@ def nodegroup_carnivore_jaw(nw: NodeWrangler): Nodes.GroupInput, expose_input=[ ("NodeSocketVector", "length_rad1_rad2", (0.0, 0.0, 0.0)), - ("NodeSocketFloatFactor", "Width Shaping", 0.6764), + ("NodeSocketFloat", "Width Shaping", 0.6764), ("NodeSocketFloat", "Canine Length", 0.05), ("NodeSocketFloat", "Incisor Size", 0.01), ("NodeSocketFloat", "Tooth Crookedness", 0.0), - ("NodeSocketFloatFactor", "Tongue Shaping", 1.0), + ("NodeSocketFloat", "Tongue Shaping", 1.0), ("NodeSocketFloat", "Tongue X Scale", 0.9), ], ) @@ -3598,8 +3602,8 @@ def nodegroup_cat_ear(nw: NodeWrangler): expose_input=[ ("NodeSocketVector", "length_rad1_rad2", (0.0, 0.0, 0.0)), ("NodeSocketFloat", "Depth", 0.0), - ("NodeSocketFloatDistance", "Thickness", 0.0), - ("NodeSocketFloatDistance", "Curl Deg", 0.0), + ("NodeSocketFloat", "Thickness", 0.0), + ("NodeSocketFloat", "Curl Deg", 0.0), ], ) @@ -3752,9 +3756,9 @@ def nodegroup_cat_nose(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Nose Radius", 0.06), - ("NodeSocketFloatDistance", "Nostril Size", 0.025), - ("NodeSocketFloatFactor", "Crease", 0.008), + ("NodeSocketFloat", "Nose Radius", 0.06), + ("NodeSocketFloat", "Nostril Size", 0.025), + ("NodeSocketFloat", "Crease", 0.008), ("NodeSocketVectorXYZ", "Scale", (1.2, 1.0, 1.0)), ], ) @@ -3821,8 +3825,8 @@ def nodegroup_attach_part(nw: NodeWrangler): ("NodeSocketGeometry", "Skin Mesh", None), ("NodeSocketGeometry", "Skeleton Curve", None), ("NodeSocketGeometry", "Geometry", None), - ("NodeSocketFloatFactor", "Length Fac", 0.0), - ("NodeSocketVectorEuler", "Ray Rot", (0.0, 0.0, 0.0)), + ("NodeSocketFloat", "Length Fac", 0.0), + ("NodeSocketVector", "Ray Rot", (0.0, 0.0, 0.0)), ("NodeSocketFloat", "Rad", 0.0), ("NodeSocketVector", "Part Rot", (0.0, 0.0, 0.0)), ("NodeSocketBool", "Do Normal Rot", False), @@ -4255,16 +4259,16 @@ def shader_eyeball_tiger(nw: NodeWrangler, **input_kwargs): principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Base Color": mix_2, "Specular": 0.0, "Roughness": 0.0}, + input_kwargs={"Base Color": mix_2, "Specular IOR Level": 0.0, "Roughness": 0.0}, ) principled_bsdf_1 = nw.new_node( Nodes.PrincipledBSDF, input_kwargs={ - "Specular": 1.0, + "Specular IOR Level": 1.0, "Roughness": 0.0, "IOR": 1.35, - "Transmission": 1.0, + "Transmission Weight": 1.0, }, ) diff --git a/infinigen/assets/objects/creatures/parts/foot.py b/infinigen/assets/objects/creatures/parts/foot.py index 64b0b3aab..4da3143c9 100644 --- a/infinigen/assets/objects/creatures/parts/foot.py +++ b/infinigen/assets/objects/creatures/parts/foot.py @@ -34,7 +34,7 @@ def nodegroup_tiger_toe(nw: NodeWrangler): Nodes.GroupInput, expose_input=[ ("NodeSocketVector", "length_rad1_rad2", (0.18, 0.045, 0.024)), - ("NodeSocketFloatDistance", "Toebean Radius", 0.03), + ("NodeSocketFloat", "Toebean Radius", 0.03), ("NodeSocketFloat", "Claw Curl Deg", 30.0), ("NodeSocketVector", "Claw Pct Length Rad1 Rad2", (0.0, 0.0, 0.0)), ("NodeSocketFloat", "Toe Curl Scalar", 1.0), @@ -221,7 +221,7 @@ def nodegroup_foot(nw: NodeWrangler): ("NodeSocketVector", "Toe Rotate", (0.0000, -1.57, 0.0000)), ("NodeSocketVector", "Toe Length Rad1 Rad2", (0.3000, 0.0450, 0.0250)), ("NodeSocketFloat", "Toe Splay", 0.0000), - ("NodeSocketFloatDistance", "Toebean Radius", 0.0300), + ("NodeSocketFloat", "Toebean Radius", 0.0300), ("NodeSocketFloat", "Claw Curl Deg", 30.0000), ("NodeSocketVector", "Claw Pct Length Rad1 Rad2", (0.3000, 0.5000, 0.0000)), ("NodeSocketVector", "Thumb Pct", (1.0000, 1.0000, 1.0000)), diff --git a/infinigen/assets/objects/creatures/parts/head.py b/infinigen/assets/objects/creatures/parts/head.py index e8feea2e4..cb8ea4797 100644 --- a/infinigen/assets/objects/creatures/parts/head.py +++ b/infinigen/assets/objects/creatures/parts/head.py @@ -44,11 +44,11 @@ def nodegroup_carnivore_jaw(nw: NodeWrangler): Nodes.GroupInput, expose_input=[ ("NodeSocketVector", "length_rad1_rad2", (0.0, 0.0, 0.0)), - ("NodeSocketFloatFactor", "Width Shaping", 0.6764), + ("NodeSocketFloat", "Width Shaping", 0.6764), ("NodeSocketFloat", "Canine Length", 0.050000000000000003), ("NodeSocketFloat", "Incisor Size", 0.01), ("NodeSocketFloat", "Tooth Crookedness", 0.0), - ("NodeSocketFloatFactor", "Tongue Shaping", 1.0), + ("NodeSocketFloat", "Tongue Shaping", 1.0), ("NodeSocketFloat", "Tongue X Scale", 0.90000000000000002), ], ) @@ -500,7 +500,7 @@ def nodegroup_carnivore_head(nw: NodeWrangler): (0.3, 60.6, 66.0), ), ("NodeSocketFloat", "aspect", 1.0), - ("NodeSocketFloatDistance", "EyeRad", 0.03), + ("NodeSocketFloat", "EyeRad", 0.03), ("NodeSocketVector", "EyeOffset", (-0.2, 0.5, 0.2)), ], ) @@ -979,7 +979,7 @@ def nodegroup_flying_bird_head(nw: NodeWrangler): ), ("NodeSocketVector", "angles_deg", (0.0, -24.0, -20.0)), ("NodeSocketVector", "eye_coord", (0.5, 0.0, 1.0)), - ("NodeSocketFloatDistance", "Radius", 0.040000000000000001), + ("NodeSocketFloat", "Radius", 0.040000000000000001), ], ) @@ -1039,7 +1039,7 @@ def nodegroup_bird_head(nw: NodeWrangler): ), ("NodeSocketVector", "angles_deg", (0.0, -24.0, -20.0)), ("NodeSocketVector", "eye_coord", (0.5, 0.0, 1.0)), - ("NodeSocketFloatDistance", "Radius", 0.040000000000000001), + ("NodeSocketFloat", "Radius", 0.040000000000000001), ], ) diff --git a/infinigen/assets/objects/creatures/parts/head_detail.py b/infinigen/assets/objects/creatures/parts/head_detail.py index 1bd1d5920..57f4aa6f2 100644 --- a/infinigen/assets/objects/creatures/parts/head_detail.py +++ b/infinigen/assets/objects/creatures/parts/head_detail.py @@ -36,8 +36,8 @@ def nodegroup_cat_ear(nw: NodeWrangler): expose_input=[ ("NodeSocketVector", "length_rad1_rad2", (0.0, 0.0, 0.0)), ("NodeSocketFloat", "Depth", 0.0), - ("NodeSocketFloatDistance", "Thickness", 0.0), - ("NodeSocketFloatDistance", "Curl Deg", 0.0), + ("NodeSocketFloat", "Thickness", 0.0), + ("NodeSocketFloat", "Curl Deg", 0.0), ], ) @@ -169,9 +169,9 @@ def nodegroup_cat_nose(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Nose Radius", 0.06), - ("NodeSocketFloatDistance", "Nostril Size", 0.025), - ("NodeSocketFloatFactor", "Crease", 0.008), + ("NodeSocketFloat", "Nose Radius", 0.06), + ("NodeSocketFloat", "Nostril Size", 0.025), + ("NodeSocketFloat", "Crease", 0.008), ("NodeSocketVectorXYZ", "Scale", (1.2, 1.0, 1.0)), ], ) diff --git a/infinigen/assets/objects/creatures/parts/horn.py b/infinigen/assets/objects/creatures/parts/horn.py index 0f3be8dfc..00db0231c 100644 --- a/infinigen/assets/objects/creatures/parts/horn.py +++ b/infinigen/assets/objects/creatures/parts/horn.py @@ -171,7 +171,7 @@ def nodegroup_horn(nw: NodeWrangler): ("NodeSocketFloat", "thickness", 4.0), ("NodeSocketFloat", "density_of_ridge", 0.0), ("NodeSocketFloat", "depth_of_ridge", 0.2), - ("NodeSocketFloatDistance", "height", 2.5), + ("NodeSocketFloat", "height", 2.5), ("NodeSocketFloat", "rotation_x", 0), ], ) diff --git a/infinigen/assets/objects/creatures/parts/wings.py b/infinigen/assets/objects/creatures/parts/wings.py index 73aded341..9aef1ff54 100644 --- a/infinigen/assets/objects/creatures/parts/wings.py +++ b/infinigen/assets/objects/creatures/parts/wings.py @@ -263,7 +263,7 @@ def nodegroup_bird_wing(nw: NodeWrangler): ("NodeSocketFloat", "feather_density", 18.7), ("NodeSocketFloat", "aspect", 1.0), ("NodeSocketFloat", "fullness", 4.0), - ("NodeSocketFloatFactor", "Wing Shape Sculpting", 1.0), + ("NodeSocketFloat", "Wing Shape Sculpting", 1.0), ("NodeSocketVector", "Feather length_rad1_rad2", (0.6, 0.04, 0.04)), ("NodeSocketFloat", "Extension", 1.68), ], @@ -861,7 +861,7 @@ def nodegroup_flying_bird_wing(nw: NodeWrangler): ("NodeSocketFloat", "feather_density", 18.7000), ("NodeSocketFloat", "aspect", 1.0000), ("NodeSocketFloat", "fullness", 4.0000), - ("NodeSocketFloatFactor", "Wing Shape Sculpting", 1.0000), + ("NodeSocketFloat", "Wing Shape Sculpting", 1.0000), ("NodeSocketVector", "Length Rad1 Rad2", (0.6000, 0.0400, 0.0400)), ("NodeSocketFloat", "Extension", 1.6800), ], diff --git a/infinigen/assets/objects/creatures/util/animation/curve_slither.py b/infinigen/assets/objects/creatures/util/animation/curve_slither.py index 99691e273..d307f9faa 100644 --- a/infinigen/assets/objects/creatures/util/animation/curve_slither.py +++ b/infinigen/assets/objects/creatures/util/animation/curve_slither.py @@ -187,7 +187,7 @@ def nodegroup_wiggles(nw: NodeWrangler): Nodes.GroupInput, expose_input=[ ("NodeSocketGeometry", "Geometry", None), - ("NodeSocketFloatDistance", "Wavelength", 2.3300), + ("NodeSocketFloat", "Wavelength", 2.3300), ("NodeSocketFloat", "Magnitude", 1.6800), ("NodeSocketFloat", "MagRandom", 1.0000), ("NodeSocketFloat", "Loopyness", 0.5800), diff --git a/infinigen/assets/objects/fruits/cross_section_lib.py b/infinigen/assets/objects/fruits/cross_section_lib.py index 6d7417f01..72f5c2335 100644 --- a/infinigen/assets/objects/fruits/cross_section_lib.py +++ b/infinigen/assets/objects/fruits/cross_section_lib.py @@ -216,9 +216,9 @@ def nodegroup_cylax_cross_section(nw: NodeWrangler): expose_input=[ ("NodeSocketInt", "fork number", 10), ("NodeSocketFloat", "bottom radius", 0.0), - ("NodeSocketFloatDistance", "noise random seed", 0.0), + ("NodeSocketFloat", "noise random seed", 0.0), ("NodeSocketFloat", "noise amount", 0.4), - ("NodeSocketFloatDistance", "radius", 1.0), + ("NodeSocketFloat", "radius", 1.0), ], ) diff --git a/infinigen/assets/objects/fruits/fruit_utils.py b/infinigen/assets/objects/fruits/fruit_utils.py index bac98645d..21b746fa3 100644 --- a/infinigen/assets/objects/fruits/fruit_utils.py +++ b/infinigen/assets/objects/fruits/fruit_utils.py @@ -154,7 +154,7 @@ def nodegroup_point_on_mesh(nw: NodeWrangler): expose_input=[ ("NodeSocketGeometry", "Mesh", None), ("NodeSocketFloat", "spline parameter", 0.0), - ("NodeSocketFloatDistance", "Distance Min", 0.2), + ("NodeSocketFloat", "Distance Min", 0.2), ("NodeSocketFloat", "parameter max", 1.0), ("NodeSocketFloat", "parameter min", 0.0), ("NodeSocketFloat", "noise amount", 1.0), @@ -260,8 +260,8 @@ def nodegroup_instance_on_points(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketVectorEuler", "rotation base", (0.0, 0.0, 0.0)), - ("NodeSocketVectorEuler", "rotation delta", (0.0, 0.0, 0.0)), + ("NodeSocketVector", "rotation base", (0.0, 0.0, 0.0)), + ("NodeSocketVector", "rotation delta", (0.0, 0.0, 0.0)), ("NodeSocketVectorTranslation", "translation", (0.0, 0.0, 0.0)), ("NodeSocketFloat", "scale", 0.0), ("NodeSocketGeometry", "Points", None), @@ -933,7 +933,7 @@ def nodegroup_hair(nw: NodeWrangler): ("NodeSocketIntUnsigned", "length resolution", 8), ("NodeSocketInt", "cross section resolution", 4), ("NodeSocketFloat", "scale", 0.0), - ("NodeSocketFloatDistance", "Radius", 0.01), + ("NodeSocketFloat", "Radius", 0.01), ("NodeSocketMaterial", "Material", None), ("NodeSocketVectorTranslation", "Start", (0.0, 0.0, 0.0)), ("NodeSocketVectorTranslation", "Middle", (0.0, 0.3, 1.0)), diff --git a/infinigen/assets/objects/fruits/stem_lib.py b/infinigen/assets/objects/fruits/stem_lib.py index ba4bef58b..61b2732b1 100644 --- a/infinigen/assets/objects/fruits/stem_lib.py +++ b/infinigen/assets/objects/fruits/stem_lib.py @@ -79,7 +79,7 @@ def shader_basic_stem_shader(nw: NodeWrangler, stem_color): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": hue_saturation_value, - "Specular": 0.1205, + "Specular IOR Level": 0.1205, "Roughness": 0.5068, }, ) @@ -102,7 +102,7 @@ def nodegroup_basic_stem(nw: NodeWrangler, stem_color=(0.179, 0.836, 0.318, 1.0) ("NodeSocketVectorTranslation", "quad_mid", (0.0, -0.05, 0.2)), ("NodeSocketVectorTranslation", "quad_end", (-0.1, 0.0, 0.4)), ("NodeSocketIntUnsigned", "quad_res", 128), - ("NodeSocketFloatDistance", "cross_radius", 0.08), + ("NodeSocketFloat", "cross_radius", 0.08), ("NodeSocketInt", "cross_res", 128), ("NodeSocketVectorTranslation", "Translation", (0.0, 0.0, 1.0)), ("NodeSocketVectorXYZ", "Scale", (1.0, 1.0, 2.0)), @@ -217,7 +217,7 @@ def shader_calyx_shader(nw: NodeWrangler, stem_color): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": hue_saturation_value, - "Specular": 0.5136, + "Specular IOR Level": 0.5136, "Roughness": 0.7614, }, ) @@ -244,16 +244,16 @@ def nodegroup_calyx_stem(nw: NodeWrangler, stem_color=(0.1678, 0.4541, 0.0397, 1 expose_input=[ ("NodeSocketGeometry", "Geometry", None), ("NodeSocketInt", "fork number", 10), - ("NodeSocketFloatDistance", "outer radius", 1.0), + ("NodeSocketFloat", "outer radius", 1.0), ("NodeSocketFloat", "inner radius", 0.2), ("NodeSocketFloat", "cross section noise amount", 0.4), ("NodeSocketFloat", "z noise amount", 1.0), - ("NodeSocketFloatDistance", "noise random seed", 0.0), + ("NodeSocketFloat", "noise random seed", 0.0), ("NodeSocketVectorTranslation", "quad_start", (0.0, 0.0, 0.0)), ("NodeSocketVectorTranslation", "quad_mid", (0.0, -0.05, 0.2)), ("NodeSocketVectorTranslation", "quad_end", (-0.1, 0.0, 0.4)), ("NodeSocketVectorTranslation", "Translation", (0.0, 0.0, 1.0)), - ("NodeSocketFloatDistance", "cross_radius", 0.04), + ("NodeSocketFloat", "cross_radius", 0.04), ], ) @@ -378,7 +378,7 @@ def nodegroup_jigsaw(nw: NodeWrangler): expose_input=[ ("NodeSocketFloat", "Value", 0.5), ("NodeSocketFloat", "noise scale", 30.0), - ("NodeSocketFloatFactor", "noise randomness", 0.7), + ("NodeSocketFloat", "noise randomness", 0.7), ("NodeSocketFloat", "From Max", 0.15), ("NodeSocketFloat", "To Min", 0.9), ], @@ -517,7 +517,7 @@ def nodegroup_coconut_calyx(nw: NodeWrangler, basic_color, edge_color): expose_input=[ ("NodeSocketFloat", "width", 0.5), ("NodeSocketInt", "resolution", 128), - ("NodeSocketFloatDistance", "radius", 1.0), + ("NodeSocketFloat", "radius", 1.0), ("NodeSocketInt", "subdivision", 5), ("NodeSocketFloat", "bump displacement", 0.16), ("NodeSocketFloat", "bump scale", 3.22), @@ -834,7 +834,7 @@ def shader_leaf(nw: NodeWrangler, basic_color): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": hue_saturation_value, - "Specular": 0.5955, + "Specular IOR Level": 0.5955, "Roughness": 1.0, }, ) @@ -953,7 +953,7 @@ def nodegroup_pineapple_crown(nw: NodeWrangler): expose_input=[ ("NodeSocketGeometry", "Leaf", None), ("NodeSocketVectorTranslation", "translation", (0.0, 0.0, 0.7)), - ("NodeSocketVectorEuler", "rotation base", (-0.4363, 0.0, 0.0)), + ("NodeSocketVector", "rotation base", (-0.4363, 0.0, 0.0)), ("NodeSocketInt", "number of leaves", 75), ("NodeSocketFloat", "noise amount", 0.1), ("NodeSocketFloat", "noise scale", 50.0), @@ -1086,7 +1086,7 @@ def nodegroup_pineapple_stem(nw: NodeWrangler, basic_color): ("NodeSocketVectorTranslation", "Middle", (0.0, -0.32, 3.72)), ("NodeSocketVectorTranslation", "End", (0.0, 0.92, 4.32)), ("NodeSocketVectorTranslation", "translation", (0.0, 0.0, 0.7)), - ("NodeSocketVectorEuler", "rotation base", (-0.5236, 0.0, 0.0)), + ("NodeSocketVector", "rotation base", (-0.5236, 0.0, 0.0)), ("NodeSocketInt", "number of leaves", 75), ("NodeSocketFloat", "noise amount", 0.1), ("NodeSocketFloat", "noise scale", 20.0), diff --git a/infinigen/assets/objects/fruits/surfaces/blackberry_surface.py b/infinigen/assets/objects/fruits/surfaces/blackberry_surface.py index 2f772c241..24c6235b0 100644 --- a/infinigen/assets/objects/fruits/surfaces/blackberry_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/blackberry_surface.py @@ -24,7 +24,11 @@ def shader_berry_shader(nw: NodeWrangler, berry_color): principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Base Color": berry_color, "Specular": 0.5705, "Roughness": 0.2}, + input_kwargs={ + "Base Color": berry_color, + "Specular IOR Level": 0.5705, + "Roughness": 0.2, + }, ) material_output = nw.new_node( diff --git a/infinigen/assets/objects/fruits/surfaces/coconutgreen_surface.py b/infinigen/assets/objects/fruits/surfaces/coconutgreen_surface.py index c76d4db05..ca6adb11b 100644 --- a/infinigen/assets/objects/fruits/surfaces/coconutgreen_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/coconutgreen_surface.py @@ -112,7 +112,11 @@ def shader_coconut_green_shader(nw: NodeWrangler, basic_color, bottom_color): principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Base Color": group_1, "Specular": 0.4773, "Roughness": 0.4455}, + input_kwargs={ + "Base Color": group_1, + "Specular IOR Level": 0.4773, + "Roughness": 0.4455, + }, ) material_output = nw.new_node( diff --git a/infinigen/assets/objects/fruits/surfaces/durian_surface.py b/infinigen/assets/objects/fruits/surfaces/durian_surface.py index e1b005d2f..9a6be358c 100644 --- a/infinigen/assets/objects/fruits/surfaces/durian_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/durian_surface.py @@ -76,7 +76,7 @@ def shader_durian_shader(nw: NodeWrangler, peak_color, base_color): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": hue_saturation_value, - "Specular": 0.1205, + "Specular IOR Level": 0.1205, "Roughness": 0.5068, }, ) @@ -103,7 +103,7 @@ def nodegroup_durian_surface( ("NodeSocketGeometry", "Geometry", None), ("NodeSocketFloat", "displacement", 1.0), ("NodeSocketFloat", "spline parameter", 0.0), - ("NodeSocketFloatDistance", "distance Min", 0.1), + ("NodeSocketFloat", "distance Min", 0.1), ("NodeSocketFloat", "noise amount", 0.3), ("NodeSocketFloat", "noise scale", 5.0), ], diff --git a/infinigen/assets/objects/fruits/surfaces/pineapple_surface.py b/infinigen/assets/objects/fruits/surfaces/pineapple_surface.py index f215522b4..e41332b5e 100644 --- a/infinigen/assets/objects/fruits/surfaces/pineapple_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/pineapple_surface.py @@ -36,7 +36,7 @@ def nodegroup_pineapple_surface( expose_input=[ ("NodeSocketGeometry", "Geometry", None), ("NodeSocketFloat", "spline parameter", 0.0), - ("NodeSocketFloatDistance", "point distance", 0.22), + ("NodeSocketFloat", "point distance", 0.22), ("NodeSocketFloat", "cell scale", 0.2), ("NodeSocketFloat", "random seed", 0.0), ], diff --git a/infinigen/assets/objects/fruits/surfaces/starfruit_surface.py b/infinigen/assets/objects/fruits/surfaces/starfruit_surface.py index f502ba6db..fc42c422e 100644 --- a/infinigen/assets/objects/fruits/surfaces/starfruit_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/starfruit_surface.py @@ -42,7 +42,7 @@ def shader_starfruit_shader(nw: NodeWrangler, base_color, ridge_color): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": colorramp.outputs["Color"], - "Specular": 0.775, + "Specular IOR Level": 0.775, "Roughness": 0.2, }, ) diff --git a/infinigen/assets/objects/fruits/surfaces/strawberry_surface.py b/infinigen/assets/objects/fruits/surfaces/strawberry_surface.py index dad72914b..0f8d819d9 100644 --- a/infinigen/assets/objects/fruits/surfaces/strawberry_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/strawberry_surface.py @@ -67,7 +67,7 @@ def shader_strawberry_shader(nw: NodeWrangler, top_pos, main_color, top_color): principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Base Color": mix, "Specular": 1.0, "Roughness": 0.15}, + input_kwargs={"Base Color": mix, "Specular IOR Level": 1.0, "Roughness": 0.15}, ) mix_shader = nw.new_node( @@ -97,7 +97,7 @@ def nodegroup_strawberry_surface( expose_input=[ ("NodeSocketGeometry", "Geometry", None), ("NodeSocketFloat", "spline parameter", 0.0), - ("NodeSocketFloatDistance", "Distance Min", 0.12), + ("NodeSocketFloat", "Distance Min", 0.12), ("NodeSocketFloat", "Strength", 0.74), ("NodeSocketFloat", "noise random seed", 0.0), ], diff --git a/infinigen/assets/objects/fruits/surfaces/surface_utils.py b/infinigen/assets/objects/fruits/surfaces/surface_utils.py index 67430cd39..fd7a412d0 100644 --- a/infinigen/assets/objects/fruits/surfaces/surface_utils.py +++ b/infinigen/assets/objects/fruits/surfaces/surface_utils.py @@ -22,7 +22,7 @@ def nodegroup_stripe_pattern(nw: NodeWrangler): ("NodeSocketColor", "Color", (0.8, 0.8, 0.8, 1.0)), ("NodeSocketFloat", "attribute", 0.0), ("NodeSocketFloat", "voronoi scale", 50.0), - ("NodeSocketFloatFactor", "voronoi randomness", 1.0), + ("NodeSocketFloat", "voronoi randomness", 1.0), ("NodeSocketFloat", "seed", 0.0), ("NodeSocketFloat", "noise scale", 10.0), ("NodeSocketFloat", "noise amount", 1.4), diff --git a/infinigen/assets/objects/grassland/dandelion.py b/infinigen/assets/objects/grassland/dandelion.py index 74560fd2c..850c1d514 100644 --- a/infinigen/assets/objects/grassland/dandelion.py +++ b/infinigen/assets/objects/grassland/dandelion.py @@ -26,7 +26,7 @@ def nodegroup_pedal_stem_head_geometry(nw: NodeWrangler): Nodes.GroupInput, expose_input=[ ("NodeSocketVectorTranslation", "Translation", (0.0, 0.0, 1.0)), - ("NodeSocketFloatDistance", "Radius", 0.04), + ("NodeSocketFloat", "Radius", 0.04), ], ) @@ -159,7 +159,7 @@ def nodegroup_pedal_stem_branch_shape(nw: NodeWrangler): pedal_stem_branches_num.integer = 40 group_input = nw.new_node( - Nodes.GroupInput, expose_input=[("NodeSocketFloatDistance", "Radius", 0.0100)] + Nodes.GroupInput, expose_input=[("NodeSocketFloat", "Radius", 0.0100)] ) curve_circle_1 = nw.new_node( @@ -407,7 +407,7 @@ def nodegroup_pedal_stem_geometry(nw: NodeWrangler): expose_input=[ ("NodeSocketVectorTranslation", "End", (0.0, 0.0, 1.0)), ("NodeSocketVectorTranslation", "Middle", (0.0, 0.0, 0.5)), - ("NodeSocketFloatDistance", "Radius", 0.05), + ("NodeSocketFloat", "Radius", 0.05), ], ) diff --git a/infinigen/assets/objects/grassland/flower.py b/infinigen/assets/objects/grassland/flower.py index 3a00eb1a4..eab315f36 100644 --- a/infinigen/assets/objects/grassland/flower.py +++ b/infinigen/assets/objects/grassland/flower.py @@ -654,7 +654,7 @@ def shader_petal(nw): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": petal_color, - "Specular": specular, + "Specular IOR Level": specular, "Roughness": roughness, }, ) diff --git a/infinigen/assets/objects/lamp/ceiling_classic_lamp.py b/infinigen/assets/objects/lamp/ceiling_classic_lamp.py index ed320038f..56494b563 100644 --- a/infinigen/assets/objects/lamp/ceiling_classic_lamp.py +++ b/infinigen/assets/objects/lamp/ceiling_classic_lamp.py @@ -30,9 +30,9 @@ def shader_lamp_material(nw: NodeWrangler): "Base Color": rgb, "Subsurface Radius": (0.1000, 0.1000, 0.1000), "Roughness": uniform(0.2, 0.9), - "Sheen": 0.2068, - "Clearcoat Roughness": 0.1436, - "Transmission": 0.4045, + "Sheen Weight": 0.2068, + "Coat Roughness": 0.1436, + "Transmission Weight": 0.4045, "Transmission Roughness": 0.6932, "Emission": (0.9858, 0.9858, 0.9858, 1.0000), "Emission Strength": 0.0000, @@ -109,7 +109,7 @@ def geometry_nodes(nw: NodeWrangler): ("NodeSocketFloat", "bottom_radius", 0.0000), ("NodeSocketFloat", "top_radius", 0.0000), ("NodeSocketFloat", "Thickness", 0.5000), - ("NodeSocketFloatDistance", "Amount", 1.0000), + ("NodeSocketFloat", "Amount", 1.0000), ], ) diff --git a/infinigen/assets/objects/lamp/ceiling_lights.py b/infinigen/assets/objects/lamp/ceiling_lights.py index 8b30c92a8..c5ccc7b25 100644 --- a/infinigen/assets/objects/lamp/ceiling_lights.py +++ b/infinigen/assets/objects/lamp/ceiling_lights.py @@ -145,7 +145,7 @@ def nodegroup_ceiling_light_geometry(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Radius", 0.2000), + ("NodeSocketFloat", "Radius", 0.2000), ("NodeSocketFloat", "Thickness", 0.0050), ("NodeSocketFloat", "InnerRadius", 0.1800), ("NodeSocketFloat", "Height", 0.1000), diff --git a/infinigen/assets/objects/lamp/lamp.py b/infinigen/assets/objects/lamp/lamp.py index 9bdc905fe..e68d5d22b 100644 --- a/infinigen/assets/objects/lamp/lamp.py +++ b/infinigen/assets/objects/lamp/lamp.py @@ -399,10 +399,10 @@ def nodegroup_bulb_rack(nw: NodeWrangler): Nodes.GroupInput, label="amount", expose_input=[ - ("NodeSocketFloatDistance", "Thickness", 0.0200), + ("NodeSocketFloat", "Thickness", 0.0200), ("NodeSocketInt", "Amount", 3), - ("NodeSocketFloatDistance", "InnerRadius", 1.0000), - ("NodeSocketFloatDistance", "OuterRadius", 1.0000), + ("NodeSocketFloat", "InnerRadius", 1.0000), + ("NodeSocketFloat", "OuterRadius", 1.0000), ("NodeSocketFloat", "InnerHeight", 0.0000), ("NodeSocketFloat", "OuterHeight", 0.0000), ], @@ -635,7 +635,7 @@ def nodegroup_lamp_head(nw: NodeWrangler): ("NodeSocketFloat", "TopRadius", 0.3000), ("NodeSocketFloat", "BotRadius", 0.5000), ("NodeSocketBool", "ReverseBulb", True), - ("NodeSocketFloatDistance", "RackThickness", 0.0050), + ("NodeSocketFloat", "RackThickness", 0.0050), ("NodeSocketFloat", "RackHeight", 0.5000), ("NodeSocketMaterial", "BlackMaterial", None), ("NodeSocketMaterial", "LampshadeMaterial", None), @@ -802,14 +802,14 @@ def nodegroup_lamp_geometry(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "StandRadius", 0.0200), - ("NodeSocketFloatDistance", "BaseRadius", 0.1000), + ("NodeSocketFloat", "StandRadius", 0.0200), + ("NodeSocketFloat", "BaseRadius", 0.1000), ("NodeSocketFloat", "BaseHeight", 0.0200), ("NodeSocketFloat", "ShadeHeight", 0.0000), ("NodeSocketFloat", "HeadTopRadius", 0.3000), ("NodeSocketFloat", "HeadBotRadius", 0.5000), ("NodeSocketBool", "ReverseLamp", True), - ("NodeSocketFloatDistance", "RackThickness", 0.0050), + ("NodeSocketFloat", "RackThickness", 0.0050), ("NodeSocketVectorTranslation", "CurvePoint1", (0.0000, 0.0000, 0.0000)), ("NodeSocketVectorTranslation", "CurvePoint2", (0.0000, 0.0000, 0.0000)), ("NodeSocketVectorTranslation", "CurvePoint3", (0.0000, 0.0000, 0.0000)), diff --git a/infinigen/assets/objects/leaves/leaf_pine.py b/infinigen/assets/objects/leaves/leaf_pine.py index 539d82256..fbd95c74f 100644 --- a/infinigen/assets/objects/leaves/leaf_pine.py +++ b/infinigen/assets/objects/leaves/leaf_pine.py @@ -114,7 +114,7 @@ def nodegroup_instance_needle(nw): Nodes.GroupInput, expose_input=[ ("NodeSocketGeometry", "Curve", None), - ("NodeSocketFloatFactor", "Needle Density", 0.9), + ("NodeSocketFloat", "Needle Density", 0.9), ("NodeSocketInt", "Seed", 0), ("NodeSocketGeometry", "Instance", None), ("NodeSocketFloat", "X Angle Mean", 0.5), @@ -241,7 +241,7 @@ def nodegroup_needle5(nw): ("NodeSocketGeometry", "Instance", None), ("NodeSocketFloat", "X Angle Mean", 0.5), ("NodeSocketFloat", "X Angle Range", 0.0), - ("NodeSocketFloatFactor", "Needle Density", 0.9), + ("NodeSocketFloat", "Needle Density", 0.9), ("NodeSocketInt", "Seed", 0), ], ) @@ -344,7 +344,7 @@ def shader_twig(nw): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": (0.08, 0.0329, 0.0414, 1.0), - "Specular": 0.0527, + "Specular IOR Level": 0.0527, "Roughness": 0.4491, }, ) @@ -366,7 +366,7 @@ def nodegroup_pine_twig(nw): ("NodeSocketIntUnsigned", "Resolution", 20), ("NodeSocketFloat", "Middle Y", 0.0), ("NodeSocketFloat", "Middle Z", 0.0), - ("NodeSocketFloatFactor", "Needle Density", 0.9), + ("NodeSocketFloat", "Needle Density", 0.9), ("NodeSocketGeometry", "Instance", None), ("NodeSocketFloat", "X Angle Mean", 0.5), ("NodeSocketFloat", "X Angle Range", 0.0), diff --git a/infinigen/assets/objects/mollusk/generate.py b/infinigen/assets/objects/mollusk/generate.py index 9f02843d7..54286624d 100644 --- a/infinigen/assets/objects/mollusk/generate.py +++ b/infinigen/assets/objects/mollusk/generate.py @@ -137,7 +137,7 @@ def color_fn(dark_prob): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": nw.new_node(Nodes.MixRGB, [ratio, cr_0, cr_1]), - "Specular": specular, + "Specular IOR Level": specular, "Roughness": roughness, }, ) diff --git a/infinigen/assets/objects/monocot/grasses.py b/infinigen/assets/objects/monocot/grasses.py index a2b6130e6..6cba77610 100644 --- a/infinigen/assets/objects/monocot/grasses.py +++ b/infinigen/assets/objects/monocot/grasses.py @@ -255,9 +255,9 @@ def shader_ear(nw: NodeWrangler): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Specular": specular, - "Clearcoat": clearcoat, - "Subsurface": 0.01, + "Specular IOR Level": specular, + "Coat Weight": clearcoat, + "Subsurface Weight": 0.01, "Subsurface Radius": (0.01, 0.01, 0.01), }, ) diff --git a/infinigen/assets/objects/monocot/growth.py b/infinigen/assets/objects/monocot/growth.py index 7a0aa0e7b..11c896948 100644 --- a/infinigen/assets/objects/monocot/growth.py +++ b/infinigen/assets/objects/monocot/growth.py @@ -298,9 +298,9 @@ def shader_monocot(nw: NodeWrangler, dark_color, bright_color, use_distance): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Specular": specular, - "Clearcoat": clearcoat, - "Subsurface": 0.01, + "Specular IOR Level": specular, + "Coat Weight": clearcoat, + "Subsurface Weight": 0.01, "Subsurface Radius": (0.01, 0.01, 0.01), }, ) diff --git a/infinigen/assets/objects/monocot/pinecone.py b/infinigen/assets/objects/monocot/pinecone.py index 4a961729f..03d52c97c 100644 --- a/infinigen/assets/objects/monocot/pinecone.py +++ b/infinigen/assets/objects/monocot/pinecone.py @@ -94,7 +94,7 @@ def shader_monocot(nw: NodeWrangler, dark_color, bright_color, use_distance): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Specular": specular, + "Specular IOR Level": specular, }, ) return bsdf diff --git a/infinigen/assets/objects/monocot/veratrum.py b/infinigen/assets/objects/monocot/veratrum.py index 64208baa8..1adc6411d 100644 --- a/infinigen/assets/objects/monocot/veratrum.py +++ b/infinigen/assets/objects/monocot/veratrum.py @@ -69,9 +69,9 @@ def shader_ear(nw: NodeWrangler): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Specular": specular, - "Clearcoat": clearcoat, - "Subsurface": 0.01, + "Specular IOR Level": specular, + "Coat Weight": clearcoat, + "Subsurface Weight": 0.01, "Subsurface Radius": (0.01, 0.01, 0.01), }, ) diff --git a/infinigen/assets/objects/mushroom/cap.py b/infinigen/assets/objects/mushroom/cap.py index b44e55d1c..8e7ebc37c 100644 --- a/infinigen/assets/objects/mushroom/cap.py +++ b/infinigen/assets/objects/mushroom/cap.py @@ -420,10 +420,10 @@ def shader_voronoi(nw: NodeWrangler, base_hue): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Specular": specular, - "Clearcoat": clearcoat, + "Specular IOR Level": specular, + "Coat Weight": clearcoat, "Subsurface Color": subsurface_color, - "Subsurface": 0.01, + "Subsurface Weight": 0.01, "Subsurface Radius": (0.05, 0.05, 0.05), }, ) @@ -468,10 +468,10 @@ def shader_speckle(nw: NodeWrangler, base_hue): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Specular": specular, - "Clearcoat": clearcoat, + "Specular IOR Level": specular, + "Coat Weight": clearcoat, "Subsurface Color": subsurface_color, - "Subsurface": 0.01, + "Subsurface Weight": 0.01, "Subsurface Radius": (0.05, 0.05, 0.05), }, ) @@ -531,10 +531,10 @@ def shader_noise(nw: NodeWrangler, base_hue): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Specular": specular, - "Clearcoat": clearcoat, + "Specular IOR Level": specular, + "Coat Weight": clearcoat, "Subsurface Color": subsurface_color, - "Subsurface": 0.01, + "Subsurface Weight": 0.01, "Subsurface Radius": (0.05, 0.05, 0.05), }, ) @@ -588,10 +588,10 @@ def shader_cap(nw: NodeWrangler, base_hue): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Specular": specular, - "Clearcoat": clearcoat, + "Specular IOR Level": specular, + "Coat Weight": clearcoat, "Subsurface Color": subsurface_color, - "Subsurface": 0.01, + "Subsurface Weight": 0.01, "Subsurface Radius": (0.05, 0.05, 0.05), }, ) diff --git a/infinigen/assets/objects/organizer/plate_rack.py b/infinigen/assets/objects/organizer/plate_rack.py index 73eba98b7..de02a2ec0 100644 --- a/infinigen/assets/objects/organizer/plate_rack.py +++ b/infinigen/assets/objects/organizer/plate_rack.py @@ -24,7 +24,7 @@ def nodegroup_plate_rack_connect(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Radius", 1.0000), + ("NodeSocketFloat", "Radius", 1.0000), ("NodeSocketFloat", "Value1", 0.5000), ("NodeSocketFloat", "Value", 0.5000), ], @@ -91,7 +91,7 @@ def nodegroup_rack_cyn(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Radius", 1.0000), + ("NodeSocketFloat", "Radius", 1.0000), ("NodeSocketFloat", "Value", 0.5000), ], ) diff --git a/infinigen/assets/objects/particles/lichen.py b/infinigen/assets/objects/particles/lichen.py index 15f2f8f3f..7bb66be35 100644 --- a/infinigen/assets/objects/particles/lichen.py +++ b/infinigen/assets/objects/particles/lichen.py @@ -81,7 +81,7 @@ def map_perturb(h, s, v): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": mix_rgb, - "Subsurface": subsurface_ratio, + "Subsurface Weight": subsurface_ratio, "Subsurface Radius": (0.01, 0.01, 0.01), "Subsurface Color": background, "Roughness": roughness, diff --git a/infinigen/assets/objects/particles/moss.py b/infinigen/assets/objects/particles/moss.py index 51ba736cf..3bdbe878d 100644 --- a/infinigen/assets/objects/particles/moss.py +++ b/infinigen/assets/objects/particles/moss.py @@ -62,7 +62,7 @@ def map_perturb(h, s, v): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": mix_rgb, - "Subsurface": subsurface_ratio, + "Subsurface Weight": subsurface_ratio, "Subsurface Radius": (0.01, 0.01, 0.01), "Subsurface Color": background, "Roughness": roughness, diff --git a/infinigen/assets/objects/particles/pine_needle.py b/infinigen/assets/objects/particles/pine_needle.py index e0cae910e..50ff04e13 100644 --- a/infinigen/assets/objects/particles/pine_needle.py +++ b/infinigen/assets/objects/particles/pine_needle.py @@ -47,7 +47,7 @@ def nodegroup_pine_needle(nw: NodeWrangler): expose_input=[ ("NodeSocketFloat", "Scale", 0.0400), ("NodeSocketFloat", "Bend", 0.0300), - ("NodeSocketFloatDistance", "Radius", 0.0010), + ("NodeSocketFloat", "Radius", 0.0010), ], ) diff --git a/infinigen/assets/objects/seating/sofa.py b/infinigen/assets/objects/seating/sofa.py index 33172d707..8b99e1431 100644 --- a/infinigen/assets/objects/seating/sofa.py +++ b/infinigen/assets/objects/seating/sofa.py @@ -186,9 +186,9 @@ def nodegroup_sofa_geometry(nw: NodeWrangler): ("NodeSocketFloat", "Backrest Width", 0.1100), ("NodeSocketFloat", "Seat Margin", 0.9700), ("NodeSocketFloat", "Backrest Angle", -0.2000), - ("NodeSocketFloatFactor", "arm_width", 0.7000), + ("NodeSocketFloat", "arm_width", 0.7000), ("NodeSocketInt", "Arm Type", 0), - ("NodeSocketFloatFactor", "Arm_height", 0.7318), + ("NodeSocketFloat", "Arm_height", 0.7318), ("NodeSocketFloatAngle", "arms_angle", 0.8727), ("NodeSocketBool", "Footrest", False), ("NodeSocketInt", "Count", 4), diff --git a/infinigen/assets/objects/shelves/cabinet.py b/infinigen/assets/objects/shelves/cabinet.py index dece3fceb..a60ff6445 100644 --- a/infinigen/assets/objects/shelves/cabinet.py +++ b/infinigen/assets/objects/shelves/cabinet.py @@ -98,7 +98,7 @@ def nodegroup_knob_handle(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Radius", 0.0100), + ("NodeSocketFloat", "Radius", 0.0100), ("NodeSocketFloat", "thickness_1", 0.5000), ("NodeSocketFloat", "thickness_2", 0.5000), ("NodeSocketFloat", "length", 0.5000), diff --git a/infinigen/assets/objects/shelves/doors.py b/infinigen/assets/objects/shelves/doors.py index 5a81bb082..8bc40bef2 100644 --- a/infinigen/assets/objects/shelves/doors.py +++ b/infinigen/assets/objects/shelves/doors.py @@ -103,7 +103,7 @@ def nodegroup_knob_handle(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Radius", 0.0100), + ("NodeSocketFloat", "Radius", 0.0100), ("NodeSocketFloat", "thickness_1", 0.5000), ("NodeSocketFloat", "thickness_2", 0.5000), ("NodeSocketFloat", "length", 0.5000), diff --git a/infinigen/assets/objects/shelves/drawers.py b/infinigen/assets/objects/shelves/drawers.py index 973ff1df7..d96a0c119 100644 --- a/infinigen/assets/objects/shelves/drawers.py +++ b/infinigen/assets/objects/shelves/drawers.py @@ -388,7 +388,7 @@ def nodegroup_door_knob(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Radius", 0.0040), + ("NodeSocketFloat", "Radius", 0.0040), ("NodeSocketFloat", "length", 0.5000), ("NodeSocketFloat", "z", 0.5000), ], diff --git a/infinigen/assets/objects/shelves/large_shelf.py b/infinigen/assets/objects/shelves/large_shelf.py index 75a2261e6..08a47d407 100644 --- a/infinigen/assets/objects/shelves/large_shelf.py +++ b/infinigen/assets/objects/shelves/large_shelf.py @@ -31,8 +31,8 @@ def nodegroup_screw_head(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Depth", 0.0050), - ("NodeSocketFloatDistance", "Radius", 1.0000), + ("NodeSocketFloat", "Depth", 0.0050), + ("NodeSocketFloat", "Radius", 1.0000), ("NodeSocketFloat", "division_thickness", 0.5000), ("NodeSocketFloat", "width", 0.5000), ("NodeSocketFloat", "depth", 0.5000), diff --git a/infinigen/assets/objects/shelves/simple_bookcase.py b/infinigen/assets/objects/shelves/simple_bookcase.py index 6f4b72ddf..ee188dc99 100644 --- a/infinigen/assets/objects/shelves/simple_bookcase.py +++ b/infinigen/assets/objects/shelves/simple_bookcase.py @@ -147,8 +147,8 @@ def nodegroup_screw_head(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Depth", 0.0050), - ("NodeSocketFloatDistance", "Radius", 1.0000), + ("NodeSocketFloat", "Depth", 0.0050), + ("NodeSocketFloat", "Radius", 1.0000), ("NodeSocketFloat", "bottom_gap", 0.5000), ("NodeSocketFloat", "division_thickness", 0.5000), ("NodeSocketFloat", "width", 0.5000), diff --git a/infinigen/assets/objects/shelves/simple_desk.py b/infinigen/assets/objects/shelves/simple_desk.py index d9632337e..3f0e23c0f 100644 --- a/infinigen/assets/objects/shelves/simple_desk.py +++ b/infinigen/assets/objects/shelves/simple_desk.py @@ -35,7 +35,7 @@ def nodegroup_table_legs(nw: NodeWrangler): expose_input=[ ("NodeSocketFloat", "thickness", 0.5000), ("NodeSocketFloat", "height", 0.5000), - ("NodeSocketFloatDistance", "radius", 0.0200), + ("NodeSocketFloat", "radius", 0.0200), ("NodeSocketFloat", "width", 0.5000), ("NodeSocketFloat", "depth", 0.5000), ("NodeSocketFloat", "dist", 0.5000), diff --git a/infinigen/assets/objects/small_plants/succulent.py b/infinigen/assets/objects/small_plants/succulent.py index cdf92fdc3..b567c874f 100644 --- a/infinigen/assets/objects/small_plants/succulent.py +++ b/infinigen/assets/objects/small_plants/succulent.py @@ -403,7 +403,7 @@ def nodegroup_pedal_on_base(nw: NodeWrangler, R=1.0): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Radius", 0.1), + ("NodeSocketFloat", "Radius", 0.1), ("NodeSocketFloat", "x_R", -1.3), ("NodeSocketFloat", "z_R", -1.57), ("NodeSocketInt", "Resolution", 10), diff --git a/infinigen/assets/objects/table_decorations/sink.py b/infinigen/assets/objects/table_decorations/sink.py index 4de90faa5..2941133de 100644 --- a/infinigen/assets/objects/table_decorations/sink.py +++ b/infinigen/assets/objects/table_decorations/sink.py @@ -301,11 +301,11 @@ def nodegroup_water_tap(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "base_width", U(0.2, 0.3)), + ("NodeSocketFloat", "base_width", U(0.2, 0.3)), ("NodeSocketFloat", "tap_head", U(0.7, 1.1)), ("NodeSocketFloat", "roation_z", U(5.5, 7.0)), ("NodeSocketFloat", "tap_height", U(0.5, 1)), - ("NodeSocketFloatDistance", "base_radius", U(0.0, 0.1)), + ("NodeSocketFloat", "base_radius", U(0.0, 0.1)), ("NodeSocketBool", "Switch", True if U() > 0.5 else False), ("NodeSocketFloat", "Y", U(-0.5, -0.06)), ("NodeSocketBool", "hand_type", True if U() > 0.2 else False), @@ -918,12 +918,12 @@ def nodegroup_sink_geometry(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Width", 2.0000), - ("NodeSocketFloatDistance", "Depth", 2.0000), + ("NodeSocketFloat", "Width", 2.0000), + ("NodeSocketFloat", "Depth", 2.0000), ("NodeSocketFloat", "Curvature", 0.9500), ("NodeSocketFloat", "Upper Height", 1.0000), ("NodeSocketFloat", "Lower Height", -0.0500), - ("NodeSocketFloatDistance", "HoleRadius", 0.1000), + ("NodeSocketFloat", "HoleRadius", 0.1000), ("NodeSocketFloat", "Margin", 0.5000), ("NodeSocketFloat", "WaterTapMargin", 0.5000), ("NodeSocketMaterial", "Tap", None), diff --git a/infinigen/assets/objects/table_decorations/utils.py b/infinigen/assets/objects/table_decorations/utils.py index 575c1a539..31004e834 100644 --- a/infinigen/assets/objects/table_decorations/utils.py +++ b/infinigen/assets/objects/table_decorations/utils.py @@ -19,7 +19,7 @@ def nodegroup_star_profile(nw: NodeWrangler): expose_input=[ ("NodeSocketInt", "Resolution", 64), ("NodeSocketInt", "Points", 64), - ("NodeSocketFloatDistance", "Inner Radius", 0.9000), + ("NodeSocketFloat", "Inner Radius", 0.9000), ], ) @@ -152,7 +152,7 @@ def nodegroup_shifted_circle(nw: NodeWrangler): Nodes.GroupInput, expose_input=[ ("NodeSocketInt", "Resolution", 32), - ("NodeSocketFloatDistance", "Radius", 1.0000), + ("NodeSocketFloat", "Radius", 1.0000), ("NodeSocketFloat", "Z", 0.0000), ("NodeSocketFloat", "Rot Z", 0.0000), ], diff --git a/infinigen/assets/objects/tables/legs/square.py b/infinigen/assets/objects/tables/legs/square.py index b2b2dc34f..a6def6e8e 100644 --- a/infinigen/assets/objects/tables/legs/square.py +++ b/infinigen/assets/objects/tables/legs/square.py @@ -23,11 +23,11 @@ def nodegroup_generate_leg_square(nw: NodeWrangler, **kwargs): expose_input=[ ("NodeSocketFloat", "Width", 0.0000), ("NodeSocketFloat", "Height", 0.0000), - ("NodeSocketFloatDistance", "Fillet Radius", 0.0300), + ("NodeSocketFloat", "Fillet Radius", 0.0300), ("NodeSocketBool", "Has Bottom Connector", True), ("NodeSocketInt", "Profile N-gon", 4), - ("NodeSocketFloatDistance", "Profile Width", 0.1000), - ("NodeSocketFloatDistance", "Profile Aspect Ratio", 0.5000), + ("NodeSocketFloat", "Profile Width", 0.1000), + ("NodeSocketFloat", "Profile Aspect Ratio", 0.5000), ("NodeSocketFloat", "Profile Fillet Ratio", 0.1000), ], ) diff --git a/infinigen/assets/objects/tables/lofting.py b/infinigen/assets/objects/tables/lofting.py index 591607d91..776bd9f5b 100644 --- a/infinigen/assets/objects/tables/lofting.py +++ b/infinigen/assets/objects/tables/lofting.py @@ -116,7 +116,7 @@ def nodegroup_shifted_circle(nw: NodeWrangler): Nodes.GroupInput, expose_input=[ ("NodeSocketInt", "Resolution", 32), - ("NodeSocketFloatDistance", "Radius", 1.0000), + ("NodeSocketFloat", "Radius", 1.0000), ("NodeSocketFloat", "Z", 0.0000), ("NodeSocketFloat", "Rot Z", 0.0000), ], @@ -168,7 +168,7 @@ def nodegroup_shifted_square(nw: NodeWrangler): Nodes.GroupInput, expose_input=[ ("NodeSocketInt", "Resolution", 10), - ("NodeSocketFloatDistance", "Width", 1.0000), + ("NodeSocketFloat", "Width", 1.0000), ("NodeSocketFloat", "Z", 0.0000), ("NodeSocketFloat", "Rot Z", 0.5000), ], diff --git a/infinigen/assets/objects/tables/table_top.py b/infinigen/assets/objects/tables/table_top.py index 607aad3ea..b857d1f57 100644 --- a/infinigen/assets/objects/tables/table_top.py +++ b/infinigen/assets/objects/tables/table_top.py @@ -30,7 +30,7 @@ def nodegroup_capped_cylinder(nw: NodeWrangler): expose_input=[ ("NodeSocketFloat", "Thickness", 0.5000), ("NodeSocketFloat", "Radius", 0.2000), - ("NodeSocketFloatDistance", "Cap Flatness", 4.0000), + ("NodeSocketFloat", "Cap Flatness", 4.0000), ("NodeSocketFloat", "Fillet Radius Vertical", 0.4000), ("NodeSocketFloat", "Cap Relative Scale", 1.0000), ("NodeSocketFloat", "Cap Relative Z Offset", 0.0000), diff --git a/infinigen/assets/objects/tables/table_utils.py b/infinigen/assets/objects/tables/table_utils.py index 5ae73e339..d00216a27 100644 --- a/infinigen/assets/objects/tables/table_utils.py +++ b/infinigen/assets/objects/tables/table_utils.py @@ -769,7 +769,7 @@ def nodegroup_create_cap(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Radius", 1.0000), + ("NodeSocketFloat", "Radius", 1.0000), ("NodeSocketInt", "Resolution", 64), ], ) @@ -853,7 +853,7 @@ def nodegroup_arc_top(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Diameter", 1.0000), + ("NodeSocketFloat", "Diameter", 1.0000), ("NodeSocketFloat", "Sweep Angle", 180.0000), ], ) diff --git a/infinigen/assets/objects/trees/branch.py b/infinigen/assets/objects/trees/branch.py index 645861c50..94836f4d8 100644 --- a/infinigen/assets/objects/trees/branch.py +++ b/infinigen/assets/objects/trees/branch.py @@ -278,7 +278,7 @@ def generate_branch(nw: NodeWrangler, **kwargs): # ('NodeSocketInt', 'seed', 0), # ('NodeSocketFloat', 'main branch noise amount', 0.3000), # ('NodeSocketFloat', 'main branch noise scale', 1.1000), - # ('NodeSocketFloatDistance', 'overall radius', 0.0200), + # ('NodeSocketFloat', 'overall radius', 0.0200), # ('NodeSocketFloat', 'twig density', 10.0000), # ('NodeSocketFloat', 'twig rotation', 45.0000), # ('NodeSocketFloat', 'twig scale', 5.0000), diff --git a/infinigen/assets/objects/trees/tree_flower.py b/infinigen/assets/objects/trees/tree_flower.py index 97ca26671..1f447e1d6 100644 --- a/infinigen/assets/objects/trees/tree_flower.py +++ b/infinigen/assets/objects/trees/tree_flower.py @@ -656,7 +656,7 @@ def shader_petal(nw, petal_color_name): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": petal_color, - "Specular": specular, + "Specular IOR Level": specular, "Roughness": roughness, }, ) diff --git a/infinigen/assets/objects/trees/utils/geometrynodes.py b/infinigen/assets/objects/trees/utils/geometrynodes.py index b4b04adf6..06c019fcf 100644 --- a/infinigen/assets/objects/trees/utils/geometrynodes.py +++ b/infinigen/assets/objects/trees/utils/geometrynodes.py @@ -521,7 +521,7 @@ def set_tree_radius(nw): ("NodeSocketFloat", "Min radius", 0.02), ("NodeSocketFloat", "Max radius", 5.0), ("NodeSocketInt", "Profile res", 20), - ("NodeSocketFloatDistance", "Merge dist", 0.001), + ("NodeSocketFloat", "Merge dist", 0.001), ], ) diff --git a/infinigen/assets/objects/trees/utils/materials.py b/infinigen/assets/objects/trees/utils/materials.py index faed9453a..bc25406de 100644 --- a/infinigen/assets/objects/trees/utils/materials.py +++ b/infinigen/assets/objects/trees/utils/materials.py @@ -57,7 +57,7 @@ def init_color_material( bsdf_node = nt.nodes.get("Principled BSDF") bsdf_node.inputs.get("Base Color").default_value = color bsdf_node.inputs.get("Roughness").default_value = roughness - bsdf_node.inputs.get("Specular").default_value = specular + bsdf_node.inputs.get("Specular IOR Level").default_value = specular return m @@ -231,7 +231,7 @@ def setup_material(m, txt_paths, metal_prob=0.2, transm_prob=0.2, emit_prob=0): rough_scale = nt.nodes.get("Map Range") bsdf.inputs.get("Metallic").default_value = 0 - bsdf.inputs.get("Transmission").default_value = 0 + bsdf.inputs.get("Transmission Weight").default_value = 0 bsdf.inputs.get("IOR").default_value = 1.45 rough_scale.inputs.get("To Max").default_value = 1 @@ -240,7 +240,7 @@ def setup_material(m, txt_paths, metal_prob=0.2, transm_prob=0.2, emit_prob=0): rough_scale.inputs.get("To Max").default_value = 0.5 elif np.random.rand() < transm_prob: - bsdf.inputs.get("Transmission").default_value = 1 + bsdf.inputs.get("Transmission Weight").default_value = 1 bsdf.inputs.get("IOR").default_value = 1.05 + np.random.rand() * 0.3 rough_scale.inputs.get("To Max").default_value = 0.2 diff --git a/infinigen/assets/objects/tropic_plants/coconut_tree.py b/infinigen/assets/objects/tropic_plants/coconut_tree.py index c21b14f17..04e65f096 100644 --- a/infinigen/assets/objects/tropic_plants/coconut_tree.py +++ b/infinigen/assets/objects/tropic_plants/coconut_tree.py @@ -311,7 +311,7 @@ def nodegroup_node_group_002(nw: NodeWrangler): ("NodeSocketColor", "Color", (0.8, 0.8, 0.8, 1.0)), ("NodeSocketFloat", "attribute", 0.0), ("NodeSocketFloat", "voronoi scale", 50.0), - ("NodeSocketFloatFactor", "voronoi randomness", 1.0), + ("NodeSocketFloat", "voronoi randomness", 1.0), ("NodeSocketFloat", "seed", 0.0), ("NodeSocketFloat", "noise scale", 10.0), ("NodeSocketFloat", "noise amount", 1.4), @@ -966,7 +966,11 @@ def shader_coconut_green_shader(nw: NodeWrangler): principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, - input_kwargs={"Base Color": group_1, "Specular": 0.4773, "Roughness": 0.4455}, + input_kwargs={ + "Base Color": group_1, + "Specular IOR Level": 0.4773, + "Roughness": 0.4455, + }, ) material_output = nw.new_node( diff --git a/infinigen/assets/objects/tropic_plants/palm_tree.py b/infinigen/assets/objects/tropic_plants/palm_tree.py index 3abd5562b..8ab0f5146 100644 --- a/infinigen/assets/objects/tropic_plants/palm_tree.py +++ b/infinigen/assets/objects/tropic_plants/palm_tree.py @@ -311,7 +311,7 @@ def nodegroup_node_group_002(nw: NodeWrangler): ("NodeSocketColor", "Color", (0.8, 0.8, 0.8, 1.0)), ("NodeSocketFloat", "attribute", 0.0), ("NodeSocketFloat", "voronoi scale", 50.0), - ("NodeSocketFloatFactor", "voronoi randomness", 1.0), + ("NodeSocketFloat", "voronoi randomness", 1.0), ("NodeSocketFloat", "seed", 0.0), ("NodeSocketFloat", "noise scale", 10.0), ("NodeSocketFloat", "noise amount", 1.4), @@ -1253,7 +1253,7 @@ def shader_trunk(nw: NodeWrangler): input_kwargs={ "Base Color": mix, "Roughness": voronoi_texture.outputs["Distance"], - "Specular": 0, + "Specular IOR Level": 0, }, ) diff --git a/infinigen/assets/objects/underwater/seaweed.py b/infinigen/assets/objects/underwater/seaweed.py index c7539840d..b584be870 100644 --- a/infinigen/assets/objects/underwater/seaweed.py +++ b/infinigen/assets/objects/underwater/seaweed.py @@ -163,11 +163,11 @@ def map_perturb(h, s, v): Nodes.PrincipledBSDF, input_kwargs={ "Base Color": cr, - "Subsurface": subsurface_ratio, + "Subsurface Weight": subsurface_ratio, "Subsurface Radius": (0.01, 0.01, 0.01), "Subsurface Color": map_perturb(base_hue, 0.6, 0.2), "Roughness": roughness, - "Specular": specular, + "Specular IOR Level": specular, }, ) diff --git a/infinigen/assets/objects/underwater/urchin.py b/infinigen/assets/objects/underwater/urchin.py index 458245fd9..f469e79b0 100644 --- a/infinigen/assets/objects/underwater/urchin.py +++ b/infinigen/assets/objects/underwater/urchin.py @@ -144,9 +144,9 @@ def shader_spikes(nw: NodeWrangler, base_hue): input_kwargs={ "Base Color": color, "Roughness": roughness, - "Subsurface": subsurface, + "Subsurface Weight": subsurface, "Subsurface Color": color, - "Transmission": transmission, + "Transmission Weight": transmission, }, ) return principled_bsdf diff --git a/infinigen/assets/objects/wall_decorations/skirting_board.py b/infinigen/assets/objects/wall_decorations/skirting_board.py index 8b68efdf9..bdfb7f2ef 100644 --- a/infinigen/assets/objects/wall_decorations/skirting_board.py +++ b/infinigen/assets/objects/wall_decorations/skirting_board.py @@ -43,7 +43,7 @@ def nodegroup_make_skirting_board(nw: NodeWrangler, control_points): ("NodeSocketCollection", "Parent", None), ("NodeSocketFloat", "Thickness", 0.0300), ("NodeSocketFloat", "Height", 0.1500), - ("NodeSocketFloatDistance", "Resolution", 0.0050), + ("NodeSocketFloat", "Resolution", 0.0050), ("NodeSocketBool", "Is Ceiling", False), ], ) diff --git a/infinigen/assets/objects/windows/window.py b/infinigen/assets/objects/windows/window.py index b8ae662cd..a5196046b 100644 --- a/infinigen/assets/objects/windows/window.py +++ b/infinigen/assets/objects/windows/window.py @@ -269,14 +269,14 @@ def nodegroup_window_geometry(nw: NodeWrangler): group_input_1 = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Width", 2.0000), - ("NodeSocketFloatDistance", "Height", 2.0000), - ("NodeSocketFloatDistance", "FrameWidth", 0.1000), - ("NodeSocketFloatDistance", "FrameThickness", 0.1000), + ("NodeSocketFloat", "Width", 2.0000), + ("NodeSocketFloat", "Height", 2.0000), + ("NodeSocketFloat", "FrameWidth", 0.1000), + ("NodeSocketFloat", "FrameThickness", 0.1000), ("NodeSocketInt", "PanelHAmount", 0), ("NodeSocketInt", "PanelVAmount", 0), - ("NodeSocketFloatDistance", "SubFrameWidth", 0.0500), - ("NodeSocketFloatDistance", "SubFrameThickness", 0.0500), + ("NodeSocketFloat", "SubFrameWidth", 0.0500), + ("NodeSocketFloat", "SubFrameThickness", 0.0500), ("NodeSocketInt", "SubPanelHAmount", 3), ("NodeSocketInt", "SubPanelVAmount", 2), ("NodeSocketFloat", "GlassThickness", 0.0100), @@ -288,13 +288,13 @@ def nodegroup_window_geometry(nw: NodeWrangler): ("NodeSocketFloat", "CurtainFrameDepth", 0.5000), ("NodeSocketFloat", "CurtainDepth", 0.0300), ("NodeSocketFloat", "CurtainIntervalNumber", 20.0000), - ("NodeSocketFloatDistance", "CurtainFrameRadius", 0.0100), + ("NodeSocketFloat", "CurtainFrameRadius", 0.0100), ("NodeSocketFloat", "CurtainMidL", -0.5000), ("NodeSocketFloat", "CurtainMidR", 0.5000), ("NodeSocketBool", "Shutter", True), - ("NodeSocketFloatDistance", "ShutterPanelRadius", 0.0050), - ("NodeSocketFloatDistance", "ShutterWidth", 0.0500), - ("NodeSocketFloatDistance", "ShutterThickness", 0.0050), + ("NodeSocketFloat", "ShutterPanelRadius", 0.0050), + ("NodeSocketFloat", "ShutterWidth", 0.0500), + ("NodeSocketFloat", "ShutterThickness", 0.0050), ("NodeSocketFloat", "ShutterRotation", 0.0000), ("NodeSocketFloat", "ShutterInterval", 0.0500), ("NodeSocketMaterial", "FrameMaterial", None), @@ -831,9 +831,9 @@ def nodegroup_curtain(nw: NodeWrangler): expose_input=[ ("NodeSocketFloat", "Width", 0.5000), ("NodeSocketFloat", "Depth", 0.1000), - ("NodeSocketFloatDistance", "Height", 0.1000), + ("NodeSocketFloat", "Height", 0.1000), ("NodeSocketFloat", "IntervalNumber", 0.5000), - ("NodeSocketFloatDistance", "Radius", 1.0000), + ("NodeSocketFloat", "Radius", 1.0000), ("NodeSocketFloat", "L1", 0.5000), ("NodeSocketFloat", "R1", 0.0000), ("NodeSocketFloat", "L2", 0.0000), @@ -1164,14 +1164,14 @@ def nodegroup_window_shutter(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Width", 2.0000), - ("NodeSocketFloatDistance", "Height", 2.0000), - ("NodeSocketFloatDistance", "FrameWidth", 0.1000), - ("NodeSocketFloatDistance", "FrameThickness", 0.1000), - ("NodeSocketFloatDistance", "PanelWidth", 0.1000), - ("NodeSocketFloatDistance", "PanelThickness", 0.1000), - ("NodeSocketFloatDistance", "ShutterWidth", 0.1000), - ("NodeSocketFloatDistance", "ShutterThickness", 0.1000), + ("NodeSocketFloat", "Width", 2.0000), + ("NodeSocketFloat", "Height", 2.0000), + ("NodeSocketFloat", "FrameWidth", 0.1000), + ("NodeSocketFloat", "FrameThickness", 0.1000), + ("NodeSocketFloat", "PanelWidth", 0.1000), + ("NodeSocketFloat", "PanelThickness", 0.1000), + ("NodeSocketFloat", "ShutterWidth", 0.1000), + ("NodeSocketFloat", "ShutterThickness", 0.1000), ("NodeSocketFloat", "ShutterInterval", 0.5000), ("NodeSocketFloat", "ShutterRotation", 0.0000), ("NodeSocketMaterial", "FrameMaterial", None), @@ -1413,12 +1413,12 @@ def nodegroup_window_panel(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketFloatDistance", "Width", 2.0000), - ("NodeSocketFloatDistance", "Height", 2.0000), - ("NodeSocketFloatDistance", "FrameWidth", 0.1000), - ("NodeSocketFloatDistance", "FrameThickness", 0.1000), - ("NodeSocketFloatDistance", "PanelWidth", 0.1000), - ("NodeSocketFloatDistance", "PanelThickness", 0.1000), + ("NodeSocketFloat", "Width", 2.0000), + ("NodeSocketFloat", "Height", 2.0000), + ("NodeSocketFloat", "FrameWidth", 0.1000), + ("NodeSocketFloat", "FrameThickness", 0.1000), + ("NodeSocketFloat", "PanelWidth", 0.1000), + ("NodeSocketFloat", "PanelThickness", 0.1000), ("NodeSocketInt", "PanelHAmount", 0), ("NodeSocketInt", "PanelVAmount", 0), ("NodeSocketBool", "WithGlass", False), diff --git a/infinigen/assets/utils/nodegroups/attach.py b/infinigen/assets/utils/nodegroups/attach.py index e2869c365..9156a6456 100644 --- a/infinigen/assets/utils/nodegroups/attach.py +++ b/infinigen/assets/utils/nodegroups/attach.py @@ -26,8 +26,8 @@ def nodegroup_part_surface(nw: NodeWrangler): expose_input=[ ("NodeSocketGeometry", "Skeleton Curve", None), ("NodeSocketGeometry", "Skin Mesh", None), - ("NodeSocketFloatFactor", "Length Fac", 0.0), - ("NodeSocketVectorEuler", "Ray Rot", (0.0, 0.0, 0.0)), + ("NodeSocketFloat", "Length Fac", 0.0), + ("NodeSocketVector", "Ray Rot", (0.0, 0.0, 0.0)), ("NodeSocketFloat", "Rad", 0.0), ], ) @@ -141,7 +141,7 @@ def nodegroup_raycast_rotation(nw: NodeWrangler): group_input = nw.new_node( Nodes.GroupInput, expose_input=[ - ("NodeSocketVectorEuler", "Rotation", (0.0, 0.0, 0.0)), + ("NodeSocketVector", "Rotation", (0.0, 0.0, 0.0)), ("NodeSocketVector", "Hit Normal", (0.0, 0.0, 1.0)), ("NodeSocketVector", "Curve Tangent", (0.0, 0.0, 1.0)), ("NodeSocketBool", "Do Normal Rot", False), @@ -395,8 +395,8 @@ def nodegroup_attach_part(nw: NodeWrangler): ("NodeSocketGeometry", "Skin Mesh", None), ("NodeSocketGeometry", "Skeleton Curve", None), ("NodeSocketGeometry", "Geometry", None), - ("NodeSocketFloatFactor", "Length Fac", 0.0), - ("NodeSocketVectorEuler", "Ray Rot", (0.0, 0.0, 0.0)), + ("NodeSocketFloat", "Length Fac", 0.0), + ("NodeSocketVector", "Ray Rot", (0.0, 0.0, 0.0)), ("NodeSocketFloat", "Rad", 0.0), ("NodeSocketVector", "Part Rot", (0.0, 0.0, 0.0)), ("NodeSocketBool", "Do Normal Rot", False), diff --git a/infinigen/assets/utils/nodegroups/curve.py b/infinigen/assets/utils/nodegroups/curve.py index d57a0f46c..a01d0748d 100644 --- a/infinigen/assets/utils/nodegroups/curve.py +++ b/infinigen/assets/utils/nodegroups/curve.py @@ -425,7 +425,7 @@ def nodegroup_profile_part(nw: NodeWrangler): expose_input=[ ("NodeSocketGeometry", "Skeleton Curve", None), ("NodeSocketGeometry", "Profile Curve", None), - ("NodeSocketFloatDistance", "Radius Func", 1.0), + ("NodeSocketFloat", "Radius Func", 1.0), ], ) diff --git a/infinigen/assets/utils/nodegroups/geometry.py b/infinigen/assets/utils/nodegroups/geometry.py index 01cb99576..0129e213f 100644 --- a/infinigen/assets/utils/nodegroups/geometry.py +++ b/infinigen/assets/utils/nodegroups/geometry.py @@ -116,7 +116,7 @@ def nodegroup_solidify(nw: NodeWrangler): Nodes.GroupInput, expose_input=[ ("NodeSocketGeometry", "Mesh", None), - ("NodeSocketFloatDistance", "Distance", 0.0), + ("NodeSocketFloat", "Distance", 0.0), ], ) diff --git a/infinigen/core/init.py b/infinigen/core/init.py index f78bf83fc..2fa680cbe 100644 --- a/infinigen/core/init.py +++ b/infinigen/core/init.py @@ -20,6 +20,7 @@ from numpy.random import randint import infinigen +from infinigen.core.util import blender as butil from infinigen.core.util.logging import LogLevel from infinigen.core.util.math import int_hash from infinigen.core.util.organization import Task @@ -294,6 +295,20 @@ def configure_blender( bpy.context.scene.cycles.motion_blur_position = "START" bpy.context.scene.render.motion_blur_shutter = motion_blur_shutter - bpy.ops.preferences.addon_enable(module="add_mesh_extra_objects") - bpy.ops.preferences.addon_enable(module="real_snow") - bpy.ops.preferences.addon_enable(module="ant_landscape") + addons = ["extra_mesh_objects", "real_snow", "antlandscape"] + for addon in addons: + try: + with butil.Suppress(): + bpy.ops.extensions.package_mark_clear_all() + bpy.ops.extensions.package_mark_set(pkg_id=addon, repo_index=-1) + bpy.ops.extensions.package_enable_not_installed() + logger.info(f"Add-on {addon} enabled.") + except ValueError | RuntimeError: + with butil.Suppress(): + bpy.ops.extensions.userpref_allow_online() + logger.info(f"Installing Add-on {addon}.") + with butil.Suppress(): + bpy.ops.extensions.package_install( + repo_index=0, pkg_id=addon, enable_on_install=True + ) + logger.info(f"Add-on {addon} Installed.") diff --git a/infinigen/core/nodes/compatibility.py b/infinigen/core/nodes/compatibility.py index f0df2edb6..f8e1c7a3e 100644 --- a/infinigen/core/nodes/compatibility.py +++ b/infinigen/core/nodes/compatibility.py @@ -7,7 +7,7 @@ import logging from collections import OrderedDict -from .node_info import Nodes +from .node_info import DATATYPE_FIELDS, NODETYPE_TO_DATATYPE, Nodes logger = logging.getLogger(__name__) @@ -100,8 +100,96 @@ def compat_args_sample_curve(nw, orig_type, input_args, attrs, input_kwargs): ) +def compat_musgrave_texture(nw, orig_type, input_args, attrs, input_kwargs): + # https://docs.blender.org/manual/en/4.2/render/shader_nodes/textures/musgrave.html + old_names = [ + "Vector", + "W", + "Scale", + "Detail", + "Dimension", + "Lacunarity", + "Offset", + "Gain", + ] + default_values = {"Dimension": 2, "Lacunarity": 2, "Detail": 2} + for name, value in zip(old_names, input_args): + input_kwargs[name] = value + for name, value in default_values.items(): + if name not in input_kwargs: + input_kwargs[name] = value + # handle roughness + if nw.is_socket(input_kwargs["Dimension"]) or nw.is_socket( + input_kwargs["Lacunarity"] + ): + input_kwargs["Roughness"] = nw.math( + "POWER", + input_kwargs["Lacunarity"], + nw.scalar_sub(0, input_kwargs["Dimension"]), + ) + else: + input_kwargs["Roughness"] = input_kwargs["Lacunarity"] ** ( + -input_kwargs["Dimension"] + ) + input_kwargs.pop("Dimension") + # handle detail + if nw.is_socket(input_kwargs["Detail"]): + input_kwargs["Detail"] = nw.scalar_sub(input_kwargs["Detail"], 1) + else: + input_kwargs["Detail"] = input_kwargs["Detail"] - 1 + if "musgrave_dimensions" in attrs: + attrs["noise_dimensions"] = attrs.pop("musgrave_dimensions") + if "musgrave_type" in attrs: + attrs["noise_type"] = attrs.pop("musgrave_type") + return nw.new_node( + node_type=Nodes.NoiseTexture, + input_args=[], + attrs=attrs, + input_kwargs=input_kwargs, + compat_mode=False, + ) + + +def compat_capture_attribute(nw, orig_type, input_args, attrs, input_kwargs): + types = ["VECTOR", "VALUE", "RGBA", "BOOLEAN", "INT"] + data_type = None + if "data_type" in attrs: + data_type = attrs.pop("data_type") + if len(input_args) > 1: + j, i = next((j, i) for j, i in enumerate(input_args[1:]) if i is not None) + data_type = NODETYPE_TO_DATATYPE[types[j]] + input_kwargs[DATATYPE_FIELDS[NODETYPE_TO_DATATYPE[types[j]]]] = i + node = nw.new_node( + node_type=orig_type, + input_args=[], + attrs=attrs, + input_kwargs=input_kwargs, + compat_mode=False, + ) + if data_type is not None: + node.capture_items[0].data_type = data_type + return node + + +def compat_principled_bsdf(nw, orig_type, input_args, attrs, input_kwargs): + input_kwargs["Subsurface Scale"] = 1 + if "Subsurface Color" in input_kwargs: + logger.warning(f"Subsurface Color no longer in use for {orig_type}") + input_kwargs.pop("Subsurface Color") + return nw.new_node( + node_type=orig_type, + input_args=input_args, + attrs=attrs, + input_kwargs=input_kwargs, + compat_mode=False, + ) + + COMPATIBILITY_MAPPINGS = { Nodes.MixRGB: make_virtual_mixrgb, Nodes.TransferAttribute: make_virtual_transfer_attribute, Nodes.SampleCurve: compat_args_sample_curve, + Nodes.MusgraveTexture: compat_musgrave_texture, + Nodes.CaptureAttribute: compat_capture_attribute, + Nodes.PrincipledBSDF: compat_principled_bsdf, } diff --git a/infinigen/core/nodes/node_wrangler.py b/infinigen/core/nodes/node_wrangler.py index 34d08bf32..2fe90ffea 100644 --- a/infinigen/core/nodes/node_wrangler.py +++ b/infinigen/core/nodes/node_wrangler.py @@ -23,6 +23,7 @@ from infinigen.core.util.random import random_vector3 from .compatibility import COMPATIBILITY_MAPPINGS +from .utils import infer_input_socket, infer_output_socket logger = logging.getLogger(__name__) @@ -34,8 +35,12 @@ class NodeMisuseWarning(UserWarning): # This is for Blender 3.3 because of the nodetree change def geometry_node_group_empty_new(): group = bpy.data.node_groups.new("Geometry Nodes", "GeometryNodeTree") - group.inputs.new("NodeSocketGeometry", "Geometry") - group.outputs.new("NodeSocketGeometry", "Geometry") + group.interface.new_socket( + name="Geometry", in_out="INPUT", socket_type="NodeSocketGeometry" + ) + group.interface.new_socket( + name="Geometry", in_out="OUTPUT", socket_type="NodeSocketGeometry" + ) input_node = group.nodes.new("NodeGroupInput") output_node = group.nodes.new("NodeGroupOutput") output_node.is_active_output = True @@ -67,74 +72,6 @@ def warn_with_traceback(message, category, filename, lineno, file=None, line=Non log.write(warnings.formatwarning(message, category, filename, lineno, line)) -def isnode(x): - return isinstance( - x, (bpy.types.ShaderNode, bpy.types.NodeInternal, bpy.types.GeometryNode) - ) - - -def infer_output_socket(item): - """ - Figure out if `item` somehow represents a node with an output we can use. - If so, return that output socket - """ - - if isinstance(item, bpy.types.NodeSocket): - res = item - elif isnode(item): - # take the first active socket - try: - res = next(o for o in item.outputs if o.enabled) - except StopIteration: - raise ValueError( - f"Attempted to get output socket for {item} but none are enabled!" - ) - elif isinstance(item, tuple) and isnode(item[0]): - node, socket_name = item - if isinstance(socket_name, int): - return node.outputs[socket_name] - try: - res = next(o for o in node.outputs if o.enabled and o.name == socket_name) - except StopIteration: - raise ValueError( - f"Couldnt find an enabled socket on {node} corresponding to requested tuple {item}" - ) - else: - return None - - if not res.enabled: - raise ValueError( - f"Attempted to use output socket {res} of node {res.node} which is not enabled. " - "Please check your attrs are correct, or be more specific about the socket to use" - ) - - return res - - -def infer_input_socket(node, input_socket_name): - if isinstance(input_socket_name, str): - try: - input_socket = next( - i for i in node.inputs if i.name == input_socket_name and i.enabled - ) - except StopIteration: - input_socket = node.inputs[input_socket_name] - else: - input_socket = node.inputs[input_socket_name] - - if not input_socket.enabled: - logger.warning( - f'Attempted to use ({input_socket.name=},{input_socket.type=}) of {node.name=}, but it was ' - f'disabled. Either change attrs={{...}}, ' - f'change the socket index, or specify the socket by name (assuming two enabled sockets don\'t ' - f'share a name).' - f'The input sockets are ' - f'{[(i.name, i.type, ("ENABLED" if i.enabled else "DISABLED")) for i in node.inputs]}.', - ) - - return input_socket - - class NodeWrangler: def __init__(self, node_group): if issubclass(type(node_group), bpy.types.NodeTree): @@ -238,7 +175,9 @@ def new_node( ), "Multi-input sockets to GroupOutput nodes are impossible" if input_socket_name not in node.inputs: nodeclass = infer_output_socket(input_item).bl_idname - self.node_group.outputs.new(nodeclass, input_socket_name) + self.node_group.interface.new_socket( + name=input_socket_name, in_out="OUTPUT", socket_type=nodeclass + ) assert ( input_socket_name in node.inputs and node.inputs[input_socket_name].enabled @@ -286,13 +225,18 @@ def expose_input( group_input = self.new_node(Nodes.GroupInput) # will reuse singleton - if name in self.node_group.inputs: + if any( + s.name == name and s.in_out == "INPUT" + for s in self.node_group.interface.items_tree + ): assert len([o for o in group_input.outputs if o.name == name]) == 1 return group_input.outputs[name] # Infer from args what type of node input to make (NodeSocketFloat / NodeSocketVector / etc) nodeclass = self._infer_nodeclass_from_args(dtype, val) - inp = self.node_group.inputs.new(nodeclass, name) + inp = self.node_group.interface.new_socket( + name, in_out="INPUT", socket_type=nodeclass + ) def prepare_cast(to_type, val): # cast val only when necessary, and only when type(val) wont crash diff --git a/infinigen/core/nodes/utils.py b/infinigen/core/nodes/utils.py new file mode 100644 index 000000000..f1a32c62e --- /dev/null +++ b/infinigen/core/nodes/utils.py @@ -0,0 +1,81 @@ +import logging + +import bpy + +from infinigen.core.nodes import Nodes + +logger = logging.getLogger(__name__) + + +def infer_output_socket(item): + """ + Figure out if `item` somehow represents a node with an output we can use. + If so, return that output socket + """ + + if isinstance(item, bpy.types.NodeSocket): + res = item + elif isnode(item): + # take the first active socket + try: + res = next(o for o in item.outputs if o.enabled) + except StopIteration: + raise ValueError( + f"Attempted to get output socket for {item} but none are enabled!" + ) + elif isinstance(item, tuple) and isnode(item[0]): + node, socket_name = item + if isinstance(socket_name, int): + return node.outputs[socket_name] + try: + res = next(o for o in node.outputs if o.enabled and o.name == socket_name) + except StopIteration: + raise ValueError( + f"Couldnt find an enabled socket on {node} corresponding to requested tuple {item}" + ) + else: + return None + + if not res.enabled: + raise ValueError( + f"Attempted to use output socket {res} of node {res.node} which is not enabled. " + "Please check your attrs are correct, or be more specific about the socket to use" + ) + + return res + + +def infer_input_socket(node, input_socket_name): + if ( + node.bl_idname == Nodes.CaptureAttribute + and input_socket_name != 0 + and input_socket_name != "Geometry" + ): + node.capture_items.new("FLOAT", name="Attribute") + if isinstance(input_socket_name, str): + try: + input_socket = next( + i for i in node.inputs if i.name == input_socket_name and i.enabled + ) + except StopIteration: + input_socket = node.inputs[input_socket_name] + else: + input_socket = node.inputs[input_socket_name] + + if not input_socket.enabled: + logger.warning( + f'Attempted to use ({input_socket.name=},{input_socket.type=}) of {node.name=}, but it was ' + f'disabled. Either change attrs={{...}}, ' + f'change the socket index, or specify the socket by name (assuming two enabled sockets don\'t ' + f'share a name).' + f'The input sockets are ' + f'{[(i.name, i.type, ("ENABLED" if i.enabled else "DISABLED")) for i in node.inputs]}.', + ) + + return input_socket + + +def isnode(x): + return isinstance( + x, (bpy.types.ShaderNode, bpy.types.NodeInternal, bpy.types.GeometryNode) + ) diff --git a/infinigen/core/surface.py b/infinigen/core/surface.py index 49c244667..b7e3d56b0 100644 --- a/infinigen/core/surface.py +++ b/infinigen/core/surface.py @@ -24,9 +24,8 @@ Nodes, NodeWrangler, geometry_node_group_empty_new, - infer_output_socket, - isnode, ) +from infinigen.core.nodes.utils import infer_output_socket, isnode from infinigen.core.util import blender as butil @@ -391,11 +390,13 @@ def add_geomod( else: mod.node_group = ng - outputs = mod.node_group.outputs + outputs = [ + s for s in mod.node_group.interface.items_tree if s.in_out == "OUTPUT" + ] identifiers = [ outputs[i].identifier for i in range(len(outputs)) - if outputs[i].type != "GEOMETRY" + if outputs[i].socket_type != "NodeSocketGeometry" ] if len(identifiers) != len(attributes): raise Exception( @@ -406,11 +407,15 @@ def add_geomod( # attributes are a 1-indexed list, and Geometry is the first element, so we start from 2 # while f'Output_{i}_attribute_name' not in mod[id + "_attribute_name"] = att_name - os = [outputs[i] for i in range(len(outputs)) if outputs[i].type != "GEOMETRY"] + os = [ + outputs[i] + for i in range(len(outputs)) + if outputs[i].socket_type != "NodeSocketGeometry" + ] for o, domain in zip(os, domains): o.attribute_domain = domain - inputs = mod.node_group.inputs + inputs = [s for s in mod.node_group.interface.items_tree if s.in_out == "INPUT"] if not any(att_name is None for att_name in input_attributes): raise Exception("None should be provided for Geometry inputs.") for i, att_name in zip(inputs, input_attributes): diff --git a/infinigen/tools/export.py b/infinigen/tools/export.py index 654eb863f..040c47b9b 100644 --- a/infinigen/tools/export.py +++ b/infinigen/tools/export.py @@ -19,7 +19,7 @@ BAKE_TYPES = { "DIFFUSE": "Base Color", "ROUGHNESS": "Roughness", -} # 'EMIT':'Emission' # "GLOSSY": 'Specular', 'TRANSMISSION':'Transmission' don't export +} # 'EMIT':'Emission' # "GLOSSY": 'Specular IOR Level', 'TRANSMISSION':'Transmission Weight' don't export SPECIAL_BAKE = {"METAL": "Metallic", "NORMAL": "Normal"} ALL_BAKE = BAKE_TYPES | SPECIAL_BAKE @@ -360,12 +360,12 @@ def apply_baked_tex(obj, paramDict={}): principled_bsdf_node.inputs["Metallic"].default_value = paramDict[mat.name][ "Metallic" ] - principled_bsdf_node.inputs["Sheen"].default_value = paramDict[mat.name][ - "Sheen" - ] - principled_bsdf_node.inputs["Clearcoat"].default_value = paramDict[ + principled_bsdf_node.inputs["Sheen Weight"].default_value = paramDict[ + mat.name + ]["Sheen Weight"] + principled_bsdf_node.inputs["Coat Weight"].default_value = paramDict[ mat.name - ]["Clearcoat"] + ]["Coat Weight"] def create_glass_shader(node_tree, export_usd): @@ -387,7 +387,7 @@ def create_glass_shader(node_tree, export_usd): else: principled_bsdf_node.inputs["Roughness"].default_value = 0 - principled_bsdf_node.inputs["Transmission"].default_value = 1 + principled_bsdf_node.inputs["Transmission Weight"].default_value = 1 if export_usd: principled_bsdf_node.inputs["Alpha"].default_value = 0 node_tree.links.new( @@ -560,16 +560,16 @@ def remove_params(mat, node_tree): metal = principled_bsdf_node.inputs[ "Metallic" ].default_value # store metallic value and set to 0 - sheen = principled_bsdf_node.inputs["Sheen"].default_value - clearcoat = principled_bsdf_node.inputs["Clearcoat"].default_value + sheen = principled_bsdf_node.inputs["Sheen Weight"].default_value + clearcoat = principled_bsdf_node.inputs["Coat Weight"].default_value paramDict[mat.name] = { "Metallic": metal, - "Sheen": sheen, - "Clearcoat": clearcoat, + "Sheen Weight": sheen, + "Coat Weight": clearcoat, } principled_bsdf_node.inputs["Metallic"].default_value = 0 - principled_bsdf_node.inputs["Sheen"].default_value = 0 - principled_bsdf_node.inputs["Clearcoat"].default_value = 0 + principled_bsdf_node.inputs["Sheen Weight"].default_value = 0 + principled_bsdf_node.inputs["Coat Weight"].default_value = 0 return paramDict for node in nodes: