Skip to content

Commit 82a143a

Browse files
Added materials and shader section to Documentation
1 parent 3190ac5 commit 82a143a

File tree

7 files changed

+66
-0
lines changed

7 files changed

+66
-0
lines changed
260 KB
Loading
24.3 KB
Loading
187 KB
Loading
15.7 KB
Loading
182 KB
Loading
154 KB
Loading
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: "Materials and Shaders"
3+
description: "Modifying the sequence's appearance"
4+
lead: "Modifying the sequence's appearance"
5+
date: 2020-11-16T13:59:39+01:00
6+
lastmod: 2020-11-16T13:59:39+01:00
7+
draft: false
8+
images: []
9+
menu:
10+
docs:
11+
parent: "tutorials"
12+
weight: 165
13+
toc: true
14+
---
15+
16+
## Intro
17+
18+
To enhance the look of your sequence, you can use your own custom Materials and Shaders. You don't have to assign a material for every new sequence, the package will load a default material automatically, but they give you more control over the look and appearance.
19+
20+
## Mesh sequences
21+
22+
![Difference between the default material and a custom material](Mesh_Material_Difference.jpg)
23+
24+
### Assigning materials
25+
26+
![The material options](Mesh_Material_Options.png)
27+
28+
Assigning a material to a mesh sequence works just like for every other mesh in Unity. Create your material, but then instead of assigning it in the mesh renderer directly, you have to go to the **Geometry Sequence Stream** component that can be found on the same Gameobject as your _Geometry Sequence Player_. Under **Mesh settings** you can find the **Mesh Material** slot, where you can assign your material.
29+
30+
> ☝️ Please note that the sequence thumbnail in the editor might not always be updated automatically. Sometimes you need to enter the playmode once so that changes are visible.
31+
32+
### Texture slot assignment
33+
34+
If you have a mesh sequence with textures, you can also control into which shader slot the texture will be applied. By default, the texture will always be applied to the Main/Albedo/Diffuse texture slot, which is defined in the shader as _\_MainTexture_. But you can also apply the texture to any other slot. Either you select one or more predefined slot in the **Apply to texture slots** variable, or you enter the name of the texture slot into the **Custom texture slots** list. This has to be the name of the texture slot as found in the shader, not the material! (Shader texture slot variables are often prefixed with an _Underscore).
35+
36+
## Pointcloud sequences
37+
38+
The appearances of the pointclouds are a more difficult to change, as they require special shaders to display the pointclouds correctly. However, there are some predefined settings you can use to easily and quickly change pointcloud rendering. These settings can be found under the **Geometry Sequence Stream** component.
39+
40+
![Pointcloud Settings](Pointcloud_Settings.png)
41+
42+
### Pointcloud size
43+
44+
![Pointcloud size difference](Pointcloud_Size.jpg)
45+
46+
With the pointcloud size parameter, you control the size of each point in Unity units. Usually 0.01 - 0.02 is a good range for most sequences.
47+
48+
### Pointcloud shape
49+
50+
![Pointcloud shape difference](Pointcloud_Shape.jpg)
51+
52+
The pointcloud shape let's you switch between different point rendering options. There are **Quads**, **Circles** and **Splats (Experimental)**. Quads are the default and look like pixels. For a softer look, circles are a good choice, but you might need to adjust the size a bit. Splats are half-transparent circles, which give the softest look, but they are not yet fully implemented and will look strange most of the time.
53+
54+
### Pointcloud emission
55+
56+
![Pointcloud emission difference](Pointcloud_Emission.jpg)
57+
58+
The pointcloud material is emissive by default, to give a look similar to an unlit material. You can disable the emission by setting this value to 0, or turn it up higher to give the points a glowing ember appearance. You need to enable bloom in your URP/HDRP volume settings to get the full effect.
59+
60+
### (Advanced) Changing the shader
61+
62+
You can also directly edit the Pointcloud shaders to more finely tune the appearance of the points. You need some experience with writing shaders for Unity though! You can find the shaders under:
63+
64+
´Packages > Geometry Sequence Player > Runtime > Shader > Resources´
65+
66+
You'll see two different sets of shaders, three shaders written in Shaderlab, and three ShaderGraphs, with a _RT suffix. The Shadergraph shaders are at the moment only used when the Polyspatial/Bounded rendering path of the Apple Vision Pro is used, otherwise the Shaderlab Shaders will be used

0 commit comments

Comments
 (0)