Skip to content

Commit 4024da2

Browse files
committed
Merge branch 'sjeske/ui-improvements' into 'master'
Prepare for public release See merge request hhui/blendertool!3
2 parents 6aabe4c + dda78d3 commit 4024da2

File tree

11 files changed

+313
-111
lines changed

11 files changed

+313
-111
lines changed

README.md

Lines changed: 70 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,135 @@
1-
# SimLoader
2-
Loading animation sequences with meshio and fileseq
3-
1+
![](images/logo.svg)
42

5-
## 1. Clone the project
6-
`git clone https://www.graphics.rwth-aachen.de:9000/hhui/blendertool --recurse-submodules` to download both project and dependencies
3+
Loading animation sequences with meshio and fileseq
74

5+
- [1. Installation](#1-installation)
6+
- [1.1 Build from source (optional)](#11-build-from-source-optional)
7+
- [1.2 Install Addon](#12-install-addon)
8+
- [1.3 FAQs](#13-faqs)
9+
- [2. How to use](#2-how-to-use)
10+
- [2. Load the animation sequence you want](#2-load-the-animation-sequence-you-want)
11+
- [2.1 Absolute vs. Relative Paths](#21-absolute-vs-relative-paths)
12+
- [2.2 Sequence List View](#22-sequence-list-view)
13+
- [2.2.1 Enable/ Disable](#221-enable-disable)
14+
- [2.2.1 Refresh Sequence](#221-refresh-sequence)
15+
- [2.3 Settings](#23-settings)
16+
- [2.3.1 Geometry Nodes](#231-geometry-nodes)
17+
- [2.3.2 Path Information](#232-path-information)
18+
- [2.3.3 Attributes Settings](#233-attributes-settings)
19+
- [2.3.4 Split Norm per Vertex](#234-split-norm-per-vertex)
820

9-
## 2. Build & Install
21+
## 1. Installation
1022

11-
1. Build manually
23+
### 1.1 Build from source (optional)
1224

13-
Clone the project as mentioned above, then run `python3 build_addon.py`, no additional dependency required, only python3 standard library.
25+
1. Clone the project to download both project and dependencies
1426

15-
2. Or download directly the addon from [release](https://graphics.rwth-aachen.de:9000/hhui/blendertool/-/releases) page.
27+
```shell
28+
git clone https://www.graphics.rwth-aachen.de:9000/hhui/blendertool --recurse-submodules
29+
```
1630

31+
2. Build the installable `.zip` file by simply running the following command. This should produce a file called `blender_sequence_loader_{date}.zip`, where `{date}` is replaced with todays date. No other dependency other than standard python3 libraries are needed to build the addon.
1732

18-
After getting the .zip file, install and enable it using blender addon system. See [here](https://docs.blender.org/manual/en/latest/editors/preferences/addons.html#installing-add-ons) for more details.
33+
```shell
34+
python3 build_addon.py
35+
```
1936

37+
### 1.2 Install Addon
2038

21-
Note:
22-
1. You need to restart blender after enabling, otherwise some functionality may not work well.
23-
2. don't forget to remove the old version of this addon (if present), before adding new version of this addon to blender. (Actually, I not very sure if it's necessary, but I think this would be better)
39+
After obtaining an installable `.zip` file either from the releases page or from manually building the addon, this should be installed into blender. For more information on how to install addons see [here](https://docs.blender.org/manual/en/latest/editors/preferences/addons.html#installing-add-ons) for more details.
2440

41+
### 1.3 FAQs
2542

26-
### 2.1 Complicated way
43+
1. You may need to restart blender after enabling the addon for the first time, otherwise some functionality may not work. Technically this should not be **required**, but might be necessary in some untested versions of Blender.
2744

28-
If you want to keep developing on this addon, it would be easier to create a soft link(or Symlinks on windows) at the root directory to the dependencies.
45+
2. You may have to manually remove old versions of this addon (if present), before installing a new version into Blender. This should rarely be the case but might be the cause of some confusing error messages and issues.
2946

47+
## 2. How to use
3048

31-
## 3. How to use
49+
DISCLAIMER: Some of the screenshots may not be up to date with the most recent version of the addon, especially with respect to the text and ordering of UI elements.
3250

33-
After installing addon, you can find it here. (Or simply press `n` key)
51+
After installing addon, you can find it in the toolbar, which is accessible here or toggled by pressing the `n` key.
3452

3553
![start](images/0.png)
3654

3755
Then you can find it here.
3856

3957
![homepage](images/1.png)
4058

41-
### 3. Load the animation sequence you want.
59+
### 2. Load the animation sequence you want
4260

43-
#### 3.1
44-
you can select the directory through GUI, by clicking the rightmost icon. It will pop up the default blender file explorer. Then you can go to the directory you want, for example, like image showed below. **You only need to go to the directory, then select nothing, just click "Accept"**.
61+
You can select the directory in which your data is located through the GUI by clicking the rightmost icon. It will open the default blender file explorer. Then you can go to the directory you want, for example, like image showed below. **You only need navigate to the directory and click "Accept". Files are shown but not selectable in this dialogue.**
4562

4663
![selecticon](images/2.png)
4764

48-
Then the addon will automatically detect the sequencens it finds in this directory, then you simply select the sequence you want.
65+
Then the addon will automatically try to detect the sequences in this directory, so that you simply select the sequence you want. If the desired sequence is not shown, you can switch to enter a manual pattern, where a single `@` character is used to denote a running frame index.
4966

5067
![after_selecting](images/3.png)
5168

52-
##### 3.1.1
53-
There is a small checkbox about whether using `relative path` or not.
69+
#### 2.1 Absolute vs. Relative Paths
5470

55-
when toggling on, then you must save the blender file first, before load the sequence. Then this sequence will be loaded using relative path, from the .blend file. Also if you move the .blend file and data altogether to another directory, it still works.
71+
There is a small checkbox about whether to use `relative paths` or not.
5672

57-
If not toggling on, it will use abosulte path to load the sequence. And you don't need to save the .blend file.
73+
When toggled on, the blender file must be saved before loading the sequence. Then this sequence will be loaded using relative path from the location of the saved `.blend` file. As such, if you move the `.blend` file in conjunction with the data to another directory (keeping their relative locations the same) the sequence loader will still work. This is especially useful when working with cloud synchronized folders, whose absolute paths may be different on different computers.
5874

59-
![relative_path](images/4.png)
75+
If toggled off (default), it will use absolute path to load the sequence. For this, the `.blend` file does not have to be saved in advance.
6076

77+
![relative_path](images/4.png)
6178

62-
#### 3.2
79+
#### 2.2 Sequence List View
6380

64-
After the sequence being imported, it will be available in the `Sequences Imported` panel, and more details will be available in `Settings` panel.
81+
After the sequence being imported, it will be available in the `Imported Sequences` panel, with more settings being available in `Sequence Settings` panel once a sequence has been selected.
6582

6683
![settings](images/5.png)
6784

68-
Now, you can play/render the animation as usual.
85+
By default, all supported file formats are simply imported as geometry (a collection of vertices, lines, triangles and quads). As such, you should be able to directly play/render the animation if it contains geometry.
6986

70-
Note: when render the animation, please turn on the `Lock Interface`.
87+
Note: When rendering the animation, please turn on the `Lock Interface`. This will prevent artifacts from occurring, especially if the user continues to operate the Blender interface during the render process.
7188

7289
![lock interface](images/6.png)
7390

74-
##### 3.2.1 Enable/ Disable
91+
##### 2.2.1 Enable/ Disable
7592

76-
By `enable` means, that the sequence will be updated for each frame, and `disable` means that the sequence won't be updated for each frame, so it can save some computational resources if needed.
93+
It is possible to individually enable and disable sequences from updating when the animation frame changes. This is very useful when working with very large files or many sequences as it reduces the computational overhead of loading these sequences.
94+
`Enabled` means, that the sequence will be updated on frame change, and `Disabled` means that the sequence won't be updated on frame change.
7795

78-
##### 3.2.1 Refresh Sequence
96+
##### 2.2.1 Refresh Sequence
7997

80-
`Refresh Sequence` can be usefull, when you import the sequence, while the data is still being generated, and not finished yet. Refresh can detect the frames added after being imported.
98+
`Refresh Sequence` can be useful when the sequence is imported while the data is still being generated and not yet complete. Refreshing the sequence can detect the frames added after being imported.
8199

82-
#### 3.3 Settings
100+
#### 2.3 Settings
83101

84-
#### 3.3.1 Geometry Nodes
102+
#### 2.3.1 Geometry Nodes
85103

86-
We provide some basic templates for the geometry nodes, especially for the particeles/vertices-only data.
104+
While all files are imported as plain geometry, we provide some templates that we have found to be incredibly useful for visualizing particle data.
87105

88-
Applying `Point Cloud` geometry nodes, can convert the the vertices of the mesh to point clouds, which can be rendered only by [cycles](https://docs.blender.org/manual/en/latest/render/cycles/introduction.html).
106+
Applying the `Point Cloud` geometry node, the vertices of the mesh are converted to a point cloud, which can be rendered only by [cycles](https://docs.blender.org/manual/en/latest/render/cycles/introduction.html) and only as spheres. The exact geometry node setup can be seen in the geometry nodes tab and may be modified as desired, e.g. to set the particle radius.
89107

90-
Applying `Instances` geometry nodes, can convert the the vertices of the mesh to cubes, or others by adjusting the geometry nodes, which can be rendered by both [eevee](https://docs.blender.org/manual/en/latest/render/eevee/index.html) and [cycles](https://docs.blender.org/manual/en/latest/render/cycles/introduction.html).
108+
Applying `Instances` geometry nodes, the vertices of the mesh are converted to cubes, which can be rendered by both [eevee](https://docs.blender.org/manual/en/latest/render/eevee/index.html) and [cycles](https://docs.blender.org/manual/en/latest/render/cycles/introduction.html). The exact geometry node setup can be seen in the geometry nodes tab and may be modified as desired, e.g. to set the particle radius and to change the instanced geometry. **CAUTION: Because this node setup relies on the `Realize Instances` node, the memory usage increases extremely rapidly. Make sure to save the `.blend` file before attempting this, as Blender may run out of memory!!!**
91109

110+
Applying the `Mesh` geometry node will restore the default geometry nodes, which simply display the imported geometry as it is.
92111

93-
Applying `Mesh` geometry nodes, will use the default geoemtry ndoes.
112+
Notes:
94113

95-
Note:
96114
1. `Instances` is super memory hungry compared with `Point Cloud`.
97-
2. After applying `Point Cloud` or `Instances` geoemtry nodes, you need to assign the material inside the geometry nodes. So to save your work, you can simply assign the material here, then apply the `Point Cloud` or `Instances` geoemtry nodes.
115+
2. After applying `Point Cloud` or `Instances` geometry nodes, you need to assign the material inside the geometry nodes. So to save your work, you can simply assign the material here, then apply the `Point Cloud` or `Instances` geometry nodes.
116+
3. To access the attributes for shading, use the `Attribute` node in the Shader Editor and simply specify the attribute string. The imported attributes can be seen in the spreadsheet browser of the Geometry Nodes tab and are also listed in the addon UI.
98117

99118
![material](images/7.png)
100119

120+
#### 2.3.2 Path Information
101121

102-
#### 3.3.2 Path Information
103-
104-
Here shows the path of this sequence, however it's not editable.
122+
This shows the path of the sequence for debugging purposes, however it's not editable.
105123

106-
#### 3.3.3 Attributes Settings
124+
#### 2.3.3 Attributes Settings
107125

108-
Here shows the available **Vertex Attributes**, it's not editable.
126+
This panel shows the available **Vertex Attributes**, it's not editable.
109127

110-
Note: in order to avoid the conflication with blender built-in attributes, so all the attributes names are renamed by adding a `2` at the end. For example, `id` -> `id2`.
128+
Note: In order to avoid conflicts with Blenders built-in attributes, all the attributes names are renamed by prefixing `bseq_`. For example, `id` -> `bseq_id`. Keep this in mind when accessing attributes in the shader editor.
111129

112-
#### 3.3.4 Split Norm per Vertex
130+
#### 2.3.4 Split Norm per Vertex
113131

114-
For more details, you can find it [here](https://docs.blender.org/manual/en/latest/modeling/meshes/structure.html#modeling-meshes-normals-custom). This is an easy way to set the selected vertex attribute as this split normal.
132+
We also provide the ability to use a per-vertex vector attribute as custom normals for shading.
133+
For more details check the official documentation [here](https://docs.blender.org/manual/en/latest/modeling/meshes/structure.html#modeling-meshes-normals-custom).
115134

116-
Note: the addon does not check if the selected attribute is suitable for normals or not. E.g. if the data type of the attribute is int, then it will give a runtime error.
135+
Note: the addon does not check if the selected attribute is suitable for normals or not. E.g. if the data type of the attribute is int instead of float, then Blender will simply give a runtime error.

__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
bl_info = {
2-
"name": "Sim Loader",
2+
"name": "Sequence Loader",
33
"description": "Loader for meshio supported mesh files/ simulation sequences",
4-
"author": "Hantao Hui",
4+
"author": "Interactive Computer Graphics",
55
"version": (1, 0),
66
"blender": (3, 1, 0),
77
"warning": "",
@@ -46,7 +46,7 @@
4646

4747

4848
def register():
49-
bpy.app.handlers.load_post.append(SIMLOADER_initilize)
49+
bpy.app.handlers.load_post.append(SIMLOADER_initialize)
5050
for cls in classes:
5151
bpy.utils.register_class(cls)
5252
bpy.types.TEXT_MT_templates.append(draw_template)
@@ -66,7 +66,7 @@ def unregister():
6666
bpy.types.TEXT_MT_templates.remove(draw_template)
6767
del bpy.types.Scene.SIMLOADER
6868
del bpy.types.Object.SIMLOADER
69-
bpy.app.handlers.load_post.remove(SIMLOADER_initilize)
69+
bpy.app.handlers.load_post.remove(SIMLOADER_initialize)
7070
unsubscribe_to_selected()
7171

7272

build_addon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323

2424
today = str(date.today())
25-
with ZipFile(f'simloader_addon_{today}.zip', 'w') as addonzip:
25+
with ZipFile(f'blender_sequence_loader_{today}.zip', 'w') as addonzip:
2626
# write all directories
2727
for k, v in dirs.items():
2828
for subdir, dirs, files in os.walk(k):

images/0.png

169 KB
Loading

images/logo.png

52.6 KB
Loading

0 commit comments

Comments
 (0)