kkkkiiii commited on
Commit
b2795da
·
verified ·
1 Parent(s): b72357c

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +2 -0
  2. InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/__init__.cpython-310.pyc +0 -0
  3. InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/coarse_knit_fabric.cpython-310.pyc +0 -0
  4. InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/fabric_random.cpython-310.pyc +0 -0
  5. InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/fine_knit_fabric.cpython-310.pyc +0 -0
  6. InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/general_fabric.cpython-310.pyc +0 -0
  7. InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/leather.cpython-310.pyc +0 -0
  8. InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/lined_fabric.cpython-310.pyc +0 -0
  9. InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/sofa_fabric.cpython-310.pyc +0 -0
  10. InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/velvet.cpython-310.pyc +0 -0
  11. InternScenes/InternScenes_Real2Sim/materials/metal/__init__.py +92 -0
  12. InternScenes/InternScenes_Real2Sim/materials/metal/__pycache__/__init__.cpython-310.pyc +0 -0
  13. InternScenes/InternScenes_Real2Sim/materials/metal/__pycache__/brushed_metal.cpython-310.pyc +0 -0
  14. InternScenes/InternScenes_Real2Sim/materials/metal/__pycache__/galvanized_metal.cpython-310.pyc +0 -0
  15. InternScenes/InternScenes_Real2Sim/materials/metal/__pycache__/grained_and_polished_metal.cpython-310.pyc +0 -0
  16. InternScenes/InternScenes_Real2Sim/materials/metal/__pycache__/hammered_metal.cpython-310.pyc +0 -0
  17. InternScenes/InternScenes_Real2Sim/materials/metal/__pycache__/metal_basic.cpython-310.pyc +0 -0
  18. InternScenes/InternScenes_Real2Sim/materials/metal/brushed_metal.py +169 -0
  19. InternScenes/InternScenes_Real2Sim/materials/metal/galvanized_metal.py +122 -0
  20. InternScenes/InternScenes_Real2Sim/materials/metal/grained_and_polished_metal.py +127 -0
  21. InternScenes/InternScenes_Real2Sim/materials/metal/hammered_metal.py +153 -0
  22. InternScenes/InternScenes_Real2Sim/materials/plastics/__pycache__/plastic_rough.cpython-310.pyc +0 -0
  23. InternScenes/InternScenes_Real2Sim/materials/plastics/__pycache__/plastic_translucent.cpython-310.pyc +0 -0
  24. InternScenes/InternScenes_Real2Sim/materials/stone_and_concrete/__pycache__/concrete.cpython-310.pyc +0 -0
  25. InternScenes/InternScenes_Real2Sim/materials/stone_and_concrete/concrete.py +486 -0
  26. InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/advanced_tiles.cpython-310.pyc +0 -0
  27. InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/basket_weave.cpython-310.pyc +0 -0
  28. InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/brick.cpython-310.pyc +0 -0
  29. InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/cheveron.cpython-310.pyc +0 -0
  30. InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/diamond.cpython-310.pyc +0 -0
  31. InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/herringbone.cpython-310.pyc +0 -0
  32. InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/hexagon.cpython-310.pyc +0 -0
  33. InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/shell.cpython-310.pyc +0 -0
  34. InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/spanish_bound.cpython-310.pyc +0 -0
  35. InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/star.cpython-310.pyc +0 -0
  36. InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/triangle.cpython-310.pyc +0 -0
  37. InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/utils.cpython-310.pyc +0 -0
  38. InternScenes/InternScenes_Real2Sim/materials/tiles/cheveron.py +209 -0
  39. InternScenes/InternScenes_Real2Sim/materials/tiles/diamond.py +441 -0
  40. InternScenes/InternScenes_Real2Sim/materials/tiles/herringbone.py +350 -0
  41. InternScenes/InternScenes_Real2Sim/materials/tiles/hexagon.py +424 -0
  42. InternScenes/InternScenes_Real2Sim/materials/tiles/triangle.py +379 -0
  43. InternScenes/InternScenes_Real2Sim/materials/utils/__pycache__/__init__.cpython-310.pyc +0 -0
  44. InternScenes/InternScenes_Real2Sim/materials/utils/__pycache__/surface_utils.cpython-310.pyc +0 -0
  45. InternScenes/InternScenes_Real2Sim/materials/wear_tear/__pycache__/procedural_edge_wear.cpython-310.pyc +0 -0
  46. InternScenes/InternScenes_Real2Sim/materials/wear_tear/__pycache__/procedural_scratch.cpython-310.pyc +0 -0
  47. InternScenes/InternScenes_Real2Sim/materials/woods/__pycache__/composite_wood_tile.cpython-310.pyc +0 -0
  48. InternScenes/InternScenes_Real2Sim/materials/woods/__pycache__/crossed_wood_tile.cpython-310.pyc +0 -0
  49. InternScenes/InternScenes_Real2Sim/materials/woods/__pycache__/hexagon_wood_tile.cpython-310.pyc +0 -0
  50. InternScenes/InternScenes_Real2Sim/materials/woods/__pycache__/non_wood_tile.cpython-310.pyc +0 -0
.gitattributes CHANGED
@@ -62,3 +62,5 @@ InternScenes/InternScenes_Real2Sim/textures/Marble012_1K-JPG.blend filter=lfs di
62
  InternScenes/InternScenes_Real2Sim/textures/WoodFloor051_1K-JPG.blend filter=lfs diff=lfs merge=lfs -text
63
  InternScenes/InternScenes_Real2Sim/textures/WoodFloor043_1K-JPG.blend filter=lfs diff=lfs merge=lfs -text
64
  InternScenes/InternScenes_Real2Sim/textures/Tiles099_1K-JPG.blend filter=lfs diff=lfs merge=lfs -text
 
 
 
62
  InternScenes/InternScenes_Real2Sim/textures/WoodFloor051_1K-JPG.blend filter=lfs diff=lfs merge=lfs -text
63
  InternScenes/InternScenes_Real2Sim/textures/WoodFloor043_1K-JPG.blend filter=lfs diff=lfs merge=lfs -text
64
  InternScenes/InternScenes_Real2Sim/textures/Tiles099_1K-JPG.blend filter=lfs diff=lfs merge=lfs -text
65
+ InternScenes/InternScenes_Real2Sim/textures/Tiles074_1K-JPG.blend filter=lfs diff=lfs merge=lfs -text
66
+ InternScenes/InternScenes_Real2Sim/textures/Bricks076A_1K-JPG.blend filter=lfs diff=lfs merge=lfs -text
InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (562 Bytes). View file
 
InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/coarse_knit_fabric.cpython-310.pyc ADDED
Binary file (4.4 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/fabric_random.cpython-310.pyc ADDED
Binary file (889 Bytes). View file
 
InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/fine_knit_fabric.cpython-310.pyc ADDED
Binary file (3.06 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/general_fabric.cpython-310.pyc ADDED
Binary file (3.94 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/leather.cpython-310.pyc ADDED
Binary file (3.58 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/lined_fabric.cpython-310.pyc ADDED
Binary file (3.15 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/sofa_fabric.cpython-310.pyc ADDED
Binary file (1.77 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/fabrics/__pycache__/velvet.cpython-310.pyc ADDED
Binary file (2.86 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/metal/__init__.py ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2023, Princeton University.
2
+ # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree.
3
+
4
+ # Authors: Lingjie Mei
5
+ from collections.abc import Iterable
6
+
7
+ import numpy as np
8
+ from numpy.random import uniform
9
+
10
+ from infinigen.assets.materials import common
11
+ from infinigen.assets.materials.bark_random import hex_to_rgb
12
+ from infinigen.core.util.color import hsv2rgba, rgb2hsv
13
+ from infinigen.core.util.random import log_uniform
14
+ from infinigen.core.util.random import random_general as rg
15
+
16
+ from . import (
17
+ brushed_metal,
18
+ galvanized_metal,
19
+ grained_and_polished_metal,
20
+ hammered_metal,
21
+ metal_basic,
22
+ )
23
+
24
+
25
+ def apply(obj, selection=None, metal_color=None, **kwargs):
26
+ color = sample_metal_color(metal_color)
27
+ shader = get_shader()
28
+ common.apply(obj, shader, selection, base_color=color, **kwargs)
29
+
30
+
31
+ def get_shader():
32
+ return np.random.choice(
33
+ [
34
+ brushed_metal.shader_brushed_metal,
35
+ galvanized_metal.shader_galvanized_metal,
36
+ grained_and_polished_metal.shader_grained_metal,
37
+ hammered_metal.shader_hammered_metal,
38
+ ]
39
+ )
40
+
41
+
42
+ plain_colors = (
43
+ "weighted_choice",
44
+ (0.5, 0xFDD017),
45
+ (1, 0xC0C0C0),
46
+ (1, 0x8C7853),
47
+ (0.5, 0xB87333),
48
+ (0.5, 0xB5A642),
49
+ (1, 0xBDBAAE),
50
+ (1, 0xA9ACB6),
51
+ (1, 0xB6AFA9),
52
+ )
53
+ natural_colors = (
54
+ "weighted_choice",
55
+ (1, 0xC0C0C0),
56
+ (1, 0x8C7853),
57
+ (1, 0xBDBAAE),
58
+ (1, 0xA9ACB6),
59
+ (1, 0xB6AFA9),
60
+ )
61
+
62
+
63
+ def sample_metal_color(metal_color=None, **kwargs):
64
+ match metal_color:
65
+ case np.ndarray():
66
+ return metal_color
67
+ case "plain":
68
+ h, s, v = rgb2hsv(hex_to_rgb(rg(plain_colors))[:-1])
69
+ return hsv2rgba(
70
+ h + uniform(-0.1, 0.1),
71
+ s + uniform(-0.1, 0.1),
72
+ v * log_uniform(0.5, 0.2),
73
+ )
74
+ case "natural":
75
+ h, s, v = rgb2hsv(hex_to_rgb(rg(natural_colors))[:-1])
76
+ return hsv2rgba(
77
+ h + uniform(-0.1, 0.1),
78
+ s + uniform(-0.1, 0.1),
79
+ v * log_uniform(0.5, 0.2),
80
+ )
81
+ case "bw":
82
+ return hsv2rgba(uniform(0, 1), uniform(0.0, 0.2), log_uniform(0.01, 0.2))
83
+ case "bw+natural":
84
+ return (
85
+ sample_metal_color("bw")
86
+ if uniform() < 0.5
87
+ else sample_metal_color("natural")
88
+ )
89
+ case _:
90
+ if uniform() < 0.2:
91
+ return sample_metal_color("natural")
92
+ return hsv2rgba(uniform(0, 1), uniform(0.3, 0.6), log_uniform(0.02, 0.5))
InternScenes/InternScenes_Real2Sim/materials/metal/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (2.13 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/metal/__pycache__/brushed_metal.cpython-310.pyc ADDED
Binary file (3 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/metal/__pycache__/galvanized_metal.cpython-310.pyc ADDED
Binary file (2.6 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/metal/__pycache__/grained_and_polished_metal.cpython-310.pyc ADDED
Binary file (2.64 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/metal/__pycache__/hammered_metal.cpython-310.pyc ADDED
Binary file (2.99 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/metal/__pycache__/metal_basic.cpython-310.pyc ADDED
Binary file (1.28 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/metal/brushed_metal.py ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2024, Princeton University.
2
+ # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree.
3
+
4
+ # Authors: Yiming Zuo
5
+ # Acknowledgement: This file draws inspiration https://www.youtube.com/watch?v=QcAMYRgR03k by blenderian
6
+
7
+
8
+ from numpy.random import uniform
9
+
10
+ from infinigen.core import surface
11
+ from infinigen.core.nodes import node_utils
12
+ from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler
13
+
14
+
15
+ @node_utils.to_nodegroup(
16
+ "nodegroup_brushed_metal", singleton=False, type="ShaderNodeTree"
17
+ )
18
+ def nodegroup_brushed_metal(nw: NodeWrangler):
19
+ # Code generated using version 2.6.4 of the node_transpiler
20
+
21
+ texture_coordinate = nw.new_node(Nodes.TextureCoord)
22
+
23
+ mapping_1 = nw.new_node(
24
+ Nodes.Mapping,
25
+ input_kwargs={
26
+ "Vector": texture_coordinate.outputs["Object"],
27
+ "Scale": (0.2000, 0.2000, 5.0000),
28
+ },
29
+ )
30
+
31
+ group_input = nw.new_node(
32
+ Nodes.GroupInput,
33
+ expose_input=[
34
+ ("NodeSocketColor", "Base Color", (0.8000, 0.8000, 0.8000, 1.0000)),
35
+ ("NodeSocketFloat", "Scale", 0.0000),
36
+ ("NodeSocketFloat", "Seed", 0.0000),
37
+ ],
38
+ )
39
+
40
+ multiply = nw.new_node(
41
+ Nodes.Math,
42
+ input_kwargs={0: group_input.outputs["Scale"], 1: 100.0000},
43
+ attrs={"operation": "MULTIPLY"},
44
+ )
45
+
46
+ noise_texture_2 = nw.new_node(
47
+ Nodes.NoiseTexture,
48
+ input_kwargs={
49
+ "Vector": mapping_1,
50
+ "W": group_input.outputs["Seed"],
51
+ "Scale": multiply,
52
+ "Detail": 15.0000,
53
+ "Roughness": 0.4000,
54
+ "Distortion": 0.1000,
55
+ },
56
+ attrs={"noise_dimensions": "4D"},
57
+ )
58
+
59
+ mapping = nw.new_node(
60
+ Nodes.Mapping,
61
+ input_kwargs={
62
+ "Vector": texture_coordinate.outputs["Object"],
63
+ "Scale": (1.0000, 1.0000, 20.0000),
64
+ },
65
+ )
66
+
67
+ noise_texture_1 = nw.new_node(
68
+ Nodes.NoiseTexture,
69
+ input_kwargs={
70
+ "Vector": texture_coordinate.outputs["Object"],
71
+ "W": group_input.outputs["Seed"],
72
+ "Scale": 0.1000,
73
+ "Detail": 15.0000,
74
+ "Roughness": 0.0000,
75
+ },
76
+ attrs={"noise_dimensions": "4D"},
77
+ )
78
+
79
+ mix = nw.new_node(
80
+ Nodes.Mix,
81
+ input_kwargs={0: 0.2000, 6: mapping, 7: noise_texture_1.outputs["Color"]},
82
+ attrs={"data_type": "RGBA"},
83
+ )
84
+
85
+ noise_texture = nw.new_node(
86
+ Nodes.NoiseTexture,
87
+ input_kwargs={
88
+ "Vector": mix.outputs[2],
89
+ "W": group_input.outputs["Seed"],
90
+ "Scale": multiply,
91
+ "Detail": 15.0000,
92
+ "Roughness": 0.6000,
93
+ "Distortion": 0.1000,
94
+ },
95
+ attrs={"noise_dimensions": "4D"},
96
+ )
97
+
98
+ mix_1 = nw.new_node(
99
+ Nodes.Mix,
100
+ input_kwargs={
101
+ 0: 1.0000,
102
+ 6: noise_texture_2.outputs["Fac"],
103
+ 7: noise_texture.outputs["Fac"],
104
+ },
105
+ attrs={"blend_type": "DARKEN", "data_type": "RGBA"},
106
+ )
107
+
108
+ map_range = nw.new_node(
109
+ Nodes.MapRange,
110
+ input_kwargs={"Value": mix_1, 1: 0.4000, 2: 0.6000, 3: 0.8000, 4: 1.2000},
111
+ )
112
+
113
+ hue_saturation_value = nw.new_node(
114
+ "ShaderNodeHueSaturation",
115
+ input_kwargs={
116
+ "Value": map_range.outputs["Result"],
117
+ "Color": group_input.outputs["Base Color"],
118
+ },
119
+ )
120
+
121
+ map_range_1 = nw.new_node(
122
+ Nodes.MapRange,
123
+ input_kwargs={"Value": mix_1, 1: 0.4000, 2: 0.6000, 3: 0.2000, 4: 0.3000},
124
+ )
125
+
126
+ principled_bsdf = nw.new_node(
127
+ Nodes.PrincipledBSDF,
128
+ input_kwargs={
129
+ "Base Color": hue_saturation_value,
130
+ "Metallic": 1.0000,
131
+ "Specular": 0.0000,
132
+ "Roughness": map_range_1.outputs["Result"],
133
+ },
134
+ )
135
+
136
+ group_output = nw.new_node(
137
+ Nodes.GroupOutput,
138
+ input_kwargs={"BSDF": principled_bsdf, "tmp_viewer": principled_bsdf},
139
+ attrs={"is_active_output": True},
140
+ )
141
+
142
+
143
+ def shader_brushed_metal(
144
+ nw: NodeWrangler, scale=1.0, base_color=None, seed=None, **kwargs
145
+ ):
146
+ # Code generated using version 2.6.4 of the node_transpiler
147
+ if seed is None:
148
+ seed = uniform(-1000.0, 1000.0)
149
+ if base_color is None:
150
+ from infinigen.assets.materials.metal import sample_metal_color
151
+
152
+ base_color = sample_metal_color(**kwargs)
153
+
154
+ group = nw.new_node(
155
+ nodegroup_brushed_metal().name,
156
+ input_kwargs={"Base Color": base_color, "Scale": scale, "Seed": seed},
157
+ )
158
+
159
+ material_output = nw.new_node(
160
+ Nodes.MaterialOutput,
161
+ input_kwargs={"Surface": group.outputs["BSDF"]},
162
+ attrs={"is_active_output": True},
163
+ )
164
+
165
+
166
+ def apply(obj, selection=None, **kwargs):
167
+ surface.add_material(
168
+ obj, shader_brushed_metal, selection=selection, input_kwargs=kwargs
169
+ )
InternScenes/InternScenes_Real2Sim/materials/metal/galvanized_metal.py ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2024, Princeton University.
2
+ # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree.
3
+
4
+ # Authors: Yiming Zuo
5
+ # Acknowledgement: This file draws inspiration https://www.youtube.com/watch?v=ECl2pQ1jQm8 by Ryan King Art
6
+
7
+ from numpy.random import uniform
8
+
9
+ from infinigen.assets.materials import common
10
+ from infinigen.core.nodes import node_utils
11
+ from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler
12
+
13
+
14
+ @node_utils.to_nodegroup(
15
+ "nodegroup_galvanized_metal", singleton=False, type="ShaderNodeTree"
16
+ )
17
+ def nodegroup_galvanized_metal(nw: NodeWrangler):
18
+ # Code generated using version 2.6.4 of the node_transpiler
19
+
20
+ group_input = nw.new_node(
21
+ Nodes.GroupInput,
22
+ expose_input=[
23
+ ("NodeSocketColor", "Base Color", (0.8000, 0.8000, 0.8000, 1.0000)),
24
+ ("NodeSocketFloat", "Scale", 0.0000),
25
+ ("NodeSocketFloat", "Seed", 0.0000),
26
+ ],
27
+ )
28
+
29
+ texture_coordinate = nw.new_node(Nodes.TextureCoord)
30
+
31
+ multiply = nw.new_node(
32
+ Nodes.Math,
33
+ input_kwargs={0: group_input.outputs["Scale"], 1: 5.0000},
34
+ attrs={"operation": "MULTIPLY"},
35
+ )
36
+
37
+ noise_texture = nw.new_node(
38
+ Nodes.NoiseTexture,
39
+ input_kwargs={
40
+ "Vector": texture_coordinate.outputs["Object"],
41
+ "W": group_input.outputs["Seed"],
42
+ "Scale": multiply,
43
+ "Detail": 15.0000,
44
+ "Roughness": 0.4000,
45
+ "Distortion": 0.2000,
46
+ },
47
+ attrs={"noise_dimensions": "4D"},
48
+ )
49
+
50
+ mix = nw.new_node(
51
+ Nodes.Mix,
52
+ input_kwargs={
53
+ 0: 0.0500,
54
+ 6: texture_coordinate.outputs["Object"],
55
+ 7: noise_texture.outputs["Color"],
56
+ },
57
+ attrs={"clamp_factor": False, "data_type": "RGBA"},
58
+ )
59
+
60
+ multiply_1 = nw.new_node(
61
+ Nodes.Math,
62
+ input_kwargs={0: group_input.outputs["Scale"], 1: 500.0000},
63
+ attrs={"operation": "MULTIPLY"},
64
+ )
65
+
66
+ voronoi_texture = nw.new_node(
67
+ Nodes.VoronoiTexture,
68
+ input_kwargs={
69
+ "Vector": mix.outputs[2],
70
+ "W": group_input.outputs["Seed"],
71
+ "Scale": multiply_1,
72
+ },
73
+ attrs={"distance": "MINKOWSKI", "voronoi_dimensions": "4D"},
74
+ )
75
+
76
+ map_range = nw.new_node(
77
+ Nodes.MapRange,
78
+ input_kwargs={"Value": voronoi_texture.outputs["Color"], 3: 0.1000, 4: 0.5000},
79
+ )
80
+
81
+ principled_bsdf = nw.new_node(
82
+ Nodes.PrincipledBSDF,
83
+ input_kwargs={
84
+ "Base Color": group_input.outputs["Base Color"],
85
+ "Metallic": 1.0000,
86
+ "Specular": 0.0000,
87
+ "Roughness": map_range.outputs["Result"],
88
+ },
89
+ )
90
+
91
+ group_output = nw.new_node(
92
+ Nodes.GroupOutput,
93
+ input_kwargs={"BSDF": principled_bsdf},
94
+ attrs={"is_active_output": True},
95
+ )
96
+
97
+
98
+ def shader_galvanized_metal(
99
+ nw: NodeWrangler, scale=1.0, base_color=None, seed=None, **kwargs
100
+ ):
101
+ # Code generated using version 2.6.4 of the node_transpiler
102
+ if seed is None:
103
+ seed = uniform(-1000.0, 1000.0)
104
+ if base_color is None:
105
+ from infinigen.assets.materials.metal import sample_metal_color
106
+
107
+ base_color = sample_metal_color(**kwargs)
108
+
109
+ group = nw.new_node(
110
+ nodegroup_galvanized_metal().name,
111
+ input_kwargs={"Base Color": base_color, "Scale": scale, "Seed": seed},
112
+ )
113
+
114
+ material_output = nw.new_node(
115
+ Nodes.MaterialOutput,
116
+ input_kwargs={"Surface": group},
117
+ attrs={"is_active_output": True},
118
+ )
119
+
120
+
121
+ def apply(obj, selection=None, **kwargs):
122
+ common.apply(obj, shader_galvanized_metal, selection=selection, **kwargs)
InternScenes/InternScenes_Real2Sim/materials/metal/grained_and_polished_metal.py ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2024, Princeton University.
2
+ # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree.
3
+
4
+ # Authors: Yiming Zuo
5
+
6
+ from numpy.random import uniform
7
+
8
+ from infinigen.core import surface
9
+ from infinigen.core.nodes import node_utils
10
+ from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler
11
+
12
+
13
+ @node_utils.to_nodegroup(
14
+ "nodegroup_grained_metal", singleton=False, type="ShaderNodeTree"
15
+ )
16
+ def nodegroup_grained_metal(nw: NodeWrangler):
17
+ # Code generated using version 2.6.4 of the node_transpiler
18
+
19
+ group_input = nw.new_node(
20
+ Nodes.GroupInput,
21
+ expose_input=[
22
+ ("NodeSocketColor", "Base Color", (0.8000, 0.8000, 0.8000, 1.0000)),
23
+ ("NodeSocketFloat", "Scale", 5.0000),
24
+ ("NodeSocketFloat", "Seed", 0.0000),
25
+ ("NodeSocketFloat", "Roughness", 0.0000),
26
+ ],
27
+ )
28
+
29
+ map_range = nw.new_node(
30
+ Nodes.MapRange,
31
+ input_kwargs={"Value": group_input.outputs["Roughness"], 3: 0.0500, 4: 0.2500},
32
+ )
33
+
34
+ principled_bsdf = nw.new_node(
35
+ Nodes.PrincipledBSDF,
36
+ input_kwargs={
37
+ "Base Color": group_input.outputs["Base Color"],
38
+ "Metallic": 1.0000,
39
+ "Specular": 0.0000,
40
+ "Roughness": map_range.outputs["Result"],
41
+ },
42
+ )
43
+
44
+ texture_coordinate = nw.new_node(Nodes.TextureCoord)
45
+
46
+ multiply = nw.new_node(
47
+ Nodes.Math,
48
+ input_kwargs={0: group_input.outputs["Scale"], 1: 2000.0000},
49
+ attrs={"operation": "MULTIPLY"},
50
+ )
51
+
52
+ noise_texture = nw.new_node(
53
+ Nodes.NoiseTexture,
54
+ input_kwargs={
55
+ "Vector": texture_coordinate.outputs["Object"],
56
+ "W": group_input.outputs["Seed"],
57
+ "Scale": multiply,
58
+ "Detail": 15.0000,
59
+ "Distortion": 2.0000,
60
+ },
61
+ attrs={"noise_dimensions": "4D"},
62
+ )
63
+
64
+ multiply_1 = nw.new_node(
65
+ Nodes.Math,
66
+ input_kwargs={0: map_range.outputs["Result"], 1: 0.4000},
67
+ attrs={"operation": "MULTIPLY"},
68
+ )
69
+
70
+ multiply_2 = nw.new_node(
71
+ Nodes.Math,
72
+ input_kwargs={0: noise_texture.outputs["Fac"], 1: multiply_1},
73
+ attrs={"operation": "MULTIPLY"},
74
+ )
75
+
76
+ multiply_3 = nw.new_node(
77
+ Nodes.Math,
78
+ input_kwargs={0: multiply_2, 1: 0.010},
79
+ attrs={"operation": "MULTIPLY"},
80
+ )
81
+
82
+ group_output = nw.new_node(
83
+ Nodes.GroupOutput,
84
+ input_kwargs={"BSDF": principled_bsdf, "Displacement": multiply_3},
85
+ attrs={"is_active_output": True},
86
+ )
87
+
88
+
89
+ def shader_grained_metal(
90
+ nw: NodeWrangler, scale=1.0, base_color=None, roughness=None, seed=None, **kwargs
91
+ ):
92
+ # Code generated using version 2.6.4 of the node_transpiler
93
+ if roughness is None:
94
+ roughness = uniform(0.0, 1.0)
95
+ if seed is None:
96
+ seed = uniform(-1000.0, 1000.0)
97
+ if base_color is None:
98
+ from infinigen.assets.materials.metal import sample_metal_color
99
+
100
+ base_color = sample_metal_color(**kwargs)
101
+
102
+ group = nw.new_node(
103
+ nodegroup_grained_metal().name,
104
+ input_kwargs={
105
+ "Base Color": base_color,
106
+ "Scale": scale,
107
+ "Seed": seed,
108
+ "Roughness": roughness,
109
+ },
110
+ )
111
+
112
+ displacement = nw.new_node(
113
+ "ShaderNodeDisplacement",
114
+ input_kwargs={"Height": group.outputs["Displacement"], "Midlevel": 0.0000},
115
+ )
116
+
117
+ material_output = nw.new_node(
118
+ Nodes.MaterialOutput,
119
+ input_kwargs={"Surface": group.outputs["BSDF"], "Displacement": displacement},
120
+ attrs={"is_active_output": True},
121
+ )
122
+
123
+
124
+ def apply(obj, selection=None, **kwargs):
125
+ surface.add_material(
126
+ obj, shader_grained_metal, selection=selection, input_kwargs=kwargs
127
+ )
InternScenes/InternScenes_Real2Sim/materials/metal/hammered_metal.py ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2024, Princeton University.
2
+ # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree.
3
+
4
+ # Authors: Yiming Zuo
5
+ # Acknowledgement: This file draws inspiration https://www.youtube.com/watch?v=82smQvoh0GE by Mix CG Arts
6
+
7
+ from numpy.random import uniform
8
+
9
+ from infinigen.core import surface
10
+ from infinigen.core.nodes import node_utils
11
+ from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler
12
+ from infinigen.core.util.random import log_uniform
13
+
14
+
15
+ @node_utils.to_nodegroup(
16
+ "nodegroup_hammered_metal", singleton=False, type="ShaderNodeTree"
17
+ )
18
+ def nodegroup_hammered_metal(nw: NodeWrangler):
19
+ # Code generated using version 2.6.4 of the node_transpiler
20
+
21
+ group_input = nw.new_node(
22
+ Nodes.GroupInput,
23
+ expose_input=[
24
+ ("NodeSocketColor", "Base Color", (0.8000, 0.8000, 0.8000, 1.0000)),
25
+ ("NodeSocketFloat", "Scale", 0.0000),
26
+ ("NodeSocketFloat", "Seed", 0.0000),
27
+ ],
28
+ )
29
+
30
+ principled_bsdf = nw.new_node(
31
+ Nodes.PrincipledBSDF,
32
+ input_kwargs={
33
+ "Base Color": group_input.outputs["Base Color"],
34
+ "Metallic": 1.0000,
35
+ "Specular": 0.0000,
36
+ "Roughness": 0.1000,
37
+ },
38
+ )
39
+
40
+ texture_coordinate = nw.new_node(Nodes.TextureCoord)
41
+
42
+ multiply = nw.new_node(
43
+ Nodes.Math,
44
+ input_kwargs={0: group_input.outputs["Scale"], 1: 20.0000},
45
+ attrs={"operation": "MULTIPLY"},
46
+ )
47
+
48
+ noise_texture = nw.new_node(
49
+ Nodes.NoiseTexture,
50
+ input_kwargs={
51
+ "Vector": texture_coordinate.outputs["Object"],
52
+ "W": group_input.outputs["Seed"],
53
+ "Scale": multiply,
54
+ "Detail": 15.0000,
55
+ "Roughness": 0.4000,
56
+ "Distortion": 0.2000,
57
+ },
58
+ attrs={"noise_dimensions": "4D"},
59
+ )
60
+
61
+ mix = nw.new_node(
62
+ Nodes.Mix,
63
+ input_kwargs={
64
+ 0: 0.0100,
65
+ 6: texture_coordinate.outputs["Object"],
66
+ 7: noise_texture.outputs["Color"],
67
+ },
68
+ attrs={"clamp_factor": False, "data_type": "RGBA"},
69
+ )
70
+
71
+ multiply_1 = nw.new_node(
72
+ Nodes.Math,
73
+ input_kwargs={0: group_input.outputs["Scale"], 1: 300.0000},
74
+ attrs={"operation": "MULTIPLY"},
75
+ )
76
+
77
+ voronoi_texture_1 = nw.new_node(
78
+ Nodes.VoronoiTexture,
79
+ input_kwargs={
80
+ "Vector": mix.outputs[2],
81
+ "W": group_input.outputs["Seed"],
82
+ "Scale": multiply_1,
83
+ "Smoothness": 0.2000,
84
+ },
85
+ attrs={"voronoi_dimensions": "4D", "feature": "SMOOTH_F1"},
86
+ )
87
+
88
+ multiply_2 = nw.new_node(
89
+ Nodes.Math,
90
+ input_kwargs={
91
+ 0: voronoi_texture_1.outputs["Distance"],
92
+ 1: group_input.outputs["Scale"],
93
+ },
94
+ attrs={"operation": "MULTIPLY"},
95
+ )
96
+
97
+ power = nw.new_node(
98
+ Nodes.Math,
99
+ input_kwargs={0: multiply_2, 1: 2.5000},
100
+ attrs={"operation": "POWER"},
101
+ )
102
+
103
+ multiply_3 = nw.new_node(
104
+ Nodes.Math,
105
+ input_kwargs={0: power, 1: log_uniform(0.001, 0.003)},
106
+ attrs={"operation": "MULTIPLY"},
107
+ )
108
+
109
+ group_output = nw.new_node(
110
+ Nodes.GroupOutput,
111
+ input_kwargs={
112
+ "BSDF": principled_bsdf,
113
+ "Displacement": multiply_3,
114
+ "tmp_viewer": voronoi_texture_1.outputs["Color"],
115
+ },
116
+ attrs={"is_active_output": True},
117
+ )
118
+
119
+
120
+ def shader_hammered_metal(
121
+ nw: NodeWrangler, scale=None, base_color=None, seed=None, **kwargs
122
+ ):
123
+ # Code generated using version 2.6.4 of the node_transpiler
124
+ if seed is None:
125
+ seed = uniform(-1000.0, 1000.0)
126
+ if base_color is None:
127
+ from infinigen.assets.materials.metal import sample_metal_color
128
+
129
+ base_color = sample_metal_color(**kwargs)
130
+ if scale is None:
131
+ scale = log_uniform(0.8, 1.2)
132
+
133
+ group = nw.new_node(
134
+ nodegroup_hammered_metal().name,
135
+ input_kwargs={"Base Color": base_color, "Scale": scale, "Seed": seed},
136
+ )
137
+
138
+ displacement = nw.new_node(
139
+ "ShaderNodeDisplacement",
140
+ input_kwargs={"Height": group.outputs["Displacement"], "Midlevel": 0.0000},
141
+ )
142
+
143
+ material_output = nw.new_node(
144
+ Nodes.MaterialOutput,
145
+ input_kwargs={"Surface": group.outputs["BSDF"], "Displacement": displacement},
146
+ attrs={"is_active_output": True},
147
+ )
148
+
149
+
150
+ def apply(obj, selection=None, **kwargs):
151
+ surface.add_material(
152
+ obj, shader_hammered_metal, selection=selection, input_kwargs=kwargs
153
+ )
InternScenes/InternScenes_Real2Sim/materials/plastics/__pycache__/plastic_rough.cpython-310.pyc ADDED
Binary file (2.73 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/plastics/__pycache__/plastic_translucent.cpython-310.pyc ADDED
Binary file (1.57 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/stone_and_concrete/__pycache__/concrete.cpython-310.pyc ADDED
Binary file (6.63 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/stone_and_concrete/concrete.py ADDED
@@ -0,0 +1,486 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2024, Princeton University.
2
+ # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree.
3
+
4
+ # Authors: Yiming Zuo
5
+ # Acknowledgement: This file draws inspiration https://www.youtube.com/watch?v=XDqRa0ExDqs by Ryan King Art
6
+
7
+
8
+ from numpy.random import uniform
9
+
10
+ from infinigen.assets.materials import common
11
+ from infinigen.core.nodes import node_utils
12
+ from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler
13
+ from infinigen.core.util.color import color_category
14
+
15
+
16
+ @node_utils.to_nodegroup("nodegroup_crack", singleton=False, type="ShaderNodeTree")
17
+ def nodegroup_crack(nw: NodeWrangler):
18
+ # Code generated using version 2.6.4 of the node_transpiler
19
+
20
+ group_input = nw.new_node(
21
+ Nodes.GroupInput,
22
+ expose_input=[
23
+ ("NodeSocketFloat", "Seed", 0.0000),
24
+ ("NodeSocketFloat", "Amount", 1.0000),
25
+ ("NodeSocketFloat", "Scale", 0.0000),
26
+ ("NodeSocketFloatFactor", "Snake Crack", 0.3000),
27
+ ],
28
+ )
29
+
30
+ texture_coordinate_1 = nw.new_node(Nodes.TextureCoord)
31
+
32
+ musgrave_texture_2 = nw.new_node(
33
+ Nodes.MusgraveTexture,
34
+ input_kwargs={
35
+ "Vector": texture_coordinate_1.outputs["Object"],
36
+ "W": group_input.outputs["Seed"],
37
+ "Scale": group_input.outputs["Scale"],
38
+ "Detail": 15.0000,
39
+ "Dimension": 0.2000,
40
+ },
41
+ attrs={"musgrave_dimensions": "4D"},
42
+ )
43
+
44
+ multiply = nw.new_node(
45
+ Nodes.Math,
46
+ input_kwargs={0: group_input.outputs["Scale"]},
47
+ attrs={"operation": "MULTIPLY"},
48
+ )
49
+
50
+ noise_texture_2 = nw.new_node(
51
+ Nodes.NoiseTexture,
52
+ input_kwargs={
53
+ "Vector": texture_coordinate_1.outputs["Object"],
54
+ "W": group_input.outputs["Seed"],
55
+ "Scale": multiply,
56
+ "Detail": 15.0000,
57
+ },
58
+ attrs={"noise_dimensions": "4D"},
59
+ )
60
+
61
+ voronoi_texture = nw.new_node(
62
+ Nodes.VoronoiTexture,
63
+ input_kwargs={"Vector": noise_texture_2.outputs["Fac"], "Scale": 1.2000},
64
+ attrs={"feature": "DISTANCE_TO_EDGE"},
65
+ )
66
+
67
+ map_range_4 = nw.new_node(
68
+ Nodes.MapRange,
69
+ input_kwargs={
70
+ "Value": voronoi_texture.outputs["Distance"],
71
+ 2: 0.0200,
72
+ 3: 2.0000,
73
+ 4: 0.0000,
74
+ },
75
+ )
76
+
77
+ mix_7 = nw.new_node(
78
+ Nodes.Mix,
79
+ input_kwargs={
80
+ 0: group_input.outputs["Snake Crack"],
81
+ 6: musgrave_texture_2,
82
+ 7: map_range_4.outputs["Result"],
83
+ },
84
+ attrs={"blend_type": "ADD", "data_type": "RGBA"},
85
+ )
86
+
87
+ multiply_1 = nw.new_node(
88
+ Nodes.Math,
89
+ input_kwargs={0: group_input.outputs["Scale"], 1: 0.6000},
90
+ attrs={"operation": "MULTIPLY"},
91
+ )
92
+
93
+ musgrave_texture_3 = nw.new_node(
94
+ Nodes.MusgraveTexture,
95
+ input_kwargs={
96
+ "Vector": texture_coordinate_1.outputs["Object"],
97
+ "W": group_input.outputs["Seed"],
98
+ "Scale": multiply_1,
99
+ "Detail": 15.0000,
100
+ "Dimension": 1.0000,
101
+ },
102
+ attrs={"musgrave_dimensions": "4D"},
103
+ )
104
+
105
+ map_range_2 = nw.new_node(
106
+ Nodes.MapRange,
107
+ input_kwargs={"Value": group_input.outputs["Amount"], 3: 1.0000, 4: -0.5000},
108
+ )
109
+
110
+ add = nw.new_node(
111
+ Nodes.Math, input_kwargs={0: map_range_2.outputs["Result"], 1: 0.1000}
112
+ )
113
+
114
+ map_range_1 = nw.new_node(
115
+ Nodes.MapRange,
116
+ input_kwargs={
117
+ "Value": musgrave_texture_3,
118
+ 1: map_range_2.outputs["Result"],
119
+ 2: add,
120
+ },
121
+ )
122
+
123
+ mix_4 = nw.new_node(
124
+ Nodes.Mix,
125
+ input_kwargs={0: 1.0000, 6: mix_7.outputs[2], 7: map_range_1.outputs["Result"]},
126
+ attrs={"blend_type": "DARKEN", "data_type": "RGBA"},
127
+ )
128
+
129
+ multiply_2 = nw.new_node(
130
+ Nodes.Math,
131
+ input_kwargs={0: group_input.outputs["Scale"], 1: 0.3000},
132
+ attrs={"operation": "MULTIPLY"},
133
+ )
134
+
135
+ musgrave_texture_4 = nw.new_node(
136
+ Nodes.MusgraveTexture,
137
+ input_kwargs={
138
+ "Vector": texture_coordinate_1.outputs["Object"],
139
+ "W": group_input.outputs["Seed"],
140
+ "Scale": multiply_2,
141
+ "Detail": 15.0000,
142
+ "Dimension": 1.0000,
143
+ },
144
+ attrs={"musgrave_dimensions": "4D"},
145
+ )
146
+
147
+ add_1 = nw.new_node(
148
+ Nodes.Math, input_kwargs={0: map_range_2.outputs["Result"], 1: 0.1000}
149
+ )
150
+
151
+ map_range = nw.new_node(
152
+ Nodes.MapRange,
153
+ input_kwargs={
154
+ "Value": musgrave_texture_4,
155
+ 1: map_range_2.outputs["Result"],
156
+ 2: add_1,
157
+ },
158
+ )
159
+
160
+ mix_5 = nw.new_node(
161
+ Nodes.Mix,
162
+ input_kwargs={0: 1.0000, 6: mix_4.outputs[2], 7: map_range.outputs["Result"]},
163
+ attrs={"blend_type": "DARKEN", "data_type": "RGBA"},
164
+ )
165
+
166
+ color_ramp = nw.new_node(Nodes.ColorRamp, input_kwargs={"Fac": mix_5.outputs[2]})
167
+ color_ramp.color_ramp.elements[0].position = 0.0000
168
+ color_ramp.color_ramp.elements[0].color = [0.0000, 0.0000, 0.0000, 1.0000]
169
+ color_ramp.color_ramp.elements[1].position = 1.0000
170
+ color_ramp.color_ramp.elements[1].color = [1.0000, 1.0000, 1.0000, 1.0000]
171
+
172
+ group_output = nw.new_node(
173
+ Nodes.GroupOutput,
174
+ input_kwargs={"Color": color_ramp.outputs["Color"]},
175
+ attrs={"is_active_output": True},
176
+ )
177
+
178
+
179
+ @node_utils.to_nodegroup("nodegroup_concrete", singleton=False, type="ShaderNodeTree")
180
+ def nodegroup_concrete(nw: NodeWrangler):
181
+ # Code generated using version 2.6.4 of the node_transpiler
182
+
183
+ group_input_1 = nw.new_node(
184
+ Nodes.GroupInput,
185
+ expose_input=[
186
+ ("NodeSocketColor", "Base Color", (0.8000, 0.8000, 0.8000, 1.0000)),
187
+ ("NodeSocketFloat", "Scale", 0.0000),
188
+ ("NodeSocketFloat", "Seed", 0.0000),
189
+ ("NodeSocketFloat", "Roughness", 0.0000),
190
+ ("NodeSocketFloat", "Crack Amount", 0.0000),
191
+ ("NodeSocketFloat", "Crack Scale", 0.0000),
192
+ ("NodeSocketFloatFactor", "Snake Crack", 0.3000),
193
+ ],
194
+ )
195
+
196
+ multiply = nw.new_node(
197
+ Nodes.Math,
198
+ input_kwargs={0: group_input_1.outputs["Scale"], 1: 10.0000},
199
+ attrs={"operation": "MULTIPLY"},
200
+ )
201
+
202
+ multiply_1 = nw.new_node(
203
+ Nodes.Math,
204
+ input_kwargs={0: multiply, 1: group_input_1.outputs["Crack Scale"]},
205
+ attrs={"operation": "MULTIPLY"},
206
+ )
207
+
208
+ group = nw.new_node(
209
+ nodegroup_crack().name,
210
+ input_kwargs={
211
+ "Seed": group_input_1.outputs["Seed"],
212
+ "Amount": group_input_1.outputs["Crack Amount"],
213
+ "Scale": multiply_1,
214
+ "Snake Crack": group_input_1.outputs["Snake Crack"],
215
+ },
216
+ )
217
+
218
+ map_range_3 = nw.new_node(Nodes.MapRange, input_kwargs={"Value": group})
219
+
220
+ texture_coordinate = nw.new_node(Nodes.TextureCoord)
221
+
222
+ multiply_2 = nw.new_node(
223
+ Nodes.Math,
224
+ input_kwargs={0: group_input_1.outputs["Scale"], 1: 2.0000},
225
+ attrs={"operation": "MULTIPLY"},
226
+ )
227
+
228
+ noise_texture_1 = nw.new_node(
229
+ Nodes.NoiseTexture,
230
+ input_kwargs={
231
+ "Vector": texture_coordinate.outputs["Object"],
232
+ "W": group_input_1.outputs["Seed"],
233
+ "Scale": multiply_2,
234
+ "Detail": 15.0000,
235
+ },
236
+ attrs={"noise_dimensions": "4D"},
237
+ )
238
+
239
+ multiply_3 = nw.new_node(
240
+ Nodes.Math,
241
+ input_kwargs={0: group_input_1.outputs["Scale"], 1: 5.0000},
242
+ attrs={"operation": "MULTIPLY"},
243
+ )
244
+
245
+ musgrave_texture_1 = nw.new_node(
246
+ Nodes.MusgraveTexture,
247
+ input_kwargs={
248
+ "Vector": texture_coordinate.outputs["Object"],
249
+ "W": group_input_1.outputs["Seed"],
250
+ "Scale": multiply_3,
251
+ "Detail": 15.0000,
252
+ "Dimension": 1.0000,
253
+ "Lacunarity": 3.0000,
254
+ },
255
+ attrs={"musgrave_dimensions": "4D"},
256
+ )
257
+
258
+ mix_2 = nw.new_node(
259
+ Nodes.Mix, input_kwargs={6: musgrave_texture_1}, attrs={"data_type": "RGBA"}
260
+ )
261
+
262
+ hue_saturation_value_1 = nw.new_node(
263
+ "ShaderNodeHueSaturation",
264
+ input_kwargs={"Value": 0.6000, "Color": group_input_1.outputs["Base Color"]},
265
+ )
266
+
267
+ multiply_4 = nw.new_node(
268
+ Nodes.Math,
269
+ input_kwargs={0: group_input_1.outputs["Scale"], 1: 20.0000},
270
+ attrs={"operation": "MULTIPLY"},
271
+ )
272
+
273
+ noise_texture = nw.new_node(
274
+ Nodes.NoiseTexture,
275
+ input_kwargs={
276
+ "Vector": texture_coordinate.outputs["Object"],
277
+ "W": group_input_1.outputs["Seed"],
278
+ "Scale": multiply_4,
279
+ "Detail": 15.0000,
280
+ "Distortion": 0.2000,
281
+ },
282
+ attrs={"noise_dimensions": "4D"},
283
+ )
284
+
285
+ multiply_5 = nw.new_node(
286
+ Nodes.Math,
287
+ input_kwargs={0: group_input_1.outputs["Scale"], 1: 20.0000},
288
+ attrs={"operation": "MULTIPLY"},
289
+ )
290
+
291
+ musgrave_texture = nw.new_node(
292
+ Nodes.MusgraveTexture,
293
+ input_kwargs={
294
+ "Vector": texture_coordinate.outputs["Object"],
295
+ "W": group_input_1.outputs["Seed"],
296
+ "Scale": multiply_5,
297
+ "Detail": 15.0000,
298
+ "Dimension": 0.2000,
299
+ },
300
+ attrs={"musgrave_dimensions": "4D"},
301
+ )
302
+
303
+ mix = nw.new_node(
304
+ Nodes.Mix,
305
+ input_kwargs={6: noise_texture.outputs["Fac"], 7: musgrave_texture},
306
+ attrs={"data_type": "RGBA"},
307
+ )
308
+
309
+ hue_saturation_value = nw.new_node(
310
+ "ShaderNodeHueSaturation",
311
+ input_kwargs={"Value": 1.4000, "Color": group_input_1.outputs["Base Color"]},
312
+ )
313
+
314
+ mix_1 = nw.new_node(
315
+ Nodes.Mix,
316
+ input_kwargs={
317
+ 0: mix.outputs[2],
318
+ 6: group_input_1.outputs["Base Color"],
319
+ 7: hue_saturation_value,
320
+ },
321
+ attrs={"data_type": "RGBA"},
322
+ )
323
+
324
+ mix_3 = nw.new_node(
325
+ Nodes.Mix,
326
+ input_kwargs={
327
+ 0: mix_2.outputs[2],
328
+ 6: hue_saturation_value_1,
329
+ 7: mix_1.outputs[2],
330
+ },
331
+ attrs={"data_type": "RGBA"},
332
+ )
333
+
334
+ hue_saturation_value_2 = nw.new_node(
335
+ "ShaderNodeHueSaturation",
336
+ input_kwargs={
337
+ "Value": noise_texture_1.outputs["Fac"],
338
+ "Fac": 0.2000,
339
+ "Color": mix_3.outputs[2],
340
+ },
341
+ )
342
+
343
+ hue_saturation_value_3 = nw.new_node(
344
+ "ShaderNodeHueSaturation",
345
+ input_kwargs={"Value": 0.2000, "Color": group_input_1.outputs["Base Color"]},
346
+ )
347
+
348
+ mix_6 = nw.new_node(
349
+ Nodes.Mix,
350
+ input_kwargs={
351
+ 0: map_range_3.outputs["Result"],
352
+ 6: hue_saturation_value_2,
353
+ 7: hue_saturation_value_3,
354
+ },
355
+ attrs={"data_type": "RGBA"},
356
+ )
357
+
358
+ principled_bsdf = nw.new_node(
359
+ Nodes.PrincipledBSDF,
360
+ input_kwargs={
361
+ "Base Color": mix_6.outputs[2],
362
+ "Roughness": group_input_1.outputs["Roughness"],
363
+ },
364
+ )
365
+
366
+ multiply_6 = nw.new_node(
367
+ Nodes.Math,
368
+ input_kwargs={0: group_input_1.outputs["Crack Amount"], 1: 0.6000},
369
+ attrs={"operation": "MULTIPLY"},
370
+ )
371
+
372
+ multiply_7 = nw.new_node(
373
+ Nodes.Math,
374
+ input_kwargs={0: multiply_1, 1: 5.0000},
375
+ attrs={"operation": "MULTIPLY"},
376
+ )
377
+
378
+ group_1 = nw.new_node(
379
+ nodegroup_crack().name,
380
+ input_kwargs={
381
+ "Seed": group_input_1.outputs["Seed"],
382
+ "Amount": multiply_6,
383
+ "Scale": multiply_7,
384
+ },
385
+ )
386
+
387
+ multiply_8 = nw.new_node(
388
+ Nodes.Math,
389
+ input_kwargs={0: group_input_1.outputs["Roughness"], 1: 1.0000},
390
+ attrs={"operation": "MULTIPLY"},
391
+ )
392
+
393
+ multiply_9 = nw.new_node(
394
+ Nodes.Math,
395
+ input_kwargs={0: group_1, 1: multiply_8},
396
+ attrs={"operation": "MULTIPLY"},
397
+ )
398
+
399
+ multiply_10 = nw.new_node(
400
+ Nodes.Math,
401
+ input_kwargs={0: multiply_8, 1: group},
402
+ attrs={"operation": "MULTIPLY"},
403
+ )
404
+
405
+ add = nw.new_node(Nodes.Math, input_kwargs={0: multiply_9, 1: multiply_10})
406
+
407
+ value = nw.new_node(Nodes.Value)
408
+ value.outputs[0].default_value = 0.3000
409
+
410
+ multiply_11 = nw.new_node(
411
+ Nodes.Math,
412
+ input_kwargs={0: value, 1: group_input_1.outputs["Roughness"]},
413
+ attrs={"operation": "MULTIPLY"},
414
+ )
415
+
416
+ multiply_12 = nw.new_node(
417
+ Nodes.Math,
418
+ input_kwargs={0: multiply_11, 1: mix_1.outputs[2]},
419
+ attrs={"operation": "MULTIPLY"},
420
+ )
421
+
422
+ add_1 = nw.new_node(Nodes.Math, input_kwargs={0: add, 1: multiply_12})
423
+
424
+ group_output = nw.new_node(
425
+ Nodes.GroupOutput,
426
+ input_kwargs={"BSDF": principled_bsdf, "Displacement": add_1},
427
+ attrs={"is_active_output": True},
428
+ )
429
+
430
+
431
+ def shader_concrete(
432
+ nw: NodeWrangler,
433
+ scale=1.0,
434
+ base_color=None,
435
+ seed=None,
436
+ roughness=None,
437
+ crack_amount=None,
438
+ crack_scale=None,
439
+ snake_crack=None,
440
+ **kwargs,
441
+ ):
442
+ # Code generated using version 2.6.4 of the node_transpiler
443
+ if seed is None:
444
+ seed = uniform(-1000.0, 1000.0)
445
+ if roughness is None:
446
+ roughness = uniform(0.5, 1.0)
447
+ if crack_amount is None:
448
+ crack_amount = uniform(0.2, 0.8)
449
+ if crack_scale is None:
450
+ crack_scale = uniform(1.0, 3.0)
451
+ if snake_crack is None:
452
+ snake_crack = uniform(0.0, 1.0)
453
+ if base_color is None:
454
+ base_color = color_category("concrete")
455
+
456
+ group = nw.new_node(
457
+ nodegroup_concrete().name,
458
+ input_kwargs={
459
+ "Base Color": base_color,
460
+ "Scale": scale,
461
+ "Seed": seed,
462
+ "Roughness": roughness,
463
+ "Crack Amount": crack_amount,
464
+ "Crack Scale": crack_scale,
465
+ "Snake Crack": snake_crack,
466
+ },
467
+ )
468
+
469
+ displacement_1 = nw.new_node(
470
+ "ShaderNodeDisplacement",
471
+ input_kwargs={
472
+ "Height": group.outputs["Displacement"],
473
+ "Midlevel": 0.0000,
474
+ "Scale": 0.0500,
475
+ },
476
+ )
477
+
478
+ material_output = nw.new_node(
479
+ Nodes.MaterialOutput,
480
+ input_kwargs={"Surface": group.outputs["BSDF"], "Displacement": displacement_1},
481
+ attrs={"is_active_output": True},
482
+ )
483
+
484
+
485
+ def apply(obj, selection=None, **kwargs):
486
+ common.apply(obj, shader_concrete, selection=selection, **kwargs)
InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/advanced_tiles.cpython-310.pyc ADDED
Binary file (5.89 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/basket_weave.cpython-310.pyc ADDED
Binary file (5.43 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/brick.cpython-310.pyc ADDED
Binary file (4.89 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/cheveron.cpython-310.pyc ADDED
Binary file (3.11 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/diamond.cpython-310.pyc ADDED
Binary file (5.56 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/herringbone.cpython-310.pyc ADDED
Binary file (4.47 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/hexagon.cpython-310.pyc ADDED
Binary file (5.7 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/shell.cpython-310.pyc ADDED
Binary file (4.95 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/spanish_bound.cpython-310.pyc ADDED
Binary file (5.61 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/star.cpython-310.pyc ADDED
Binary file (6.51 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/triangle.cpython-310.pyc ADDED
Binary file (5.05 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/tiles/__pycache__/utils.cpython-310.pyc ADDED
Binary file (1.77 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/tiles/cheveron.py ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2024, Princeton University.
2
+
3
+ # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory
4
+ # of this source tree.
5
+
6
+ # Authors: Yiming Zuo
7
+
8
+ from infinigen.core.nodes import node_utils
9
+ from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler
10
+
11
+ from .utils import nodegroup_scalar_positive_modulo
12
+
13
+
14
+ @node_utils.to_nodegroup("nodegroup_cheveron", singleton=False, type="ShaderNodeTree")
15
+ def nodegroup_cheveron(nw: NodeWrangler):
16
+ # Code generated using version 2.6.5 of the node_transpiler
17
+
18
+ group_input = nw.new_node(
19
+ Nodes.GroupInput,
20
+ expose_input=[
21
+ ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)),
22
+ ("NodeSocketFloat", "Subtiles Number", 1.0000),
23
+ ("NodeSocketFloat", "Aspect Ratio", 5.0000),
24
+ ("NodeSocketFloatFactor", "border", 0.1000),
25
+ ("NodeSocketFloatFactor", "Flatness", 0.9000),
26
+ ],
27
+ )
28
+
29
+ reroute_1 = nw.new_node(
30
+ Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Aspect Ratio"]}
31
+ )
32
+
33
+ brick_width = nw.new_node(Nodes.Value, label="Brick Width")
34
+ brick_width.outputs[0].default_value = 1.0000
35
+
36
+ combine_xyz = nw.new_node(
37
+ Nodes.CombineXYZ, input_kwargs={"X": reroute_1, "Y": brick_width}
38
+ )
39
+
40
+ scale = nw.new_node(
41
+ Nodes.VectorMath,
42
+ input_kwargs={0: combine_xyz, "Scale": 0.5000},
43
+ attrs={"operation": "SCALE"},
44
+ )
45
+
46
+ reroute = nw.new_node(
47
+ Nodes.Reroute, input_kwargs={"Input": scale.outputs["Vector"]}
48
+ )
49
+
50
+ separate_xyz = nw.new_node(
51
+ Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]}
52
+ )
53
+
54
+ group_1 = nw.new_node(
55
+ nodegroup_scalar_positive_modulo().name,
56
+ input_kwargs={0: separate_xyz.outputs["X"], 1: reroute_1},
57
+ )
58
+
59
+ multiply = nw.new_node(
60
+ Nodes.Math,
61
+ input_kwargs={0: group_1, 1: 2.0000},
62
+ attrs={"operation": "MULTIPLY"},
63
+ )
64
+
65
+ subtract = nw.new_node(
66
+ Nodes.Math,
67
+ input_kwargs={0: reroute_1, 1: multiply},
68
+ attrs={"operation": "SUBTRACT"},
69
+ )
70
+
71
+ snap = nw.new_node(
72
+ Nodes.Math,
73
+ input_kwargs={0: separate_xyz.outputs["X"], 1: reroute_1},
74
+ attrs={"operation": "SNAP"},
75
+ )
76
+
77
+ multiply_1 = nw.new_node(
78
+ Nodes.Math,
79
+ input_kwargs={0: reroute_1, 1: 2.0000},
80
+ attrs={"operation": "MULTIPLY"},
81
+ )
82
+
83
+ group_2 = nw.new_node(
84
+ nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap, 1: multiply_1}
85
+ )
86
+
87
+ greater_than = nw.new_node(
88
+ Nodes.Math, input_kwargs={0: group_2}, attrs={"operation": "GREATER_THAN"}
89
+ )
90
+
91
+ multiply_2 = nw.new_node(
92
+ Nodes.Math,
93
+ input_kwargs={0: subtract, 1: greater_than},
94
+ attrs={"operation": "MULTIPLY"},
95
+ )
96
+
97
+ add = nw.new_node(Nodes.Math, input_kwargs={0: multiply_2, 1: group_1})
98
+
99
+ rot_amount = nw.new_node(Nodes.Value, label="rot amount")
100
+ rot_amount.outputs[0].default_value = 1.0000
101
+
102
+ multiply_3 = nw.new_node(
103
+ Nodes.Math,
104
+ input_kwargs={0: add, 1: rot_amount},
105
+ attrs={"operation": "MULTIPLY"},
106
+ )
107
+
108
+ add_1 = nw.new_node(
109
+ Nodes.Math, input_kwargs={0: separate_xyz.outputs["Y"], 1: multiply_3}
110
+ )
111
+
112
+ group = nw.new_node(
113
+ nodegroup_scalar_positive_modulo().name, input_kwargs={0: add_1, 1: brick_width}
114
+ )
115
+
116
+ combine_xyz_1 = nw.new_node(
117
+ Nodes.CombineXYZ, input_kwargs={"X": group_1, "Y": group}
118
+ )
119
+
120
+ subtract_1 = nw.new_node(
121
+ Nodes.VectorMath,
122
+ input_kwargs={0: combine_xyz_1, 1: reroute},
123
+ attrs={"operation": "SUBTRACT"},
124
+ )
125
+
126
+ absolute = nw.new_node(
127
+ Nodes.VectorMath,
128
+ input_kwargs={0: subtract_1.outputs["Vector"]},
129
+ attrs={"operation": "ABSOLUTE"},
130
+ )
131
+
132
+ subtract_2 = nw.new_node(
133
+ Nodes.VectorMath,
134
+ input_kwargs={0: reroute, 1: absolute.outputs["Vector"]},
135
+ attrs={"operation": "SUBTRACT"},
136
+ )
137
+
138
+ separate_xyz_1 = nw.new_node(
139
+ Nodes.SeparateXYZ, input_kwargs={"Vector": subtract_2.outputs["Vector"]}
140
+ )
141
+
142
+ smooth_min = nw.new_node(
143
+ Nodes.Math,
144
+ input_kwargs={
145
+ 0: separate_xyz_1.outputs["X"],
146
+ 1: separate_xyz_1.outputs["Y"],
147
+ 2: 0.1000,
148
+ },
149
+ attrs={"operation": "SMOOTH_MIN"},
150
+ )
151
+
152
+ mix = nw.new_node(
153
+ Nodes.Mix,
154
+ input_kwargs={0: group_input.outputs["border"], 6: smooth_min},
155
+ attrs={"blend_type": "BURN", "data_type": "RGBA"},
156
+ )
157
+
158
+ mix_1 = nw.new_node(
159
+ Nodes.Mix,
160
+ input_kwargs={
161
+ 0: group_input.outputs["Flatness"],
162
+ 6: mix.outputs[2],
163
+ 7: (1.0000, 1.0000, 1.0000, 1.0000),
164
+ },
165
+ attrs={"blend_type": "DODGE", "data_type": "RGBA"},
166
+ )
167
+
168
+ snap_1 = nw.new_node(
169
+ Nodes.Math, input_kwargs={0: add_1, 1: brick_width}, attrs={"operation": "SNAP"}
170
+ )
171
+
172
+ snap_2 = nw.new_node(
173
+ Nodes.Math,
174
+ input_kwargs={0: separate_xyz.outputs["X"], 1: reroute_1},
175
+ attrs={"operation": "SNAP"},
176
+ )
177
+
178
+ combine_xyz_3 = nw.new_node(
179
+ Nodes.CombineXYZ, input_kwargs={"X": snap_1, "Y": snap_2}
180
+ )
181
+
182
+ white_noise_texture = nw.new_node(
183
+ Nodes.WhiteNoiseTexture, input_kwargs={"Vector": combine_xyz_3}
184
+ )
185
+
186
+ snap_3 = nw.new_node(
187
+ Nodes.Math, input_kwargs={0: add_1, 1: brick_width}, attrs={"operation": "SNAP"}
188
+ )
189
+
190
+ multiply_4 = nw.new_node(
191
+ Nodes.Math,
192
+ input_kwargs={0: brick_width, 1: 2.0000},
193
+ attrs={"operation": "MULTIPLY"},
194
+ )
195
+
196
+ group_3 = nw.new_node(
197
+ nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap_3, 1: multiply_4}
198
+ )
199
+
200
+ group_output = nw.new_node(
201
+ Nodes.GroupOutput,
202
+ input_kwargs={
203
+ "Result": mix_1.outputs[2],
204
+ "Tile Color": white_noise_texture.outputs["Color"],
205
+ "Tile Type 1": greater_than,
206
+ "Tile Type 2": group_3,
207
+ },
208
+ attrs={"is_active_output": True},
209
+ )
InternScenes/InternScenes_Real2Sim/materials/tiles/diamond.py ADDED
@@ -0,0 +1,441 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2024, Princeton University.
2
+
3
+ # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory
4
+ # of this source tree.
5
+
6
+ # Authors: Yiming Zuo
7
+
8
+ from infinigen.core.nodes import node_utils
9
+ from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler
10
+
11
+ from .utils import nodegroup_scalar_positive_modulo
12
+
13
+
14
+ @node_utils.to_nodegroup(
15
+ "nodegroup_diamond_single", singleton=False, type="ShaderNodeTree"
16
+ )
17
+ def nodegroup_diamond_single(nw: NodeWrangler):
18
+ # Code generated using version 2.6.5 of the node_transpiler
19
+
20
+ value_1 = nw.new_node(Nodes.Value)
21
+ value_1.outputs[0].default_value = 0.7070
22
+
23
+ group_input = nw.new_node(
24
+ Nodes.GroupInput,
25
+ expose_input=[
26
+ ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)),
27
+ ("NodeSocketFloat", "Width", 0.0000),
28
+ ],
29
+ )
30
+
31
+ separate_xyz = nw.new_node(
32
+ Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]}
33
+ )
34
+
35
+ reroute = nw.new_node(
36
+ Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Width"]}
37
+ )
38
+
39
+ multiply = nw.new_node(
40
+ Nodes.Math,
41
+ input_kwargs={0: reroute, 1: 1.5000},
42
+ attrs={"operation": "MULTIPLY"},
43
+ )
44
+
45
+ snap = nw.new_node(
46
+ Nodes.Math,
47
+ input_kwargs={0: separate_xyz.outputs["Y"], 1: multiply},
48
+ attrs={"operation": "SNAP"},
49
+ )
50
+
51
+ divide = nw.new_node(
52
+ Nodes.Math, input_kwargs={0: snap, 1: multiply}, attrs={"operation": "DIVIDE"}
53
+ )
54
+
55
+ multiply_1 = nw.new_node(
56
+ Nodes.Math,
57
+ input_kwargs={0: group_input.outputs["Width"], 1: 0.8660},
58
+ attrs={"operation": "MULTIPLY"},
59
+ )
60
+
61
+ multiply_2 = nw.new_node(
62
+ Nodes.Math,
63
+ input_kwargs={0: divide, 1: multiply_1},
64
+ attrs={"operation": "MULTIPLY"},
65
+ )
66
+
67
+ add = nw.new_node(
68
+ Nodes.Math, input_kwargs={0: separate_xyz.outputs["X"], 1: multiply_2}
69
+ )
70
+
71
+ combine_xyz_2 = nw.new_node(
72
+ Nodes.CombineXYZ, input_kwargs={"X": add, "Y": separate_xyz.outputs["Y"]}
73
+ )
74
+
75
+ multiply_3 = nw.new_node(
76
+ Nodes.Math,
77
+ input_kwargs={0: reroute, 1: 1.7321},
78
+ attrs={"operation": "MULTIPLY"},
79
+ )
80
+
81
+ combine_xyz = nw.new_node(
82
+ Nodes.CombineXYZ, input_kwargs={"X": multiply_3, "Y": reroute}
83
+ )
84
+
85
+ separate_xyz_1 = nw.new_node(
86
+ Nodes.SeparateXYZ, input_kwargs={"Vector": combine_xyz}
87
+ )
88
+
89
+ snap_1 = nw.new_node(
90
+ Nodes.Math,
91
+ input_kwargs={0: add, 1: separate_xyz_1.outputs["X"]},
92
+ attrs={"operation": "SNAP"},
93
+ )
94
+
95
+ combine_xyz_1 = nw.new_node(Nodes.CombineXYZ, input_kwargs={"X": snap_1, "Y": snap})
96
+
97
+ subtract = nw.new_node(
98
+ Nodes.VectorMath,
99
+ input_kwargs={0: combine_xyz_2, 1: combine_xyz_1},
100
+ attrs={"operation": "SUBTRACT"},
101
+ )
102
+
103
+ scale = nw.new_node(
104
+ Nodes.VectorMath,
105
+ input_kwargs={0: combine_xyz, "Scale": 0.5000},
106
+ attrs={"operation": "SCALE"},
107
+ )
108
+
109
+ subtract_1 = nw.new_node(
110
+ Nodes.VectorMath,
111
+ input_kwargs={0: subtract.outputs["Vector"], 1: scale.outputs["Vector"]},
112
+ attrs={"operation": "SUBTRACT"},
113
+ )
114
+
115
+ value_3 = nw.new_node(Nodes.Value)
116
+ value_3.outputs[0].default_value = 1.0000
117
+
118
+ divide_1 = nw.new_node(
119
+ Nodes.VectorMath,
120
+ input_kwargs={0: value_3, 1: scale.outputs["Vector"]},
121
+ attrs={"operation": "DIVIDE"},
122
+ )
123
+
124
+ multiply_4 = nw.new_node(
125
+ Nodes.VectorMath,
126
+ input_kwargs={0: subtract_1.outputs["Vector"], 1: divide_1.outputs["Vector"]},
127
+ attrs={"operation": "MULTIPLY"},
128
+ )
129
+
130
+ vector_rotate = nw.new_node(
131
+ Nodes.VectorRotate,
132
+ input_kwargs={"Vector": multiply_4.outputs["Vector"], "Angle": 0.7854},
133
+ )
134
+
135
+ absolute = nw.new_node(
136
+ Nodes.VectorMath,
137
+ input_kwargs={0: vector_rotate},
138
+ attrs={"operation": "ABSOLUTE"},
139
+ )
140
+
141
+ subtract_2 = nw.new_node(
142
+ Nodes.VectorMath,
143
+ input_kwargs={0: value_1, 1: absolute.outputs["Vector"]},
144
+ attrs={"operation": "SUBTRACT"},
145
+ )
146
+
147
+ white_noise_texture = nw.new_node(
148
+ Nodes.WhiteNoiseTexture, input_kwargs={"Vector": combine_xyz_1}
149
+ )
150
+
151
+ divide_2 = nw.new_node(
152
+ Nodes.Math, input_kwargs={0: snap, 1: multiply}, attrs={"operation": "DIVIDE"}
153
+ )
154
+
155
+ group_1 = nw.new_node(
156
+ nodegroup_scalar_positive_modulo().name, input_kwargs={0: divide_2, 1: 2.0000}
157
+ )
158
+
159
+ greater_than = nw.new_node(
160
+ Nodes.Math, input_kwargs={0: group_1}, attrs={"operation": "GREATER_THAN"}
161
+ )
162
+
163
+ divide_3 = nw.new_node(
164
+ Nodes.Math,
165
+ input_kwargs={0: snap_1, 1: separate_xyz_1.outputs["X"]},
166
+ attrs={"operation": "DIVIDE"},
167
+ )
168
+
169
+ group = nw.new_node(
170
+ nodegroup_scalar_positive_modulo().name, input_kwargs={0: divide_3, 1: 2.0000}
171
+ )
172
+
173
+ greater_than_1 = nw.new_node(
174
+ Nodes.Math, input_kwargs={0: group}, attrs={"operation": "GREATER_THAN"}
175
+ )
176
+
177
+ multiply_5 = nw.new_node(
178
+ Nodes.Math,
179
+ input_kwargs={0: greater_than, 1: greater_than_1},
180
+ attrs={"operation": "MULTIPLY"},
181
+ )
182
+
183
+ group_output = nw.new_node(
184
+ Nodes.GroupOutput,
185
+ input_kwargs={
186
+ "UV": subtract_2.outputs["Vector"],
187
+ "Color": white_noise_texture.outputs["Color"],
188
+ "Value": multiply_5,
189
+ },
190
+ attrs={"is_active_output": True},
191
+ )
192
+
193
+
194
+ @node_utils.to_nodegroup("nodegroup_diamond", singleton=False, type="ShaderNodeTree")
195
+ def nodegroup_diamond(nw: NodeWrangler):
196
+ # Code generated using version 2.6.5 of the node_transpiler
197
+
198
+ group_input = nw.new_node(
199
+ Nodes.GroupInput,
200
+ expose_input=[
201
+ ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)),
202
+ ("NodeSocketFloat", "Subtiles Number", 1.0000),
203
+ ("NodeSocketFloat", "Aspect Ratio", 5.0000),
204
+ ("NodeSocketFloatFactor", "border", 0.1000),
205
+ ("NodeSocketFloatFactor", "Flatness", 0.9000),
206
+ ],
207
+ )
208
+
209
+ reroute_1 = nw.new_node(
210
+ Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Flatness"]}
211
+ )
212
+
213
+ multiply = nw.new_node(
214
+ Nodes.Math,
215
+ input_kwargs={0: group_input.outputs["border"], 1: 1.5000},
216
+ attrs={"operation": "MULTIPLY"},
217
+ )
218
+
219
+ reroute = nw.new_node(Nodes.Reroute, input_kwargs={"Input": multiply})
220
+
221
+ value = nw.new_node(Nodes.Value)
222
+ value.outputs[0].default_value = 0.5000
223
+
224
+ mapping = nw.new_node(
225
+ Nodes.Mapping,
226
+ input_kwargs={"Vector": group_input.outputs["Coordinate"], "Scale": value},
227
+ )
228
+
229
+ value_1 = nw.new_node(Nodes.Value)
230
+ value_1.outputs[0].default_value = 1.0000
231
+
232
+ group = nw.new_node(
233
+ nodegroup_diamond_single().name,
234
+ input_kwargs={"Coordinate": mapping, "Width": value_1},
235
+ )
236
+
237
+ separate_xyz_3 = nw.new_node(
238
+ Nodes.SeparateXYZ, input_kwargs={"Vector": group.outputs["UV"]}
239
+ )
240
+
241
+ value_3 = nw.new_node(Nodes.Value)
242
+ value_3.outputs[0].default_value = 0.0000
243
+
244
+ smooth_min = nw.new_node(
245
+ Nodes.Math,
246
+ input_kwargs={
247
+ 0: separate_xyz_3.outputs["X"],
248
+ 1: separate_xyz_3.outputs["Y"],
249
+ 2: value_3,
250
+ },
251
+ attrs={"operation": "SMOOTH_MIN"},
252
+ )
253
+
254
+ mix = nw.new_node(
255
+ Nodes.Mix,
256
+ input_kwargs={0: reroute, 6: smooth_min},
257
+ attrs={"blend_type": "BURN", "data_type": "RGBA"},
258
+ )
259
+
260
+ mix_1 = nw.new_node(
261
+ Nodes.Mix,
262
+ input_kwargs={
263
+ 0: reroute_1,
264
+ 6: mix.outputs[2],
265
+ 7: (1.0000, 1.0000, 1.0000, 1.0000),
266
+ },
267
+ attrs={"blend_type": "DODGE", "data_type": "RGBA"},
268
+ )
269
+
270
+ multiply_1 = nw.new_node(
271
+ Nodes.Math, input_kwargs={0: value_1}, attrs={"operation": "MULTIPLY"}
272
+ )
273
+
274
+ combine_xyz = nw.new_node(Nodes.CombineXYZ, input_kwargs={"Y": multiply_1})
275
+
276
+ vector_rotate = nw.new_node(
277
+ Nodes.VectorRotate,
278
+ input_kwargs={"Vector": mapping, "Center": combine_xyz, "Angle": -2.0944},
279
+ )
280
+
281
+ group_1 = nw.new_node(
282
+ nodegroup_diamond_single().name,
283
+ input_kwargs={"Coordinate": vector_rotate, "Width": value_1},
284
+ )
285
+
286
+ separate_xyz_4 = nw.new_node(
287
+ Nodes.SeparateXYZ, input_kwargs={"Vector": group_1.outputs["UV"]}
288
+ )
289
+
290
+ smooth_min_1 = nw.new_node(
291
+ Nodes.Math,
292
+ input_kwargs={
293
+ 0: separate_xyz_4.outputs["X"],
294
+ 1: separate_xyz_4.outputs["Y"],
295
+ 2: value_3,
296
+ },
297
+ attrs={"operation": "SMOOTH_MIN"},
298
+ )
299
+
300
+ mix_2 = nw.new_node(
301
+ Nodes.Mix,
302
+ input_kwargs={0: reroute, 6: smooth_min_1},
303
+ attrs={"blend_type": "BURN", "data_type": "RGBA"},
304
+ )
305
+
306
+ mix_3 = nw.new_node(
307
+ Nodes.Mix,
308
+ input_kwargs={
309
+ 0: reroute_1,
310
+ 6: mix_2.outputs[2],
311
+ 7: (1.0000, 1.0000, 1.0000, 1.0000),
312
+ },
313
+ attrs={"blend_type": "DODGE", "data_type": "RGBA"},
314
+ )
315
+
316
+ mix_4 = nw.new_node(
317
+ Nodes.Mix,
318
+ input_kwargs={0: 1.0000, 6: mix_1.outputs[2], 7: mix_3.outputs[2]},
319
+ attrs={"blend_type": "ADD", "data_type": "RGBA"},
320
+ )
321
+
322
+ vector_rotate_1 = nw.new_node(
323
+ Nodes.VectorRotate,
324
+ input_kwargs={"Vector": mapping, "Center": combine_xyz, "Angle": 2.0944},
325
+ )
326
+
327
+ group_2 = nw.new_node(
328
+ nodegroup_diamond_single().name,
329
+ input_kwargs={"Coordinate": vector_rotate_1, "Width": value_1},
330
+ )
331
+
332
+ separate_xyz_5 = nw.new_node(
333
+ Nodes.SeparateXYZ, input_kwargs={"Vector": group_2.outputs["UV"]}
334
+ )
335
+
336
+ smooth_min_2 = nw.new_node(
337
+ Nodes.Math,
338
+ input_kwargs={
339
+ 0: separate_xyz_5.outputs["X"],
340
+ 1: separate_xyz_5.outputs["Y"],
341
+ 2: value_3,
342
+ },
343
+ attrs={"operation": "SMOOTH_MIN"},
344
+ )
345
+
346
+ mix_5 = nw.new_node(
347
+ Nodes.Mix,
348
+ input_kwargs={0: reroute, 6: smooth_min_2},
349
+ attrs={"blend_type": "BURN", "data_type": "RGBA"},
350
+ )
351
+
352
+ mix_6 = nw.new_node(
353
+ Nodes.Mix,
354
+ input_kwargs={
355
+ 0: reroute_1,
356
+ 6: mix_5.outputs[2],
357
+ 7: (1.0000, 1.0000, 1.0000, 1.0000),
358
+ },
359
+ attrs={"blend_type": "DODGE", "data_type": "RGBA"},
360
+ )
361
+
362
+ mix_7 = nw.new_node(
363
+ Nodes.Mix,
364
+ input_kwargs={0: 1.0000, 6: mix_4.outputs[2], 7: mix_6.outputs[2]},
365
+ attrs={"blend_type": "ADD", "data_type": "RGBA"},
366
+ )
367
+
368
+ mix_8 = nw.new_node(
369
+ Nodes.Mix,
370
+ input_kwargs={0: 1.0000, 6: mix_1.outputs[2], 7: group.outputs["Color"]},
371
+ attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"},
372
+ )
373
+
374
+ mix_9 = nw.new_node(
375
+ Nodes.Mix,
376
+ input_kwargs={0: 1.0000, 6: group_1.outputs["Color"], 7: mix_3.outputs[2]},
377
+ attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"},
378
+ )
379
+
380
+ mix_11 = nw.new_node(
381
+ Nodes.Mix,
382
+ input_kwargs={0: 1.0000, 6: mix_8.outputs[2], 7: mix_9.outputs[2]},
383
+ attrs={"blend_type": "ADD", "data_type": "RGBA"},
384
+ )
385
+
386
+ mix_10 = nw.new_node(
387
+ Nodes.Mix,
388
+ input_kwargs={0: 1.0000, 6: mix_6.outputs[2], 7: group_2.outputs["Color"]},
389
+ attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"},
390
+ )
391
+
392
+ mix_12 = nw.new_node(
393
+ Nodes.Mix,
394
+ input_kwargs={0: 1.0000, 6: mix_11.outputs[2], 7: mix_10.outputs[2]},
395
+ attrs={"blend_type": "ADD", "data_type": "RGBA"},
396
+ )
397
+
398
+ greater_than = nw.new_node(
399
+ Nodes.Math,
400
+ input_kwargs={0: mix_1.outputs[2], 1: 0.0000},
401
+ attrs={"operation": "GREATER_THAN"},
402
+ )
403
+
404
+ multiply_2 = nw.new_node(
405
+ Nodes.Math,
406
+ input_kwargs={0: mix_6.outputs[2], 1: group_2.outputs["Value"]},
407
+ attrs={"operation": "MULTIPLY"},
408
+ )
409
+
410
+ multiply_3 = nw.new_node(
411
+ Nodes.Math,
412
+ input_kwargs={0: group.outputs["Value"], 1: mix_1.outputs[2]},
413
+ attrs={"operation": "MULTIPLY"},
414
+ )
415
+
416
+ multiply_4 = nw.new_node(
417
+ Nodes.Math,
418
+ input_kwargs={0: mix_3.outputs[2], 1: group_1.outputs["Value"]},
419
+ attrs={"operation": "MULTIPLY"},
420
+ )
421
+
422
+ add = nw.new_node(Nodes.Math, input_kwargs={0: multiply_3, 1: multiply_4})
423
+
424
+ add_1 = nw.new_node(Nodes.Math, input_kwargs={0: multiply_2, 1: add})
425
+
426
+ greater_than_1 = nw.new_node(
427
+ Nodes.Math,
428
+ input_kwargs={0: add_1, 1: 0.0000},
429
+ attrs={"operation": "GREATER_THAN"},
430
+ )
431
+
432
+ group_output = nw.new_node(
433
+ Nodes.GroupOutput,
434
+ input_kwargs={
435
+ "Result": mix_7.outputs[2],
436
+ "Tile Color": mix_12.outputs[2],
437
+ "Tile Type 1": greater_than,
438
+ "Tile Type 2": greater_than_1,
439
+ },
440
+ attrs={"is_active_output": True},
441
+ )
InternScenes/InternScenes_Real2Sim/materials/tiles/herringbone.py ADDED
@@ -0,0 +1,350 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2024, Princeton University.
2
+
3
+ # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory
4
+ # of this source tree.
5
+
6
+ # Authors: Yiming Zuo
7
+
8
+ from infinigen.core.nodes import node_utils
9
+ from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler
10
+
11
+ from .utils import nodegroup_scalar_positive_modulo
12
+
13
+
14
+ @node_utils.to_nodegroup("nodegroup_mix", singleton=False, type="ShaderNodeTree")
15
+ def nodegroup_mix(nw: NodeWrangler):
16
+ # Code generated using version 2.6.5 of the node_transpiler
17
+
18
+ group_input = nw.new_node(
19
+ Nodes.GroupInput,
20
+ expose_input=[
21
+ ("NodeSocketFloat", "Mask", 0.0000),
22
+ ("NodeSocketVector", "Vector 1", (0.0000, 0.0000, 0.0000)),
23
+ ("NodeSocketVector", "Vector 2", (0.0000, 0.0000, 0.0000)),
24
+ ],
25
+ )
26
+
27
+ subtract = nw.new_node(
28
+ Nodes.Math,
29
+ input_kwargs={0: 1.0000, 1: group_input.outputs["Mask"]},
30
+ attrs={"operation": "SUBTRACT"},
31
+ )
32
+
33
+ multiply = nw.new_node(
34
+ Nodes.VectorMath,
35
+ input_kwargs={0: group_input.outputs["Vector 2"], 1: subtract},
36
+ attrs={"operation": "MULTIPLY"},
37
+ )
38
+
39
+ multiply_1 = nw.new_node(
40
+ Nodes.VectorMath,
41
+ input_kwargs={
42
+ 0: group_input.outputs["Vector 1"],
43
+ 1: group_input.outputs["Mask"],
44
+ },
45
+ attrs={"operation": "MULTIPLY"},
46
+ )
47
+
48
+ add = nw.new_node(
49
+ Nodes.VectorMath,
50
+ input_kwargs={0: multiply.outputs["Vector"], 1: multiply_1.outputs["Vector"]},
51
+ )
52
+
53
+ group_output = nw.new_node(
54
+ Nodes.GroupOutput,
55
+ input_kwargs={"Vector": add.outputs["Vector"]},
56
+ attrs={"is_active_output": True},
57
+ )
58
+
59
+
60
+ @node_utils.to_nodegroup(
61
+ "nodegroup_herringbone", singleton=False, type="ShaderNodeTree"
62
+ )
63
+ def nodegroup_herringbone(nw: NodeWrangler):
64
+ # Code generated using version 2.6.5 of the node_transpiler
65
+
66
+ group_input = nw.new_node(
67
+ Nodes.GroupInput,
68
+ expose_input=[
69
+ ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)),
70
+ ("NodeSocketFloat", "Subtiles Number", 1.0000),
71
+ ("NodeSocketFloat", "Aspect Ratio", 5.0000),
72
+ ("NodeSocketFloatFactor", "border", 0.1000),
73
+ ("NodeSocketFloatFactor", "Flatness", 0.9000),
74
+ ],
75
+ )
76
+
77
+ reroute_1 = nw.new_node(
78
+ Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Aspect Ratio"]}
79
+ )
80
+
81
+ brick_width = nw.new_node(Nodes.Value, label="Brick Width")
82
+ brick_width.outputs[0].default_value = 1.0000
83
+
84
+ combine_xyz = nw.new_node(
85
+ Nodes.CombineXYZ, input_kwargs={"X": reroute_1, "Y": brick_width}
86
+ )
87
+
88
+ scale = nw.new_node(
89
+ Nodes.VectorMath,
90
+ input_kwargs={0: combine_xyz, "Scale": 0.5000},
91
+ attrs={"operation": "SCALE"},
92
+ )
93
+
94
+ combine_xyz_3 = nw.new_node(
95
+ Nodes.CombineXYZ,
96
+ input_kwargs={
97
+ "X": 1.0000,
98
+ "Y": group_input.outputs["Subtiles Number"],
99
+ "Z": 1.0000,
100
+ },
101
+ )
102
+
103
+ divide = nw.new_node(
104
+ Nodes.VectorMath,
105
+ input_kwargs={0: scale.outputs["Vector"], 1: combine_xyz_3},
106
+ attrs={"operation": "DIVIDE"},
107
+ )
108
+
109
+ reroute = nw.new_node(
110
+ Nodes.Reroute, input_kwargs={"Input": divide.outputs["Vector"]}
111
+ )
112
+
113
+ separate_xyz = nw.new_node(
114
+ Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]}
115
+ )
116
+
117
+ snap = nw.new_node(
118
+ Nodes.Math,
119
+ input_kwargs={0: separate_xyz.outputs["Y"], 1: brick_width},
120
+ attrs={"operation": "SNAP"},
121
+ )
122
+
123
+ subtract = nw.new_node(
124
+ Nodes.Math,
125
+ input_kwargs={0: separate_xyz.outputs["X"], 1: snap},
126
+ attrs={"operation": "SUBTRACT"},
127
+ )
128
+
129
+ snap_1 = nw.new_node(
130
+ Nodes.Math,
131
+ input_kwargs={0: subtract, 1: reroute_1},
132
+ attrs={"operation": "SNAP"},
133
+ )
134
+
135
+ multiply = nw.new_node(
136
+ Nodes.Math,
137
+ input_kwargs={0: reroute_1, 1: 2.0000},
138
+ attrs={"operation": "MULTIPLY"},
139
+ )
140
+
141
+ group_1 = nw.new_node(
142
+ nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap_1, 1: multiply}
143
+ )
144
+
145
+ greater_than = nw.new_node(
146
+ Nodes.Math, input_kwargs={0: group_1}, attrs={"operation": "GREATER_THAN"}
147
+ )
148
+
149
+ group = nw.new_node(
150
+ nodegroup_scalar_positive_modulo().name,
151
+ input_kwargs={0: subtract, 1: reroute_1},
152
+ )
153
+
154
+ divide_1 = nw.new_node(
155
+ Nodes.Math,
156
+ input_kwargs={0: brick_width, 1: group_input.outputs["Subtiles Number"]},
157
+ attrs={"operation": "DIVIDE"},
158
+ )
159
+
160
+ group_3 = nw.new_node(
161
+ nodegroup_scalar_positive_modulo().name,
162
+ input_kwargs={0: separate_xyz.outputs["Y"], 1: divide_1},
163
+ )
164
+
165
+ combine_xyz_1 = nw.new_node(
166
+ Nodes.CombineXYZ, input_kwargs={"X": group, "Y": group_3}
167
+ )
168
+
169
+ snap_2 = nw.new_node(
170
+ Nodes.Math,
171
+ input_kwargs={0: separate_xyz.outputs["X"], 1: brick_width},
172
+ attrs={"operation": "SNAP"},
173
+ )
174
+
175
+ multiply_1 = nw.new_node(
176
+ Nodes.Math,
177
+ input_kwargs={0: snap_2, 1: brick_width},
178
+ attrs={"operation": "MULTIPLY"},
179
+ )
180
+
181
+ add = nw.new_node(Nodes.Math, input_kwargs={0: multiply_1, 1: brick_width})
182
+
183
+ subtract_1 = nw.new_node(
184
+ Nodes.Math,
185
+ input_kwargs={0: separate_xyz.outputs["Y"], 1: add},
186
+ attrs={"operation": "SUBTRACT"},
187
+ )
188
+
189
+ group_2 = nw.new_node(
190
+ nodegroup_scalar_positive_modulo().name,
191
+ input_kwargs={0: subtract_1, 1: reroute_1},
192
+ )
193
+
194
+ divide_2 = nw.new_node(
195
+ Nodes.Math,
196
+ input_kwargs={0: brick_width, 1: group_input.outputs["Subtiles Number"]},
197
+ attrs={"operation": "DIVIDE"},
198
+ )
199
+
200
+ group_4 = nw.new_node(
201
+ nodegroup_scalar_positive_modulo().name,
202
+ input_kwargs={0: separate_xyz.outputs["X"], 1: divide_2},
203
+ )
204
+
205
+ combine_xyz_2 = nw.new_node(
206
+ Nodes.CombineXYZ, input_kwargs={"X": group_2, "Y": group_4}
207
+ )
208
+
209
+ group_5 = nw.new_node(
210
+ nodegroup_mix().name,
211
+ input_kwargs={
212
+ "Mask": greater_than,
213
+ "Vector 1": combine_xyz_1,
214
+ "Vector 2": combine_xyz_2,
215
+ },
216
+ )
217
+
218
+ subtract_2 = nw.new_node(
219
+ Nodes.VectorMath,
220
+ input_kwargs={0: group_5, 1: reroute},
221
+ attrs={"operation": "SUBTRACT"},
222
+ )
223
+
224
+ absolute = nw.new_node(
225
+ Nodes.VectorMath,
226
+ input_kwargs={0: subtract_2.outputs["Vector"]},
227
+ attrs={"operation": "ABSOLUTE"},
228
+ )
229
+
230
+ subtract_3 = nw.new_node(
231
+ Nodes.VectorMath,
232
+ input_kwargs={0: reroute, 1: absolute.outputs["Vector"]},
233
+ attrs={"operation": "SUBTRACT"},
234
+ )
235
+
236
+ separate_xyz_1 = nw.new_node(
237
+ Nodes.SeparateXYZ, input_kwargs={"Vector": subtract_3.outputs["Vector"]}
238
+ )
239
+
240
+ smooth_min = nw.new_node(
241
+ Nodes.Math,
242
+ input_kwargs={
243
+ 0: separate_xyz_1.outputs["X"],
244
+ 1: separate_xyz_1.outputs["Y"],
245
+ 2: 0.0000,
246
+ },
247
+ attrs={"operation": "SMOOTH_MIN"},
248
+ )
249
+
250
+ mix = nw.new_node(
251
+ Nodes.Mix,
252
+ input_kwargs={0: group_input.outputs["border"], 6: smooth_min},
253
+ attrs={"blend_type": "BURN", "data_type": "RGBA"},
254
+ )
255
+
256
+ mix_1 = nw.new_node(
257
+ Nodes.Mix,
258
+ input_kwargs={
259
+ 0: group_input.outputs["Flatness"],
260
+ 6: mix.outputs[2],
261
+ 7: (1.0000, 1.0000, 1.0000, 1.0000),
262
+ },
263
+ attrs={"blend_type": "DODGE", "data_type": "RGBA"},
264
+ )
265
+
266
+ snap_3 = nw.new_node(
267
+ Nodes.Math,
268
+ input_kwargs={0: subtract, 1: reroute_1},
269
+ attrs={"operation": "SNAP"},
270
+ )
271
+
272
+ snap_4 = nw.new_node(
273
+ Nodes.Math,
274
+ input_kwargs={0: separate_xyz.outputs["Y"], 1: divide_1},
275
+ attrs={"operation": "SNAP"},
276
+ )
277
+
278
+ combine_xyz_6 = nw.new_node(
279
+ Nodes.CombineXYZ, input_kwargs={"X": snap_3, "Y": snap_4}
280
+ )
281
+
282
+ value = nw.new_node(Nodes.Value)
283
+ value.outputs[0].default_value = 0.5000
284
+
285
+ add_1 = nw.new_node(Nodes.VectorMath, input_kwargs={0: combine_xyz_6, 1: value})
286
+
287
+ snap_5 = nw.new_node(
288
+ Nodes.Math,
289
+ input_kwargs={0: subtract_1, 1: reroute_1},
290
+ attrs={"operation": "SNAP"},
291
+ )
292
+
293
+ snap_6 = nw.new_node(
294
+ Nodes.Math,
295
+ input_kwargs={0: separate_xyz.outputs["X"], 1: divide_2},
296
+ attrs={"operation": "SNAP"},
297
+ )
298
+
299
+ combine_xyz_5 = nw.new_node(
300
+ Nodes.CombineXYZ, input_kwargs={"X": snap_5, "Y": snap_6}
301
+ )
302
+
303
+ group_6 = nw.new_node(
304
+ nodegroup_mix().name,
305
+ input_kwargs={
306
+ "Mask": greater_than,
307
+ "Vector 1": add_1.outputs["Vector"],
308
+ "Vector 2": combine_xyz_5,
309
+ },
310
+ )
311
+
312
+ white_noise_texture_1 = nw.new_node(
313
+ Nodes.WhiteNoiseTexture, input_kwargs={"Vector": group_6}
314
+ )
315
+
316
+ multiply_2 = nw.new_node(
317
+ Nodes.Math,
318
+ input_kwargs={0: divide_1, 1: 2.0000},
319
+ attrs={"operation": "MULTIPLY"},
320
+ )
321
+
322
+ group_9 = nw.new_node(
323
+ nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap_4, 1: multiply_2}
324
+ )
325
+
326
+ multiply_3 = nw.new_node(
327
+ Nodes.Math,
328
+ input_kwargs={0: divide_2, 1: 2.0000},
329
+ attrs={"operation": "MULTIPLY"},
330
+ )
331
+
332
+ group_7 = nw.new_node(
333
+ nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap_6, 1: multiply_3}
334
+ )
335
+
336
+ group_8 = nw.new_node(
337
+ nodegroup_mix().name,
338
+ input_kwargs={"Mask": greater_than, "Vector 1": group_9, "Vector 2": group_7},
339
+ )
340
+
341
+ group_output = nw.new_node(
342
+ Nodes.GroupOutput,
343
+ input_kwargs={
344
+ "Result": mix_1.outputs[2],
345
+ "Tile Color": white_noise_texture_1.outputs["Color"],
346
+ "Tile Type 1": greater_than,
347
+ "Tile Type 2": group_8,
348
+ },
349
+ attrs={"is_active_output": True},
350
+ )
InternScenes/InternScenes_Real2Sim/materials/tiles/hexagon.py ADDED
@@ -0,0 +1,424 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2024, Princeton University.
2
+
3
+ # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory
4
+ # of this source tree.
5
+
6
+ # Authors: Yiming Zuo
7
+
8
+ from infinigen.core.nodes import node_utils
9
+ from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler
10
+
11
+ from .utils import nodegroup_scalar_positive_modulo
12
+
13
+
14
+ @node_utils.to_nodegroup(
15
+ "nodegroup_distance_to_axis", singleton=False, type="ShaderNodeTree"
16
+ )
17
+ def nodegroup_distance_to_axis(nw: NodeWrangler):
18
+ # Code generated using version 2.6.5 of the node_transpiler
19
+
20
+ group_input = nw.new_node(
21
+ Nodes.GroupInput,
22
+ expose_input=[
23
+ ("NodeSocketVector", "Vector", (0.0000, 0.0000, 0.0000)),
24
+ ("NodeSocketVector", "Axis", (0.0000, 0.0000, 0.0000)),
25
+ ],
26
+ )
27
+
28
+ length = nw.new_node(
29
+ Nodes.VectorMath,
30
+ input_kwargs={0: group_input.outputs["Vector"]},
31
+ attrs={"operation": "LENGTH"},
32
+ )
33
+
34
+ power = nw.new_node(
35
+ Nodes.Math,
36
+ input_kwargs={0: length.outputs["Value"], 1: 2.0000},
37
+ attrs={"operation": "POWER"},
38
+ )
39
+
40
+ normalize = nw.new_node(
41
+ Nodes.VectorMath,
42
+ input_kwargs={0: group_input.outputs["Axis"]},
43
+ attrs={"operation": "NORMALIZE"},
44
+ )
45
+
46
+ dot_product = nw.new_node(
47
+ Nodes.VectorMath,
48
+ input_kwargs={0: group_input.outputs["Vector"], 1: normalize.outputs["Vector"]},
49
+ attrs={"operation": "DOT_PRODUCT"},
50
+ )
51
+
52
+ power_1 = nw.new_node(
53
+ Nodes.Math,
54
+ input_kwargs={0: dot_product.outputs["Value"], 1: 2.0000},
55
+ attrs={"operation": "POWER"},
56
+ )
57
+
58
+ subtract = nw.new_node(
59
+ Nodes.Math, input_kwargs={0: power, 1: power_1}, attrs={"operation": "SUBTRACT"}
60
+ )
61
+
62
+ sqrt = nw.new_node(
63
+ Nodes.Math, input_kwargs={0: subtract}, attrs={"operation": "SQRT"}
64
+ )
65
+
66
+ group_output = nw.new_node(
67
+ Nodes.GroupOutput,
68
+ input_kwargs={"Distance": sqrt},
69
+ attrs={"is_active_output": True},
70
+ )
71
+
72
+
73
+ @node_utils.to_nodegroup("nodegroup_hex_single", singleton=False, type="ShaderNodeTree")
74
+ def nodegroup_hex_single(nw: NodeWrangler):
75
+ # Code generated using version 2.6.5 of the node_transpiler
76
+
77
+ group_input = nw.new_node(
78
+ Nodes.GroupInput,
79
+ expose_input=[
80
+ ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)),
81
+ ("NodeSocketFloat", "Size", 0.5000),
82
+ ],
83
+ )
84
+
85
+ separate_xyz_3 = nw.new_node(
86
+ Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]}
87
+ )
88
+
89
+ multiply = nw.new_node(
90
+ Nodes.Math,
91
+ input_kwargs={0: group_input.outputs["Size"], 1: 1.0000},
92
+ attrs={"operation": "MULTIPLY"},
93
+ )
94
+
95
+ multiply_1 = nw.new_node(
96
+ Nodes.Math,
97
+ input_kwargs={0: group_input.outputs["Size"], 1: 1.7321},
98
+ attrs={"operation": "MULTIPLY"},
99
+ )
100
+
101
+ combine_xyz_2 = nw.new_node(
102
+ Nodes.CombineXYZ, input_kwargs={"X": multiply, "Y": multiply_1}
103
+ )
104
+
105
+ separate_xyz_4 = nw.new_node(
106
+ Nodes.SeparateXYZ, input_kwargs={"Vector": combine_xyz_2}
107
+ )
108
+
109
+ snap = nw.new_node(
110
+ Nodes.Math,
111
+ input_kwargs={0: separate_xyz_3.outputs["Y"], 1: separate_xyz_4.outputs["Y"]},
112
+ attrs={"operation": "SNAP"},
113
+ )
114
+
115
+ multiply_2 = nw.new_node(
116
+ Nodes.Math, input_kwargs={0: snap, 1: 0.5774}, attrs={"operation": "MULTIPLY"}
117
+ )
118
+
119
+ add = nw.new_node(
120
+ Nodes.Math, input_kwargs={0: multiply_2, 1: separate_xyz_3.outputs["X"]}
121
+ )
122
+
123
+ group_3 = nw.new_node(
124
+ nodegroup_scalar_positive_modulo().name,
125
+ input_kwargs={0: add, 1: separate_xyz_4.outputs["X"]},
126
+ )
127
+
128
+ group_4 = nw.new_node(
129
+ nodegroup_scalar_positive_modulo().name,
130
+ input_kwargs={0: separate_xyz_3.outputs["Y"], 1: separate_xyz_4.outputs["Y"]},
131
+ )
132
+
133
+ combine_xyz_3 = nw.new_node(
134
+ Nodes.CombineXYZ, input_kwargs={"X": group_3, "Y": group_4}
135
+ )
136
+
137
+ multiply_3 = nw.new_node(
138
+ Nodes.VectorMath,
139
+ input_kwargs={0: combine_xyz_2, 1: (0.5000, 0.3333, 0.0000)},
140
+ attrs={"operation": "MULTIPLY"},
141
+ )
142
+
143
+ subtract = nw.new_node(
144
+ Nodes.VectorMath,
145
+ input_kwargs={0: combine_xyz_3, 1: multiply_3.outputs["Vector"]},
146
+ attrs={"operation": "SUBTRACT"},
147
+ )
148
+
149
+ reroute = nw.new_node(
150
+ Nodes.Reroute, input_kwargs={"Input": subtract.outputs["Vector"]}
151
+ )
152
+
153
+ group = nw.new_node(
154
+ nodegroup_distance_to_axis().name,
155
+ input_kwargs={"Vector": reroute, "Axis": (0.0000, 1.0000, 0.0000)},
156
+ )
157
+
158
+ group_1 = nw.new_node(
159
+ nodegroup_distance_to_axis().name,
160
+ input_kwargs={"Vector": reroute, "Axis": (0.8660, -0.5000, 0.0000)},
161
+ )
162
+
163
+ group_2 = nw.new_node(
164
+ nodegroup_distance_to_axis().name,
165
+ input_kwargs={"Vector": reroute, "Axis": (-0.8660, -0.5000, 0.0000)},
166
+ )
167
+
168
+ combine_xyz_1 = nw.new_node(
169
+ Nodes.CombineXYZ, input_kwargs={"X": group, "Y": group_1, "Z": group_2}
170
+ )
171
+
172
+ snap_1 = nw.new_node(
173
+ Nodes.Math,
174
+ input_kwargs={0: separate_xyz_3.outputs["Y"], 1: separate_xyz_4.outputs["Y"]},
175
+ attrs={"operation": "SNAP"},
176
+ )
177
+
178
+ snap_2 = nw.new_node(
179
+ Nodes.Math,
180
+ input_kwargs={0: add, 1: separate_xyz_4.outputs["X"]},
181
+ attrs={"operation": "SNAP"},
182
+ )
183
+
184
+ combine_xyz = nw.new_node(Nodes.CombineXYZ, input_kwargs={"X": snap_1, "Y": snap_2})
185
+
186
+ white_noise_texture = nw.new_node(
187
+ Nodes.WhiteNoiseTexture, input_kwargs={"Vector": combine_xyz}
188
+ )
189
+
190
+ divide = nw.new_node(
191
+ Nodes.Math,
192
+ input_kwargs={0: snap_2, 1: separate_xyz_4.outputs["X"]},
193
+ attrs={"operation": "DIVIDE"},
194
+ )
195
+
196
+ group_5 = nw.new_node(
197
+ nodegroup_scalar_positive_modulo().name, input_kwargs={0: divide, 1: 2.0000}
198
+ )
199
+
200
+ greater_than = nw.new_node(
201
+ Nodes.Math, input_kwargs={0: group_5}, attrs={"operation": "GREATER_THAN"}
202
+ )
203
+
204
+ group_output = nw.new_node(
205
+ Nodes.GroupOutput,
206
+ input_kwargs={
207
+ "UV": combine_xyz_1,
208
+ "Color": white_noise_texture.outputs["Color"],
209
+ "Value": greater_than,
210
+ },
211
+ attrs={"is_active_output": True},
212
+ )
213
+
214
+
215
+ @node_utils.to_nodegroup("nodegroup_hexagon", singleton=False, type="ShaderNodeTree")
216
+ def nodegroup_hexagon(nw: NodeWrangler):
217
+ # Code generated using version 2.6.5 of the node_transpiler
218
+
219
+ group_input = nw.new_node(
220
+ Nodes.GroupInput,
221
+ expose_input=[
222
+ ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)),
223
+ ("NodeSocketFloat", "Subtiles Number", 1.0000),
224
+ ("NodeSocketFloat", "Aspect Ratio", 5.0000),
225
+ ("NodeSocketFloatFactor", "border", 0.1000),
226
+ ("NodeSocketFloatFactor", "Flatness", 0.9000),
227
+ ],
228
+ )
229
+
230
+ multiply = nw.new_node(
231
+ Nodes.Math,
232
+ input_kwargs={0: group_input.outputs["border"], 1: 0.8660},
233
+ attrs={"operation": "MULTIPLY"},
234
+ )
235
+
236
+ reroute = nw.new_node(Nodes.Reroute, input_kwargs={"Input": multiply})
237
+
238
+ size = nw.new_node(Nodes.Value, label="Size")
239
+ size.outputs[0].default_value = 1.0000
240
+
241
+ multiply_1 = nw.new_node(
242
+ Nodes.Math, input_kwargs={0: size}, attrs={"operation": "MULTIPLY"}
243
+ )
244
+
245
+ value = nw.new_node(Nodes.Value)
246
+ value.outputs[0].default_value = 0.5000
247
+
248
+ mapping = nw.new_node(
249
+ Nodes.Mapping,
250
+ input_kwargs={"Vector": group_input.outputs["Coordinate"], "Scale": value},
251
+ )
252
+
253
+ group_5 = nw.new_node(
254
+ nodegroup_hex_single().name, input_kwargs={"Coordinate": mapping, "Size": size}
255
+ )
256
+
257
+ separate_xyz_5 = nw.new_node(
258
+ Nodes.SeparateXYZ, input_kwargs={"Vector": group_5.outputs["UV"]}
259
+ )
260
+
261
+ value_3 = nw.new_node(Nodes.Value)
262
+ value_3.outputs[0].default_value = 0.0000
263
+
264
+ smooth_max = nw.new_node(
265
+ Nodes.Math,
266
+ input_kwargs={
267
+ 0: separate_xyz_5.outputs["X"],
268
+ 1: separate_xyz_5.outputs["Y"],
269
+ 2: value_3,
270
+ },
271
+ attrs={"operation": "SMOOTH_MAX"},
272
+ )
273
+
274
+ smooth_max_1 = nw.new_node(
275
+ Nodes.Math,
276
+ input_kwargs={0: smooth_max, 1: separate_xyz_5.outputs["Z"], 2: value_3},
277
+ attrs={"operation": "SMOOTH_MAX"},
278
+ )
279
+
280
+ subtract = nw.new_node(
281
+ Nodes.Math,
282
+ input_kwargs={0: multiply_1, 1: smooth_max_1},
283
+ attrs={"operation": "SUBTRACT"},
284
+ )
285
+
286
+ mix = nw.new_node(
287
+ Nodes.Mix,
288
+ input_kwargs={0: reroute, 6: subtract},
289
+ attrs={"blend_type": "BURN", "data_type": "RGBA"},
290
+ )
291
+
292
+ mix_1 = nw.new_node(
293
+ Nodes.Mix,
294
+ input_kwargs={
295
+ 0: group_input.outputs["Flatness"],
296
+ 6: mix.outputs[2],
297
+ 7: (1.0000, 1.0000, 1.0000, 1.0000),
298
+ },
299
+ attrs={"blend_type": "DODGE", "data_type": "RGBA"},
300
+ )
301
+
302
+ multiply_2 = nw.new_node(
303
+ Nodes.Math, input_kwargs={0: size}, attrs={"operation": "MULTIPLY"}
304
+ )
305
+
306
+ multiply_3 = nw.new_node(
307
+ Nodes.Math, input_kwargs={0: size, 1: 0.8660}, attrs={"operation": "MULTIPLY"}
308
+ )
309
+
310
+ combine_xyz = nw.new_node(
311
+ Nodes.CombineXYZ, input_kwargs={"X": multiply_2, "Y": multiply_3}
312
+ )
313
+
314
+ multiply_4 = nw.new_node(
315
+ Nodes.Math, input_kwargs={0: size, 1: 99.0000}, attrs={"operation": "MULTIPLY"}
316
+ )
317
+
318
+ combine_xyz_1 = nw.new_node(Nodes.CombineXYZ, input_kwargs={"X": multiply_4})
319
+
320
+ add = nw.new_node(Nodes.VectorMath, input_kwargs={0: combine_xyz, 1: combine_xyz_1})
321
+
322
+ add_1 = nw.new_node(
323
+ Nodes.VectorMath, input_kwargs={0: mapping, 1: add.outputs["Vector"]}
324
+ )
325
+
326
+ group_6 = nw.new_node(
327
+ nodegroup_hex_single().name,
328
+ input_kwargs={"Coordinate": add_1.outputs["Vector"], "Size": size},
329
+ )
330
+
331
+ separate_xyz_6 = nw.new_node(
332
+ Nodes.SeparateXYZ, input_kwargs={"Vector": group_6.outputs["UV"]}
333
+ )
334
+
335
+ smooth_max_2 = nw.new_node(
336
+ Nodes.Math,
337
+ input_kwargs={
338
+ 0: separate_xyz_6.outputs["X"],
339
+ 1: separate_xyz_6.outputs["Y"],
340
+ 2: value_3,
341
+ },
342
+ attrs={"operation": "SMOOTH_MAX"},
343
+ )
344
+
345
+ smooth_max_3 = nw.new_node(
346
+ Nodes.Math,
347
+ input_kwargs={0: smooth_max_2, 1: separate_xyz_6.outputs["Z"], 2: value_3},
348
+ attrs={"operation": "SMOOTH_MAX"},
349
+ )
350
+
351
+ subtract_1 = nw.new_node(
352
+ Nodes.Math,
353
+ input_kwargs={0: multiply_1, 1: smooth_max_3},
354
+ attrs={"operation": "SUBTRACT"},
355
+ )
356
+
357
+ mix_3 = nw.new_node(
358
+ Nodes.Mix,
359
+ input_kwargs={0: reroute, 6: subtract_1},
360
+ attrs={"blend_type": "BURN", "data_type": "RGBA"},
361
+ )
362
+
363
+ mix_2 = nw.new_node(
364
+ Nodes.Mix,
365
+ input_kwargs={
366
+ 0: group_input.outputs["Flatness"],
367
+ 6: mix_3.outputs[2],
368
+ 7: (1.0000, 1.0000, 1.0000, 1.0000),
369
+ },
370
+ attrs={"blend_type": "DODGE", "data_type": "RGBA"},
371
+ )
372
+
373
+ mix_4 = nw.new_node(
374
+ Nodes.Mix,
375
+ input_kwargs={0: 1.0000, 6: mix_1.outputs[2], 7: mix_2.outputs[2]},
376
+ attrs={"blend_type": "ADD", "data_type": "RGBA"},
377
+ )
378
+
379
+ mix_5 = nw.new_node(
380
+ Nodes.Mix,
381
+ input_kwargs={0: 1.0000, 6: mix_1.outputs[2], 7: group_5.outputs["Color"]},
382
+ attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"},
383
+ )
384
+
385
+ mix_6 = nw.new_node(
386
+ Nodes.Mix,
387
+ input_kwargs={0: 1.0000, 6: mix_2.outputs[2], 7: group_6.outputs["Color"]},
388
+ attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"},
389
+ )
390
+
391
+ mix_7 = nw.new_node(
392
+ Nodes.Mix,
393
+ input_kwargs={0: 1.0000, 6: mix_5.outputs[2], 7: mix_6.outputs[2]},
394
+ attrs={"blend_type": "ADD", "data_type": "RGBA"},
395
+ )
396
+
397
+ greater_than = nw.new_node(
398
+ Nodes.Math,
399
+ input_kwargs={0: mix_1.outputs[2], 1: 0.0000},
400
+ attrs={"operation": "GREATER_THAN"},
401
+ )
402
+
403
+ multiply_5 = nw.new_node(
404
+ Nodes.Math,
405
+ input_kwargs={0: mix_1.outputs[2], 1: group_5.outputs["Value"]},
406
+ attrs={"operation": "MULTIPLY"},
407
+ )
408
+
409
+ greater_than_1 = nw.new_node(
410
+ Nodes.Math,
411
+ input_kwargs={0: multiply_5, 1: 0.0000},
412
+ attrs={"operation": "GREATER_THAN"},
413
+ )
414
+
415
+ group_output = nw.new_node(
416
+ Nodes.GroupOutput,
417
+ input_kwargs={
418
+ "Result": mix_4.outputs[2],
419
+ "Tile Color": mix_7.outputs[2],
420
+ "Tile Type 1": greater_than,
421
+ "Tile Type 2": greater_than_1,
422
+ },
423
+ attrs={"is_active_output": True},
424
+ )
InternScenes/InternScenes_Real2Sim/materials/tiles/triangle.py ADDED
@@ -0,0 +1,379 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2024, Princeton University.
2
+
3
+ # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory
4
+ # of this source tree.
5
+
6
+ # Authors: Yiming Zuo
7
+
8
+ from infinigen.core.nodes import node_utils
9
+ from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler
10
+
11
+ from .utils import nodegroup_scalar_positive_modulo
12
+
13
+
14
+ @node_utils.to_nodegroup(
15
+ "nodegroup_triangle_single", singleton=False, type="ShaderNodeTree"
16
+ )
17
+ def nodegroup_triangle_single(nw: NodeWrangler):
18
+ # Code generated using version 2.6.5 of the node_transpiler
19
+
20
+ value_2 = nw.new_node(Nodes.Value)
21
+ value_2.outputs[0].default_value = 0.0000
22
+
23
+ group_input = nw.new_node(
24
+ Nodes.GroupInput,
25
+ expose_input=[
26
+ ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)),
27
+ ("NodeSocketFloat", "Size", 0.5000),
28
+ ],
29
+ )
30
+
31
+ separate_xyz_3 = nw.new_node(
32
+ Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]}
33
+ )
34
+
35
+ multiply = nw.new_node(
36
+ Nodes.Math,
37
+ input_kwargs={0: group_input.outputs["Size"], 1: 0.8660},
38
+ attrs={"operation": "MULTIPLY"},
39
+ )
40
+
41
+ multiply_1 = nw.new_node(
42
+ Nodes.Math,
43
+ input_kwargs={0: group_input.outputs["Size"], 1: 0.7500},
44
+ attrs={"operation": "MULTIPLY"},
45
+ )
46
+
47
+ combine_xyz_2 = nw.new_node(
48
+ Nodes.CombineXYZ, input_kwargs={"X": multiply, "Y": multiply_1}
49
+ )
50
+
51
+ separate_xyz_4 = nw.new_node(
52
+ Nodes.SeparateXYZ, input_kwargs={"Vector": combine_xyz_2}
53
+ )
54
+
55
+ snap = nw.new_node(
56
+ Nodes.Math,
57
+ input_kwargs={0: separate_xyz_3.outputs["Y"], 1: separate_xyz_4.outputs["Y"]},
58
+ attrs={"operation": "SNAP"},
59
+ )
60
+
61
+ multiply_2 = nw.new_node(
62
+ Nodes.Math, input_kwargs={0: snap, 1: 0.5774}, attrs={"operation": "MULTIPLY"}
63
+ )
64
+
65
+ add = nw.new_node(
66
+ Nodes.Math, input_kwargs={0: multiply_2, 1: separate_xyz_3.outputs["X"]}
67
+ )
68
+
69
+ group_3 = nw.new_node(
70
+ nodegroup_scalar_positive_modulo().name,
71
+ input_kwargs={0: add, 1: separate_xyz_4.outputs["X"]},
72
+ )
73
+
74
+ group_4 = nw.new_node(
75
+ nodegroup_scalar_positive_modulo().name,
76
+ input_kwargs={0: separate_xyz_3.outputs["Y"], 1: separate_xyz_4.outputs["Y"]},
77
+ )
78
+
79
+ combine_xyz_3 = nw.new_node(
80
+ Nodes.CombineXYZ, input_kwargs={"X": group_3, "Y": group_4}
81
+ )
82
+
83
+ multiply_3 = nw.new_node(
84
+ Nodes.VectorMath,
85
+ input_kwargs={0: combine_xyz_2, 1: (0.5000, 0.3333, 0.0000)},
86
+ attrs={"operation": "MULTIPLY"},
87
+ )
88
+
89
+ subtract = nw.new_node(
90
+ Nodes.VectorMath,
91
+ input_kwargs={0: combine_xyz_3, 1: multiply_3.outputs["Vector"]},
92
+ attrs={"operation": "SUBTRACT"},
93
+ )
94
+
95
+ reroute = nw.new_node(
96
+ Nodes.Reroute, input_kwargs={"Input": subtract.outputs["Vector"]}
97
+ )
98
+
99
+ dot_product = nw.new_node(
100
+ Nodes.VectorMath,
101
+ input_kwargs={0: reroute, 1: (0.0000, 1.0000, 0.0000)},
102
+ attrs={"operation": "DOT_PRODUCT"},
103
+ )
104
+
105
+ dot_product_1 = nw.new_node(
106
+ Nodes.VectorMath,
107
+ input_kwargs={0: reroute, 1: (0.8660, -0.5000, 0.0000)},
108
+ attrs={"operation": "DOT_PRODUCT"},
109
+ )
110
+
111
+ dot_product_2 = nw.new_node(
112
+ Nodes.VectorMath,
113
+ input_kwargs={0: reroute, 1: (-0.8660, -0.5000, 0.0000)},
114
+ attrs={"operation": "DOT_PRODUCT"},
115
+ )
116
+
117
+ combine_xyz = nw.new_node(
118
+ Nodes.CombineXYZ,
119
+ input_kwargs={
120
+ "X": dot_product.outputs["Value"],
121
+ "Y": dot_product_1.outputs["Value"],
122
+ "Z": dot_product_2.outputs["Value"],
123
+ },
124
+ )
125
+
126
+ subtract_1 = nw.new_node(
127
+ Nodes.VectorMath,
128
+ input_kwargs={0: value_2, 1: combine_xyz},
129
+ attrs={"operation": "SUBTRACT"},
130
+ )
131
+
132
+ snap_1 = nw.new_node(
133
+ Nodes.Math,
134
+ input_kwargs={0: separate_xyz_3.outputs["Y"], 1: separate_xyz_4.outputs["Y"]},
135
+ attrs={"operation": "SNAP"},
136
+ )
137
+
138
+ snap_2 = nw.new_node(
139
+ Nodes.Math,
140
+ input_kwargs={0: add, 1: separate_xyz_4.outputs["X"]},
141
+ attrs={"operation": "SNAP"},
142
+ )
143
+
144
+ combine_xyz_1 = nw.new_node(
145
+ Nodes.CombineXYZ, input_kwargs={"X": snap_1, "Y": snap_2}
146
+ )
147
+
148
+ white_noise_texture = nw.new_node(
149
+ Nodes.WhiteNoiseTexture, input_kwargs={"Vector": combine_xyz_1}
150
+ )
151
+
152
+ divide = nw.new_node(
153
+ Nodes.Math,
154
+ input_kwargs={0: snap_2, 1: separate_xyz_4.outputs["X"]},
155
+ attrs={"operation": "DIVIDE"},
156
+ )
157
+
158
+ group = nw.new_node(
159
+ nodegroup_scalar_positive_modulo().name, input_kwargs={0: divide, 1: 2.0000}
160
+ )
161
+
162
+ greater_than = nw.new_node(
163
+ Nodes.Math, input_kwargs={0: group}, attrs={"operation": "GREATER_THAN"}
164
+ )
165
+
166
+ group_output = nw.new_node(
167
+ Nodes.GroupOutput,
168
+ input_kwargs={
169
+ "UV": subtract_1.outputs["Vector"],
170
+ "Color": white_noise_texture.outputs["Color"],
171
+ "Value": greater_than,
172
+ },
173
+ attrs={"is_active_output": True},
174
+ )
175
+
176
+
177
+ @node_utils.to_nodegroup("nodegroup_triangle", singleton=False, type="ShaderNodeTree")
178
+ def nodegroup_triangle(nw: NodeWrangler):
179
+ # Code generated using version 2.6.5 of the node_transpiler
180
+
181
+ group_input = nw.new_node(
182
+ Nodes.GroupInput,
183
+ expose_input=[
184
+ ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)),
185
+ ("NodeSocketFloat", "Subtiles Number", 1.0000),
186
+ ("NodeSocketFloat", "Aspect Ratio", 5.0000),
187
+ ("NodeSocketFloatFactor", "border", 0.1000),
188
+ ("NodeSocketFloatFactor", "Flatness", 0.9000),
189
+ ],
190
+ )
191
+
192
+ multiply = nw.new_node(
193
+ Nodes.Math,
194
+ input_kwargs={0: group_input.outputs["border"], 1: 0.5774},
195
+ attrs={"operation": "MULTIPLY"},
196
+ )
197
+
198
+ reroute = nw.new_node(Nodes.Reroute, input_kwargs={"Input": multiply})
199
+
200
+ value_6 = nw.new_node(Nodes.Value)
201
+ value_6.outputs[0].default_value = 1.0000
202
+
203
+ multiply_1 = nw.new_node(
204
+ Nodes.Math,
205
+ input_kwargs={0: value_6, 1: 0.2500},
206
+ attrs={"operation": "MULTIPLY"},
207
+ )
208
+
209
+ value = nw.new_node(Nodes.Value)
210
+ value.outputs[0].default_value = 0.4330
211
+
212
+ mapping_1 = nw.new_node(
213
+ Nodes.Mapping,
214
+ input_kwargs={"Vector": group_input.outputs["Coordinate"], "Scale": value},
215
+ )
216
+
217
+ reroute_1 = nw.new_node(Nodes.Reroute, input_kwargs={"Input": mapping_1})
218
+
219
+ group_8 = nw.new_node(
220
+ nodegroup_triangle_single().name,
221
+ input_kwargs={"Coordinate": reroute_1, "Size": value_6},
222
+ )
223
+
224
+ separate_xyz_5 = nw.new_node(
225
+ Nodes.SeparateXYZ, input_kwargs={"Vector": group_8.outputs["UV"]}
226
+ )
227
+
228
+ value_4 = nw.new_node(Nodes.Value)
229
+ value_4.outputs[0].default_value = 0.0000
230
+
231
+ smooth_max = nw.new_node(
232
+ Nodes.Math,
233
+ input_kwargs={
234
+ 0: separate_xyz_5.outputs["X"],
235
+ 1: separate_xyz_5.outputs["Y"],
236
+ 2: value_4,
237
+ },
238
+ attrs={"operation": "SMOOTH_MAX"},
239
+ )
240
+
241
+ smooth_max_1 = nw.new_node(
242
+ Nodes.Math,
243
+ input_kwargs={0: smooth_max, 1: separate_xyz_5.outputs["Z"], 2: value_4},
244
+ attrs={"operation": "SMOOTH_MAX"},
245
+ )
246
+
247
+ subtract = nw.new_node(
248
+ Nodes.Math,
249
+ input_kwargs={0: multiply_1, 1: smooth_max_1},
250
+ attrs={"operation": "SUBTRACT"},
251
+ )
252
+
253
+ mix_1 = nw.new_node(
254
+ Nodes.Mix,
255
+ input_kwargs={0: reroute, 6: subtract},
256
+ attrs={"blend_type": "BURN", "data_type": "RGBA"},
257
+ )
258
+
259
+ mix_4 = nw.new_node(
260
+ Nodes.Mix,
261
+ input_kwargs={
262
+ 0: group_input.outputs["Flatness"],
263
+ 6: mix_1.outputs[2],
264
+ 7: (1.0000, 1.0000, 1.0000, 1.0000),
265
+ },
266
+ attrs={"blend_type": "DODGE", "data_type": "RGBA"},
267
+ )
268
+
269
+ vector_rotate = nw.new_node(
270
+ Nodes.VectorRotate, input_kwargs={"Vector": reroute_1, "Angle": 3.1416}
271
+ )
272
+
273
+ group_7 = nw.new_node(
274
+ nodegroup_triangle_single().name,
275
+ input_kwargs={"Coordinate": vector_rotate, "Size": value_6},
276
+ )
277
+
278
+ separate_xyz_6 = nw.new_node(
279
+ Nodes.SeparateXYZ, input_kwargs={"Vector": group_7.outputs["UV"]}
280
+ )
281
+
282
+ smooth_max_2 = nw.new_node(
283
+ Nodes.Math,
284
+ input_kwargs={
285
+ 0: separate_xyz_6.outputs["X"],
286
+ 1: separate_xyz_6.outputs["Y"],
287
+ 2: value_4,
288
+ },
289
+ attrs={"operation": "SMOOTH_MAX"},
290
+ )
291
+
292
+ smooth_max_3 = nw.new_node(
293
+ Nodes.Math,
294
+ input_kwargs={0: smooth_max_2, 1: separate_xyz_6.outputs["Z"], 2: value_4},
295
+ attrs={"operation": "SMOOTH_MAX"},
296
+ )
297
+
298
+ subtract_1 = nw.new_node(
299
+ Nodes.Math,
300
+ input_kwargs={0: multiply_1, 1: smooth_max_3},
301
+ attrs={"operation": "SUBTRACT"},
302
+ )
303
+
304
+ mix_3 = nw.new_node(
305
+ Nodes.Mix,
306
+ input_kwargs={0: reroute, 6: subtract_1},
307
+ attrs={"blend_type": "BURN", "data_type": "RGBA"},
308
+ )
309
+
310
+ mix_2 = nw.new_node(
311
+ Nodes.Mix,
312
+ input_kwargs={
313
+ 0: group_input.outputs["Flatness"],
314
+ 6: mix_3.outputs[2],
315
+ 7: (1.0000, 1.0000, 1.0000, 1.0000),
316
+ },
317
+ attrs={"blend_type": "DODGE", "data_type": "RGBA"},
318
+ )
319
+
320
+ mix_5 = nw.new_node(
321
+ Nodes.Mix,
322
+ input_kwargs={0: 1.0000, 6: mix_4.outputs[2], 7: mix_2.outputs[2]},
323
+ attrs={"blend_type": "ADD", "data_type": "RGBA"},
324
+ )
325
+
326
+ mix_7 = nw.new_node(
327
+ Nodes.Mix,
328
+ input_kwargs={0: 1.0000, 6: mix_2.outputs[2], 7: group_7.outputs["Color"]},
329
+ attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"},
330
+ )
331
+
332
+ mix_6 = nw.new_node(
333
+ Nodes.Mix,
334
+ input_kwargs={0: 1.0000, 6: mix_4.outputs[2], 7: group_8.outputs["Color"]},
335
+ attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"},
336
+ )
337
+
338
+ mix_8 = nw.new_node(
339
+ Nodes.Mix,
340
+ input_kwargs={0: 1.0000, 6: mix_7.outputs[2], 7: mix_6.outputs[2]},
341
+ attrs={"blend_type": "ADD", "data_type": "RGBA"},
342
+ )
343
+
344
+ greater_than = nw.new_node(
345
+ Nodes.Math,
346
+ input_kwargs={0: mix_4.outputs[2], 1: 0.0000},
347
+ attrs={"operation": "GREATER_THAN"},
348
+ )
349
+
350
+ multiply_2 = nw.new_node(
351
+ Nodes.Math,
352
+ input_kwargs={0: mix_4.outputs[2], 1: group_8.outputs["Value"]},
353
+ attrs={"operation": "MULTIPLY"},
354
+ )
355
+
356
+ multiply_3 = nw.new_node(
357
+ Nodes.Math,
358
+ input_kwargs={0: mix_2.outputs[2], 1: group_7.outputs["Value"]},
359
+ attrs={"operation": "MULTIPLY"},
360
+ )
361
+
362
+ add = nw.new_node(Nodes.Math, input_kwargs={0: multiply_2, 1: multiply_3})
363
+
364
+ greater_than_1 = nw.new_node(
365
+ Nodes.Math,
366
+ input_kwargs={0: add, 1: 0.0000},
367
+ attrs={"operation": "GREATER_THAN"},
368
+ )
369
+
370
+ group_output = nw.new_node(
371
+ Nodes.GroupOutput,
372
+ input_kwargs={
373
+ "Result": mix_5.outputs[2],
374
+ "Tile Color": mix_8.outputs[2],
375
+ "Tile Type 1": greater_than,
376
+ "Tile Type 2": greater_than_1,
377
+ },
378
+ attrs={"is_active_output": True},
379
+ )
InternScenes/InternScenes_Real2Sim/materials/utils/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (180 Bytes). View file
 
InternScenes/InternScenes_Real2Sim/materials/utils/__pycache__/surface_utils.cpython-310.pyc ADDED
Binary file (5.62 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/wear_tear/__pycache__/procedural_edge_wear.cpython-310.pyc ADDED
Binary file (6.42 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/wear_tear/__pycache__/procedural_scratch.cpython-310.pyc ADDED
Binary file (4.39 kB). View file
 
InternScenes/InternScenes_Real2Sim/materials/woods/__pycache__/composite_wood_tile.cpython-310.pyc ADDED
Binary file (559 Bytes). View file
 
InternScenes/InternScenes_Real2Sim/materials/woods/__pycache__/crossed_wood_tile.cpython-310.pyc ADDED
Binary file (548 Bytes). View file
 
InternScenes/InternScenes_Real2Sim/materials/woods/__pycache__/hexagon_wood_tile.cpython-310.pyc ADDED
Binary file (555 Bytes). View file
 
InternScenes/InternScenes_Real2Sim/materials/woods/__pycache__/non_wood_tile.cpython-310.pyc ADDED
Binary file (952 Bytes). View file