You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/docs/tutorials/materials/index.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,9 @@ toc: true
15
15
16
16
## Intro
17
17
18
-
To enhance the appearance of your sequences, you can apply your own custom Materials and Shaders.
18
+
To enhance the appearance of your sequences, you can apply your own custom Materials and Shaders. If you don't supply a material, an appropriate default material will be automatically assigned.
19
+
20
+
By default, an **unlit** material will be assigned to the sequence, which means they won't be affected by the scene lighting. Lit materials can either be created by yourself, or you can use one of the materials available under `Packages/Geometry Sequence Player/Runtime/Materials/Your selected Renderpath`
19
21
20
22
## Mesh sequences
21
23
@@ -43,6 +45,12 @@ Changing the appearance of the pointcloud works very differently compared to mes
43
45
44
46
### Pointcloud Render Path
45
47
48
+
The Geometry Sequence Player supports three different render paths:
49
+
50
+
-**ShaderGraph**
51
+
-**Legacy**
52
+
-**Polyspatial**
53
+
46
54
In Unity, there are two basic ways to create shaders. You can either code them yourselves, or use the visual coding tool _Shadergraph_. Both paths are supported by the Geometry Sequence Player, and with this option you can manually choose which should be used. For HDRP, URP and built-in (with the shadergraph package installed), we recommend the **Shadergraph** path. If you are more comfortable with coding shaders, or you use the built-in render without the shadergraph package, the **Legacy** render path is right for you. The **Polyspatial** render path should only be used when working with the Apple Vision Pro.
2. You can now optionally choose an output directory. If you don't choose one, a folder named *converted* will be created inside your sequence directory. 
78
+
2. You can now optionally choose an output directory. If you don't choose one, a folder named *converted* will be created inside your sequence directory.
3. The converter provides some settings which can be used to modify the sequence: 
81
+
3. The converter provides some settings which can be used to modify the sequence:
82
+

