graphic design tool
git clone https://git.lucas.co/cce-designer.git
nodes/sphere.json (3K)
1 {
2 "name": "Sphere",
3 "type": "sphere",
4 "inputs": 0,
5 "outputs": 1,
6 "params": [
7 {
8 "name": "method",
9 "label": "Method",
10 "default": "UV",
11 "type": "choice:UV,Icosphere,Cube",
12 "description": "How the sphere is tessellated: UV uses latitude rows and longitude columns, Icosphere subdivides an icosahedron into even triangles, Cube projects a gridded cube into quads."
13 },
14 {
15 "name": "radius",
16 "label": "Radius",
17 "default": "0.5",
18 "type": "slider",
19 "description": "Radius of the sphere in world units, the distance from Center to every point on its surface."
20 },
21 {
22 "name": "rows",
23 "label": "Rows",
24 "default": "16",
25 "type": "spinbox",
26 "min": 2,
27 "max": 128,
28 "step": 1,
29 "show_when": "method == UV",
30 "description": "Number of latitude bands from pole to pole for the UV method. More rows give a smoother profile and more points.",
31 "group": "resolution"
32 },
33 {
34 "name": "columns",
35 "label": "Columns",
36 "default": "24",
37 "type": "spinbox",
38 "min": 3,
39 "max": 128,
40 "step": 1,
41 "show_when": "method == UV",
42 "description": "Number of longitude segments around the UV sphere. More columns give a rounder silhouette and more points.",
43 "group": "resolution"
44 },
45 {
46 "name": "frequency",
47 "label": "Frequency",
48 "default": "4",
49 "type": "spinbox",
50 "min": 1,
51 "max": 16,
52 "step": 1,
53 "show_when": "method == Icosphere",
54 "description": "How many times each icosahedron edge is divided for the Icosphere method; each of the 20 faces becomes Frequency squared triangles.",
55 "group": "resolution"
56 },
57 {
58 "name": "resolution",
59 "label": "Resolution",
60 "default": "8",
61 "type": "spinbox",
62 "min": 1,
63 "max": 64,
64 "step": 1,
65 "show_when": "method == Cube",
66 "description": "Grid divisions along each edge of every cube face for the Cube method; each face gets Resolution squared quads.",
67 "group": "resolution"
68 },
69 {
70 "name": "center_x",
71 "label": "Center X",
72 "default": "0.0",
73 "type": "slider:-2:2",
74 "description": "X position of the sphere's center in world units.",
75 "group": "place"
76 },
77 {
78 "name": "center_y",
79 "label": "Center Y",
80 "default": "0.55",
81 "type": "slider:-2:2",
82 "description": "Y (height) position of the sphere's center in world units.",
83 "group": "place"
84 },
85 {
86 "name": "center_z",
87 "label": "Center Z",
88 "default": "0.0",
89 "type": "slider:-2:2",
90 "description": "Z position of the sphere's center in world units.",
91 "group": "place"
92 },
93 {
94 "name": "color",
95 "label": "Color",
96 "default": "true",
97 "type": "toggle",
98 "description": "When on, colors each point by its surface direction (normal mapped to RGB); when off, the sphere uses the plain default color.",
99 "group": "look"
100 }
101 ]
102 }