graphic design tool
git clone https://git.lucas.co/cce-designer.git
nodes/embryo.json (8.8K)
1 {
2 "name": "Embryo",
3 "type": "node",
4 "inputs": 1,
5 "outputs": 1,
6 "params": [
7 {
8 "name": "input",
9 "label": "Input",
10 "type": "node",
11 "default": "",
12 "description": "Node whose geometry is used as the seed shape when Source is set to Input."
13 },
14 {
15 "name": "source",
16 "label": "Source",
17 "type": "choice:Internal,Input",
18 "default": "Internal",
19 "description": "Starting shape: Internal builds a UV sphere from Radius and Base Resolution; Input uses the geometry wired into Input."
20 },
21 {
22 "name": "method",
23 "label": "Method",
24 "type": "choice:Basic,Scatter",
25 "default": "Basic",
26 "description": "Basic passes the source shape on as it is; Scatter scatters points over its surface and wraps them in a convex hull, giving an evenly spaced mesh."
27 },
28 {
29 "name": "base_resolution",
30 "label": "Base Resolution",
31 "type": "spinbox",
32 "default": "50",
33 "min": 3,
34 "max": 100,
35 "step": 1,
36 "show_when": "source == Internal",
37 "description": "Rows and columns of the internal UV sphere. Higher values give a smoother, denser seed.",
38 "group": "source"
39 },
40 {
41 "name": "radius",
42 "label": "Radius",
43 "type": "slider",
44 "default": "0.5",
45 "min": 0.01,
46 "max": 10.0,
47 "step": 0.01,
48 "show_when": "source == Internal",
49 "description": "Radius of the internal sphere in world units, centered at the origin.",
50 "group": "source"
51 },
52 {
53 "name": "scatter_count",
54 "label": "Scatter Count",
55 "type": "spinbox",
56 "default": "1000",
57 "min": 10,
58 "max": 10000,
59 "step": 10,
60 "show_when": "method == Scatter",
61 "description": "Number of points scattered over the source surface before the hull is built. More points give a finer hull mesh.",
62 "group": "scatter"
63 },
64 {
65 "name": "scatter_seed",
66 "label": "Scatter Seed",
67 "type": "slider",
68 "default": "1.1",
69 "min": 0.0,
70 "max": 10.0,
71 "step": 0.1,
72 "show_when": "method == Scatter",
73 "description": "Random seed for the scatter. Change it for a different but equally spaced point layout.",
74 "group": "scatter"
75 },
76 {
77 "name": "relax_points",
78 "label": "Relax Points",
79 "type": "toggle",
80 "default": "true",
81 "show_when": "method == Scatter",
82 "description": "When on, pushes the scattered points apart across the surface so they are evenly spaced before the hull is built.",
83 "group": "scatter"
84 },
85 {
86 "name": "scatter_relax_iterations",
87 "label": "Scatter Relax Iterations",
88 "type": "spinbox",
89 "default": "50",
90 "min": 0,
91 "max": 100,
92 "step": 1,
93 "show_when": "method == Scatter && relax_points == true",
94 "description": "How many push-apart passes the scattered points get. More passes give a more even spacing; 0 does none.",
95 "group": "scatter"
96 },
97 {
98 "name": "scale_radii_by",
99 "label": "Scale Radii By",
100 "type": "slider",
101 "default": "1.248",
102 "min": 0.0,
103 "max": 2.0,
104 "step": 0.001,
105 "show_when": "method == Scatter && relax_points == true",
106 "description": "Multiplier on each scattered point's push radius, which is derived from the surface area per point. Larger values spread points more forcefully.",
107 "group": "scatter"
108 },
109 {
110 "name": "use_max_relax_radius",
111 "label": "Use Max Relax Radius",
112 "type": "toggle",
113 "default": "true",
114 "show_when": "method == Scatter && relax_points == true",
115 "description": "When on, the scattered points' push radius is capped at Scatter Relax Radius.",
116 "group": "scatter"
117 },
118 {
119 "name": "scatter_relax_radius",
120 "label": "Scatter Relax Radius",
121 "type": "slider",
122 "default": "10",
123 "min": 0.0,
124 "max": 100.0,
125 "step": 0.1,
126 "show_when": "method == Scatter && relax_points == true && use_max_relax_radius == true",
127 "description": "Upper limit on the scattered points' push radius in world units, used when Use Max Relax Radius is on.",
128 "group": "scatter"
129 },
130 {
131 "name": "relax_iterations",
132 "label": "Relax Iterations",
133 "type": "spinbox",
134 "default": "0",
135 "min": 0,
136 "max": 50,
137 "step": 1,
138 "description": "Passes of the final repel relax that pushes the mesh's points apart. 0 turns the relax off.",
139 "group": "relax"
140 },
141 {
142 "name": "relax_radius",
143 "label": "Relax Radius",
144 "type": "slider",
145 "default": "1",
146 "min": 0.001,
147 "max": 1.0,
148 "step": 0.001,
149 "description": "Radius in world units of the sphere each point pushes with in the final relax; points closer than twice this move apart.",
150 "group": "relax"
151 },
152 {
153 "name": "relax_in_3d_space",
154 "label": "Relax in 3D Space",
155 "type": "toggle",
156 "default": "false",
157 "description": "When off, the final relax slides points along the surface to keep its shape; when on, points may move freely in 3D.",
158 "group": "relax"
159 },
160 {
161 "name": "subdivision_depth",
162 "label": "Subdivision Depth",
163 "type": "spinbox",
164 "default": "0",
165 "min": 0,
166 "max": 3,
167 "step": 1,
168 "description": "How many times each triangle is split into four at the end, without smoothing. 0 leaves the mesh as is.",
169 "group": "subdivide"
170 }
171 ],
172 "children": [
173 {
174 "name": "input1",
175 "type": "input",
176 "params": [],
177 "position": [
178 2.0,
179 0.0
180 ],
181 "geometry_visible": false
182 },
183 {
184 "name": "sphere1",
185 "type": "sphere",
186 "position": [
187 0.0,
188 0.0
189 ],
190 "params": [
191 {
192 "name": "radius",
193 "default": "chf(\"../radius\")",
194 "expr": true
195 },
196 {
197 "name": "rows",
198 "default": "chi(\"../base_resolution\")",
199 "expr": true
200 },
201 {
202 "name": "columns",
203 "default": "chi(\"../base_resolution\")",
204 "expr": true
205 },
206 {
207 "name": "center_y",
208 "default": "0.0"
209 }
210 ],
211 "geometry_visible": false
212 },
213 {
214 "name": "source1",
215 "type": "switch",
216 "position": [
217 1.0,
218 1.0
219 ],
220 "params": [
221 {
222 "name": "input",
223 "default": "sphere1"
224 },
225 {
226 "name": "input_2",
227 "default": "input1"
228 },
229 {
230 "name": "index",
231 "default": "chi(\"../source\")",
232 "expr": true
233 }
234 ],
235 "geometry_visible": false
236 },
237 {
238 "name": "scatter1",
239 "type": "scatter",
240 "position": [
241 2.0,
242 2.0
243 ],
244 "params": [
245 {
246 "name": "input",
247 "default": "source1"
248 },
249 {
250 "name": "mode",
251 "default": "Surface"
252 },
253 {
254 "name": "points",
255 "default": "chi(\"../scatter_count\")",
256 "expr": true
257 },
258 {
259 "name": "seed",
260 "default": "chf(\"../scatter_seed\")",
261 "expr": true
262 },
263 {
264 "name": "relax_points",
265 "default": "chb(\"../relax_points\")",
266 "expr": true
267 },
268 {
269 "name": "relax_iterations",
270 "default": "chi(\"../scatter_relax_iterations\")",
271 "expr": true
272 },
273 {
274 "name": "scale_radii_by",
275 "default": "chf(\"../scale_radii_by\")",
276 "expr": true
277 },
278 {
279 "name": "use_max_relax_radius",
280 "default": "chb(\"../use_max_relax_radius\")",
281 "expr": true
282 },
283 {
284 "name": "max_relax_radius",
285 "default": "chf(\"../scatter_relax_radius\")",
286 "expr": true
287 },
288 {
289 "name": "markers",
290 "default": "false"
291 }
292 ],
293 "geometry_visible": false
294 },
295 {
296 "name": "hull1",
297 "type": "hull",
298 "position": [
299 2.0,
300 3.0
301 ],
302 "params": [
303 {
304 "name": "input",
305 "default": "scatter1"
306 }
307 ],
308 "geometry_visible": false
309 },
310 {
311 "name": "method1",
312 "type": "switch",
313 "position": [
314 1.0,
315 4.0
316 ],
317 "params": [
318 {
319 "name": "input",
320 "default": "source1"
321 },
322 {
323 "name": "input_2",
324 "default": "hull1"
325 },
326 {
327 "name": "index",
328 "default": "chi(\"../method\")",
329 "expr": true
330 }
331 ],
332 "geometry_visible": false
333 },
334 {
335 "name": "relax1",
336 "type": "relax",
337 "position": [
338 1.0,
339 5.0
340 ],
341 "params": [
342 {
343 "name": "input",
344 "default": "method1"
345 },
346 {
347 "name": "mode",
348 "default": "Repel"
349 },
350 {
351 "name": "iterations",
352 "default": "chi(\"../relax_iterations\")",
353 "expr": true
354 },
355 {
356 "name": "radius",
357 "default": "chf(\"../relax_radius\")",
358 "expr": true
359 },
360 {
361 "name": "in_3d_space",
362 "default": "chb(\"../relax_in_3d_space\")",
363 "expr": true
364 }
365 ],
366 "geometry_visible": false
367 },
368 {
369 "name": "subdivide1",
370 "type": "subdivide",
371 "position": [
372 1.0,
373 6.0
374 ],
375 "params": [
376 {
377 "name": "input",
378 "default": "relax1"
379 },
380 {
381 "name": "depth",
382 "default": "chi(\"../subdivision_depth\")",
383 "expr": true
384 }
385 ],
386 "geometry_visible": false
387 },
388 {
389 "name": "normal1",
390 "type": "normal",
391 "position": [
392 1.0,
393 7.0
394 ],
395 "params": [
396 {
397 "name": "input",
398 "default": "subdivide1"
399 }
400 ],
401 "geometry_visible": true
402 },
403 {
404 "name": "output1",
405 "type": "output",
406 "position": [
407 1.0,
408 8.0
409 ],
410 "params": [
411 {
412 "name": "input",
413 "default": "normal1"
414 }
415 ],
416 "geometry_visible": false
417 }
418 ]
419 }