80
83
81
-
-**Generate textures for desktop devices (DDS):** This converts the textures into a format for desktop GPUs. Recommended to leave on, even when you only build for mobile devices, otherwise textures won't show up in the Unity editor.
82
-
-**Generate textures for mobile devices (ASTC):** If you plan to distribute your application on mobile devices (Android, IPhone, Meta Quest, Apple Vision Pro) and use textured meshes, you need to also generate .astc textures. You only need to transfer the .astc textures to your device, but not the .dds textures.
83
-
-**Convert to SRGB profile:** Activate when your textures look noticably darker / brighter after the conversion
84
-
-**Decimate Pointcloud:** You can downsize your pointcloud sequence with this option. The value determines the percentage of points left after conversion. E.g. setting the value to 30% will decrease the points of the sequence by 70%.
84
+
-**Save normals:** When enabled, the normals of the mesh or pointcloud sequence are exported. Only recommended to enable if you have custom normals
85
+
-**Pointcloud Settings:** Only affects pointclouds
86
+
-**Decimate Pointcloud:** You can downsize your pointcloud sequence with this option. The value determines the percentage of points left after conversion. E.g. setting the value to 30% will decrease the points of the sequence by 70%.
87
+
-**Merge Points by Distance:** Merges points that are close together. The higher the value, the more points will be merged. Useful if the data contains duplicated points
88
+
-**Estimate Normals:** Pointclouds usually don't come with normals. When this option is enabled, the normals will be reasonably estimated.
89
+
-**Texture Settings** Only affects mesh sequences with textures
90
+
-**Generate textures for desktop devices (DDS):** This converts the textures into a format for desktop GPUs. Recommended to leave on, even when you only build for mobile devices, otherwise textures won't show up in the Unity editor.
91
+
-**Generate textures for mobile devices (ASTC):** If you plan to distribute your application on mobile devices (Android, IPhone, Meta Quest, Apple Vision Pro) and use textured meshes, you need to also generate .astc textures. You only need to transfer the .astc textures to your device, but not the .dds textures.
92
+
-**Convert to SRGB profile:** Activate when your textures look noticably darker / brighter after the conversion
85
93
86
94
4. When you've set your input/output folders, click on ***Start Conversion***. You can optionally choose the amount of threads used for the conversion, which might come in handy for heavy/large sequences. 
87
95
@@ -93,7 +101,7 @@ If you want to export your data into the correct format directly, without using
93
101
94
102
### Pointcloud .ply files
95
103
96
-
For .ply files containing pointclouds, use the normal **little endian binary** .ply standard, but be sure to encode the **vertex positions as 32-bit floats** (not doubles), and use the **vertex colors as uchar RGBA**. You always need to provide the red, green, blue and alpha channel, even when your sequence doesn't use alpha values or colors at all. The alpha channel isn't used in the plugin right now, but it allows for faster file reads, as RGBA is the native Unity vertex color format. Don't include any vertex indices! Here is an example of how the header of a ply looks that is correctly formatted:
104
+
For .ply files containing pointclouds, use the normal **little endian binary** .ply standard, but be sure to encode the **vertex positions and normals as 32-bit floats** (not doubles), and use the **vertex colors as uchar RGBA**. You always need to provide the red, green, blue and alpha channel, even when your sequence doesn't use alpha values or colors at all. Normals are optional, and don't have to be used. Here is an example of how the header of a ply looks that is correctly formatted:
97
105
98
106
```ply
99
107
ply
@@ -103,22 +111,25 @@ element vertex 50000
103
111
property float x
104
112
property float y
105
113
property float z
114
+
property float nx
115
+
property float ny
116
+
property float nz
106
117
property uchar red
107
118
property uchar green
108
119
property uchar blue
109
120
property uchar alpha
110
121
end_header
111
122
```
112
123
113
-
As an example for how the data for a a single vertex (line) could look like this. Three XZY-Float values are followed by four RGBA byte/uchar values:
124
+
As an example for how the data for a a single vertex (line) could look like this. Three float position values are followed by another three normal floats and four RGBA byte/uchar values:
For .ply files containing meshes, you use the same **little endian binary** format as for the pointclouds, with the **vertex positions encoded as 32-bit floats**. Encode the **face indices as a uchar uint list**, as it is commonly done in the ply format. Only encode **faces as triangles**, so the uchar component of the face indices list should always be "3", the uInts should be 32-bit.
132
+
For .ply files containing meshes, you use the same **little endian binary** format as for the pointclouds, with the **vertex positions encoded as 32-bit floats**. Encode the **face indices as a uchar uint list**, as it is commonly done in the ply format. Only encode **faces as triangles**, so the uchar component of the face indices list should always be "3". Optionally, you can also supplement **per vertex normals** with the nx, ny and nz properties.
122
133
If you want to use textures/UV-coordinates, include the **U and V-coordinates as additional float propertys (property s and property t)** right behind the xyz properties.
123
134
An example header of a correctly formatted mesh ply file with UV-coordinates would look like this:
124
135
@@ -130,20 +141,23 @@ element vertex 73200
130
141
property float x
131
142
property float y
132
143
property float z
144
+
property float nx
145
+
property float ny
146
+
property float nz
133
147
property float s
134
148
property float t
135
149
element face 138844
136
150
property list uchar uint vertex_indices
137
151
end_header
138
152
```
139
153
140
-
The data for a single vertex (line) would look like this. Three XYZ-float values, followed by two float values for the UV-coordinates:
154
+
The data for a single vertex (line) would look like this. Three vertex position floats, followed by three vertex normal floats and two float values for the UV-coordinates:
"maxVertexCount": 26545, //The vertice count of the mesh/pointcloud with the highest vertice count in the whole sequence
172
187
"maxIndiceCount": 55423, //The indice count of the mesh/pointcloud with the highest indice count in the whole sequence
173
188
"maxBounds": [325.8575134277344, 295.0, 2103.5478515625, -18.240554809570312, -238.74757385253906, 0], //Bounds of the mesh in the format: MaxboundX, MaxboundY, MaxboundZ, MinboundX, MinboundY, MinboundZ
0 commit comments