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
* Add Record, re-license as GPL v2, FFmpeg is now an optional dependency
* Add video controls
* Add command line and recording to Lua
* Update readme/docs add ffmpeg options
Copy file name to clipboardExpand all lines: DOCUMENTATION.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
14
14
SimpleFastOpenAtomicVisualiser (SFOAV) is intented to enable fast visualisation of atomic and molecular structure files and trajectories.
15
15
16
-
It is an MIT licensed C++ project hosted here [https://github.com/JerboaBurrow/SimpleFastOpenAtomicVisualiser/](https://github.com/JerboaBurrow/SimpleFastOpenAtomicVisualiser). The visualisations are produced using OpenGL 3.3. There are options for "ray-traced" atoms and bonds or procedural meshes.
16
+
It is a GPL licensed C++ project hosted here [https://github.com/JerboaBurrow/SimpleFastOpenAtomicVisualiser/](https://github.com/JerboaBurrow/SimpleFastOpenAtomicVisualiser). The visualisations are produced using OpenGL 3.3. There are options for "ray-traced" atoms and bonds or procedural meshes.
17
17
18
18
You can find the latest html Doxygen docs at [https://jerboaburrow.github.io/SimpleFastAtomicVisualiser/](https://jerboaburrow.github.io/SimpleFastAtomicVisualiser/).
It is possible to write Lua scripts to manipulate visualisation in SFOAV. By supplying a path as ```--script PATH.lua``` to a Lua file, SFOAV will run the file each frame update. The console exports the following methods in the sfoav library.
103
+
It is possible to write Lua scripts to manipulate visualisation in SFOAV. By supplying a path as ```-script PATH.lua``` to a Lua file, SFOAV will run the file each frame update. The console exports the following methods in the sfoav library.
103
104
104
105
> [!warning]
105
106
> Lua indexes from 1, but all sfoav library functions index from 0.
@@ -114,8 +115,11 @@ It is possible to write Lua scripts to manipulate visualisation in SFOAV. By sup
114
115
| getAtom | Atom index a | The Atom structure for a |
115
116
| atomCount || The number of atoms |
116
117
| getAtomsNeighbours | Atom index x, cutoff distance | The neighbours of a within the cutoff |
117
-
| setText | Text string |The neighbours of a within the cutoff|
118
+
| setText | Text string |Set the text display|
118
119
| getFrame || The current frame number (from 0) |
120
+
| toggleRecord || Start or stop video recording |
121
+
| play || Play the trajectory |
122
+
| pause || Pause playing the trajectory |
119
123
120
124
E.g. the following script will set Atom 0 to a random colour every frame.
121
125
@@ -143,6 +147,20 @@ for i = 1, #neighbours do
143
147
end
144
148
```
145
149
150
+
## Video
151
+
152
+
On macOS and Windows one release exists using jo_mpeg to write mp4 files.
153
+
154
+
On Linux two releases exist, the standalone ```sfoav``` which uses jo_mpeg for video writing, and the FFmpeg enabled version ```sfoav-ffmpeg``` which requires additional runtime dependencies (FFmpeg). The FFmpeg video quality is generally superior.
155
+
156
+
Videos are written out with the filename as the current timestamp.
157
+
158
+
Video frames are recorded at 60 fps whenever the camera or atoms are updated e.g. a new trajectory frame, new colours, camera moved etc.
159
+
160
+
Frames are written in the background which will impact visualisation frame rate.
161
+
162
+
For FFmpeg the ```-codec``` option accepts strings as seen via ```ffmpeg -codecs``` e.g. ```-codec nvenc_h264 -qp 21 -preset lossless``` for Nvidia's H264 encoder. Quality may be controlled by ```-preset```, as well as (depending on the codec) the ```-cp```, ```-crf```, and ```-qp``` arguments where 0 is best and 51 is worst. Other FFmpeg options are ```-bitrate``` and ```-maxBFrames``` and ```-gopSize```.
163
+
146
164
## Performance
147
165
148
166
For a system with an intel i7-4790K, Kingston A400 SATA SSD, a GTX 1080 ti, and 16 GB available RAM. SFOAV is capable of rendering at least 5,000,000 static atoms at 60 frames per second with 16x MSAA and with a moveable camera. At this scale moving the atoms will run cause drops to 30 fps, and frame increments will cost ~5 seconds.
0 commit comments