sysl3d 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sysl3d-0.1.0/.gitignore +214 -0
- sysl3d-0.1.0/CODE_OF_CONDUCT.md +7 -0
- sysl3d-0.1.0/CONTRIBUTING.md +9 -0
- sysl3d-0.1.0/LICENSE +21 -0
- sysl3d-0.1.0/PKG-INFO +325 -0
- sysl3d-0.1.0/README.md +275 -0
- sysl3d-0.1.0/assets/animation.gif +0 -0
- sysl3d-0.1.0/assets/editing.gif +0 -0
- sysl3d-0.1.0/assets/hero.jpg +0 -0
- sysl3d-0.1.0/assets/interaction.gif +0 -0
- sysl3d-0.1.0/assets/paper_fig.jpg +0 -0
- sysl3d-0.1.0/examples/basic_scene.py +44 -0
- sysl3d-0.1.0/notebooks/test_extrude_primitives.ipynb +195 -0
- sysl3d-0.1.0/notebooks/test_primitives_3d.ipynb +197 -0
- sysl3d-0.1.0/notebooks/test_shaders.ipynb +364 -0
- sysl3d-0.1.0/notebooks/test_transforms_macros_comb.ipynb +208 -0
- sysl3d-0.1.0/pyproject.toml +132 -0
- sysl3d-0.1.0/requirements.txt +37 -0
- sysl3d-0.1.0/scripts/basic.py +33 -0
- sysl3d-0.1.0/scripts/test_offline_multipass.py +265 -0
- sysl3d-0.1.0/scripts/test_offline_single_pass.py +238 -0
- sysl3d-0.1.0/setup.cfg +4 -0
- sysl3d-0.1.0/sysl/__init__.py +81 -0
- sysl3d-0.1.0/sysl/shader/__init__.py +37 -0
- sysl3d-0.1.0/sysl/shader/evaluate.py +49 -0
- sysl3d-0.1.0/sysl/shader/evaluate_multipass.py +269 -0
- sysl3d-0.1.0/sysl/shader/evaluate_shader_trace.py +349 -0
- sysl3d-0.1.0/sysl/shader/evaluate_singlepass.py +865 -0
- sysl3d-0.1.0/sysl/shader/global_shader_context.py +497 -0
- sysl3d-0.1.0/sysl/shader/local_shader_context.py +123 -0
- sysl3d-0.1.0/sysl/shader/param_evaluate.py +202 -0
- sysl3d-0.1.0/sysl/shader/shader_mod_ext.py +239 -0
- sysl3d-0.1.0/sysl/shader/shader_module.py +99 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/__init__.py +13 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/common.py +91 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/functions/__init__.py +15 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/functions/combinator_templates.py +446 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/functions/combinators.py +143 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/functions/grid_functions.py +250 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/functions/material_functions.py +123 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/functions/shader_functions_2d.py +944 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/functions/shader_functions_3d.py +685 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/functions/transforms.py +294 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/future_shaders.md +132 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/imfx_shaders/__init__.py +15 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/imfx_shaders/aa_pass.py +32 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/imfx_shaders/all_outline.py +118 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/imfx_shaders/basic_third_pass.py +22 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/imfx_shaders/dither.py +54 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/imfx_shaders/fxaa.py +77 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/imfx_shaders/part_outline.py +51 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/imfx_shaders/part_outline_nobg.py +53 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/imfx_shaders/selection_highlight.py +87 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/multipass/__init__.py +1 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/multipass/sdf_trace.py +217 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v1.py +369 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v1_post_trace.py +271 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v2.py +145 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v3/__init__.py +11 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v3/lighting.py +490 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v3/main.py +235 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v3/main_multipass.py +344 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v3/materials.py +559 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v3/tone_mapping.py +192 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v3/utils.py +300 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v4/README.md +14 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v4/__init__.py +9 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v4/lighting.py +444 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v4/main.py +260 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v4/main_multipass.py +243 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v4/materials.py +487 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v5.py +363 -0
- sysl3d-0.1.0/sysl/shader/shader_templates/strace_v6.py +312 -0
- sysl3d-0.1.0/sysl/shader/utils/conversion.py +49 -0
- sysl3d-0.1.0/sysl/shader/utils/texture.py +405 -0
- sysl3d-0.1.0/sysl/shader/utils/ubo.py +818 -0
- sysl3d-0.1.0/sysl/shader_runtime/__init__.py +58 -0
- sysl3d-0.1.0/sysl/shader_runtime/generate_shader_html.py +650 -0
- sysl3d-0.1.0/sysl/shader_runtime/offline_render.py +605 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/PRIMITIVE_EDITING.md +204 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/base.html.j2 +82 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/common_script.js.html.j2 +348 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/controls.html.j2 +303 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/multibuffer_shader_v2.html.j2 +71 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/primitive_editing.js.html.j2 +792 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/primitive_tracking.js.html.j2 +234 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/regl_script.js.html.j2 +126 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/shader_vis.html.j2 +35 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/static_shader.frag +355 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/twgl_multibuffer_script_simple.js.html.j2 +554 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/twgl_script.js.html.j2 +172 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/twgl_texture_loader.js.j2 +201 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/ubo_animation.js.html.j2 +468 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/ubo_animation_controls.html.j2 +116 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/ubo_controls.html.j2 +105 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/ubo_editor.js.html.j2 +485 -0
- sysl3d-0.1.0/sysl/shader_runtime/templates/ubo_loader.js.html.j2 +221 -0
- sysl3d-0.1.0/sysl/symbolic/__init__.py +4 -0
- sysl3d-0.1.0/sysl/symbolic/base.py +139 -0
- sysl3d-0.1.0/sysl/symbolic/fields.py +157 -0
- sysl3d-0.1.0/sysl/symbolic/mat_solid_combinators.py +33 -0
- sysl3d-0.1.0/sysl/symbolic/materials.py +203 -0
- sysl3d-0.1.0/sysl/torch_compute/__init__.py +20 -0
- sysl3d-0.1.0/sysl/torch_compute/evaluate_mat_expr.py +225 -0
- sysl3d-0.1.0/sysl/torch_compute/maps.py +63 -0
- sysl3d-0.1.0/sysl/torch_compute/mat_combinators.py +325 -0
- sysl3d-0.1.0/sysl/torch_compute/mat_functions.py +94 -0
- sysl3d-0.1.0/sysl/utils.py +208 -0
- sysl3d-0.1.0/sysl3d.egg-info/PKG-INFO +325 -0
- sysl3d-0.1.0/sysl3d.egg-info/SOURCES.txt +113 -0
- sysl3d-0.1.0/sysl3d.egg-info/dependency_links.txt +1 -0
- sysl3d-0.1.0/sysl3d.egg-info/requires.txt +25 -0
- sysl3d-0.1.0/sysl3d.egg-info/top_level.txt +1 -0
- sysl3d-0.1.0/tests/test_basic.py +53 -0
- sysl3d-0.1.0/tests/test_shader_smoke.py +67 -0
sysl3d-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# specific to this project
|
|
2
|
+
notebooks/
|
|
3
|
+
|
|
4
|
+
# general python ignore
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[codz]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
# C extensions
|
|
11
|
+
*.so
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
.Python
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
# Usually these files are written by a python script from a template
|
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
36
|
+
*.manifest
|
|
37
|
+
*.spec
|
|
38
|
+
|
|
39
|
+
# Installer logs
|
|
40
|
+
pip-log.txt
|
|
41
|
+
pip-delete-this-directory.txt
|
|
42
|
+
|
|
43
|
+
# Unit test / coverage reports
|
|
44
|
+
htmlcov/
|
|
45
|
+
.tox/
|
|
46
|
+
.nox/
|
|
47
|
+
.coverage
|
|
48
|
+
.coverage.*
|
|
49
|
+
.cache
|
|
50
|
+
nosetests.xml
|
|
51
|
+
coverage.xml
|
|
52
|
+
*.cover
|
|
53
|
+
*.py.cover
|
|
54
|
+
.hypothesis/
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
cover/
|
|
57
|
+
|
|
58
|
+
# Translations
|
|
59
|
+
*.mo
|
|
60
|
+
*.pot
|
|
61
|
+
|
|
62
|
+
# Django stuff:
|
|
63
|
+
*.log
|
|
64
|
+
local_settings.py
|
|
65
|
+
db.sqlite3
|
|
66
|
+
db.sqlite3-journal
|
|
67
|
+
|
|
68
|
+
# Flask stuff:
|
|
69
|
+
instance/
|
|
70
|
+
.webassets-cache
|
|
71
|
+
|
|
72
|
+
# Scrapy stuff:
|
|
73
|
+
.scrapy
|
|
74
|
+
|
|
75
|
+
# Sphinx documentation
|
|
76
|
+
docs/_build/
|
|
77
|
+
|
|
78
|
+
# PyBuilder
|
|
79
|
+
.pybuilder/
|
|
80
|
+
target/
|
|
81
|
+
|
|
82
|
+
# Jupyter Notebook
|
|
83
|
+
.ipynb_checkpoints
|
|
84
|
+
|
|
85
|
+
# IPython
|
|
86
|
+
profile_default/
|
|
87
|
+
ipython_config.py
|
|
88
|
+
|
|
89
|
+
# pyenv
|
|
90
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
91
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
92
|
+
# .python-version
|
|
93
|
+
|
|
94
|
+
# pipenv
|
|
95
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
96
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
97
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
98
|
+
# install all needed dependencies.
|
|
99
|
+
#Pipfile.lock
|
|
100
|
+
|
|
101
|
+
# UV
|
|
102
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
103
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
104
|
+
# commonly ignored for libraries.
|
|
105
|
+
#uv.lock
|
|
106
|
+
|
|
107
|
+
# poetry
|
|
108
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
109
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
110
|
+
# commonly ignored for libraries.
|
|
111
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
112
|
+
#poetry.lock
|
|
113
|
+
#poetry.toml
|
|
114
|
+
|
|
115
|
+
# pdm
|
|
116
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
117
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
118
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
119
|
+
#pdm.lock
|
|
120
|
+
#pdm.toml
|
|
121
|
+
.pdm-python
|
|
122
|
+
.pdm-build/
|
|
123
|
+
|
|
124
|
+
# pixi
|
|
125
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
126
|
+
#pixi.lock
|
|
127
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
128
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
129
|
+
.pixi
|
|
130
|
+
|
|
131
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
132
|
+
__pypackages__/
|
|
133
|
+
|
|
134
|
+
# Celery stuff
|
|
135
|
+
celerybeat-schedule
|
|
136
|
+
celerybeat.pid
|
|
137
|
+
|
|
138
|
+
# SageMath parsed files
|
|
139
|
+
*.sage.py
|
|
140
|
+
|
|
141
|
+
# Environments
|
|
142
|
+
.env
|
|
143
|
+
.envrc
|
|
144
|
+
.venv
|
|
145
|
+
env/
|
|
146
|
+
venv/
|
|
147
|
+
ENV/
|
|
148
|
+
env.bak/
|
|
149
|
+
venv.bak/
|
|
150
|
+
|
|
151
|
+
# Spyder project settings
|
|
152
|
+
.spyderproject
|
|
153
|
+
.spyproject
|
|
154
|
+
|
|
155
|
+
# Rope project settings
|
|
156
|
+
.ropeproject
|
|
157
|
+
|
|
158
|
+
# mkdocs documentation
|
|
159
|
+
/site
|
|
160
|
+
|
|
161
|
+
# mypy
|
|
162
|
+
.mypy_cache/
|
|
163
|
+
.dmypy.json
|
|
164
|
+
dmypy.json
|
|
165
|
+
|
|
166
|
+
# Pyre type checker
|
|
167
|
+
.pyre/
|
|
168
|
+
|
|
169
|
+
# pytype static type analyzer
|
|
170
|
+
.pytype/
|
|
171
|
+
|
|
172
|
+
# Cython debug symbols
|
|
173
|
+
cython_debug/
|
|
174
|
+
|
|
175
|
+
# PyCharm
|
|
176
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
177
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
178
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
179
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
180
|
+
#.idea/
|
|
181
|
+
|
|
182
|
+
# Abstra
|
|
183
|
+
# Abstra is an AI-powered process automation framework.
|
|
184
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
185
|
+
# Learn more at https://abstra.io/docs
|
|
186
|
+
.abstra/
|
|
187
|
+
|
|
188
|
+
# Visual Studio Code
|
|
189
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
190
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
191
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
192
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
193
|
+
# .vscode/
|
|
194
|
+
|
|
195
|
+
# Ruff stuff:
|
|
196
|
+
.ruff_cache/
|
|
197
|
+
|
|
198
|
+
# PyPI configuration file
|
|
199
|
+
.pypirc
|
|
200
|
+
|
|
201
|
+
# Cursor
|
|
202
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
203
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
204
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
205
|
+
.cursorignore
|
|
206
|
+
.cursorindexingignore
|
|
207
|
+
|
|
208
|
+
# Marimo
|
|
209
|
+
marimo/_static/
|
|
210
|
+
marimo/_lsp/
|
|
211
|
+
__marimo__/
|
|
212
|
+
|
|
213
|
+
# Streamlit
|
|
214
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Contributing to SySL
|
|
2
|
+
|
|
3
|
+
SySL is **solo‑maintained** with a **closed contribution policy**.
|
|
4
|
+
|
|
5
|
+
- External pull requests are not accepted by default.
|
|
6
|
+
- Bug reports and focused feature requests are welcome via GitHub issues.
|
|
7
|
+
|
|
8
|
+
This file is mainly a reminder to future-me; there is no public contribution
|
|
9
|
+
process beyond opening issues.
|
sysl3d-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Aditya Ganeshan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
sysl3d-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sysl3d
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Symbolic Scene Language - Convert geometric expressions to shader code for sphere-traced rendering
|
|
5
|
+
Author-email: Aditya Ganeshan <adityaganeshan@gmail.com>
|
|
6
|
+
Maintainer-email: Aditya Ganeshan <adityaganeshan@gmail.com>
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/bardofcodes/sysl
|
|
9
|
+
Project-URL: Documentation, https://github.com/bardofcodes/sysl#readme
|
|
10
|
+
Project-URL: Repository, https://github.com/bardofcodes/sysl.git
|
|
11
|
+
Project-URL: Issues, https://github.com/bardofcodes/sysl/issues
|
|
12
|
+
Keywords: graphics,rendering,shader,sdf,signed-distance-field,symbolic,visualization,webgl,sphere-tracing
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
25
|
+
Classifier: Topic :: Multimedia :: Graphics :: 3D Rendering
|
|
26
|
+
Requires-Python: >=3.8
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: numpy>=1.21.0
|
|
30
|
+
Requires-Dist: sympy>=1.9.0
|
|
31
|
+
Requires-Dist: jinja2>=3.0.0
|
|
32
|
+
Requires-Dist: Pillow>=8.3.0
|
|
33
|
+
Provides-Extra: jupyter
|
|
34
|
+
Requires-Dist: IPython>=7.0.0; extra == "jupyter"
|
|
35
|
+
Requires-Dist: jupyter>=1.0.0; extra == "jupyter"
|
|
36
|
+
Provides-Extra: offline
|
|
37
|
+
Requires-Dist: moderngl>=5.6.0; extra == "offline"
|
|
38
|
+
Requires-Dist: PyOpenGL>=3.1.0; extra == "offline"
|
|
39
|
+
Provides-Extra: torch
|
|
40
|
+
Requires-Dist: torch>=1.9.0; extra == "torch"
|
|
41
|
+
Provides-Extra: dev
|
|
42
|
+
Requires-Dist: pytest>=6.0.0; extra == "dev"
|
|
43
|
+
Requires-Dist: black>=21.0.0; extra == "dev"
|
|
44
|
+
Requires-Dist: flake8>=3.9.0; extra == "dev"
|
|
45
|
+
Requires-Dist: ruff>=0.5.0; extra == "dev"
|
|
46
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
47
|
+
Provides-Extra: all
|
|
48
|
+
Requires-Dist: sysl3d[jupyter,offline,torch]; extra == "all"
|
|
49
|
+
Dynamic: license-file
|
|
50
|
+
|
|
51
|
+
# SySL: Symbolic Scene Language
|
|
52
|
+
|
|
53
|
+
[](https://opensource.org/licenses/MIT)
|
|
54
|
+
[](https://www.python.org/downloads/)
|
|
55
|
+
[](https://pypi.org/project/sysl3d/)
|
|
56
|
+
|
|
57
|
+
**SySL** extends [GeoLiPI](https://github.com/bardofcodes/geolipi) by adding material-related symbols to geometric expressions. It provides an shader evaluation pipeline that converts symbolic scene expressions into GLSL shader code, enabling sphere-traced rendering and real-time interactive WebGL visualization.
|
|
58
|
+
|
|
59
|
+
<p align="center">
|
|
60
|
+
<img src="assets/hero.jpg" alt="SySL Rendering Examples">
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
## Applications
|
|
64
|
+
|
|
65
|
+
### 1. Paper-Ready Renders
|
|
66
|
+
Generate high-quality renders of primitive assemblies without mesh conversion. I used this system for rendering primitive assemblies for paper figures in a recent work [Residual Primitive Fitting of 3D Shapes with SuperFrusta](https://arxiv.org/abs/2512.09201).
|
|
67
|
+
|
|
68
|
+
<p align="center">
|
|
69
|
+
<img src="assets/paper_fig.jpg" alt="Primitive Assembly Render">
|
|
70
|
+
</p>
|
|
71
|
+
|
|
72
|
+
### 2. Interactive Web Visualization
|
|
73
|
+
Create standalone HTML files for interactive 3D visualization. Useful for debugging, or stand alone apps.
|
|
74
|
+
|
|
75
|
+
<p align="center">
|
|
76
|
+
<img src="assets/interaction.gif" alt="Interactive Demo" width="400">
|
|
77
|
+
</p>
|
|
78
|
+
|
|
79
|
+
### 3. Interactive Assembly editor.
|
|
80
|
+
|
|
81
|
+
Create an standalone app for editing *textured* (deployable) primitive assemblies.
|
|
82
|
+
|
|
83
|
+
<p align="center">
|
|
84
|
+
<img src="assets/editing.gif" alt="Editing Demo" width="400">
|
|
85
|
+
</p>
|
|
86
|
+
|
|
87
|
+
### 4. Animation Sequences
|
|
88
|
+
Generate frame-by-frame renders for animations.
|
|
89
|
+
|
|
90
|
+
<p align="center">
|
|
91
|
+
<img src="assets/animation.gif" alt="Editing Demo" width="400">
|
|
92
|
+
</p>
|
|
93
|
+
|
|
94
|
+
## Features
|
|
95
|
+
|
|
96
|
+
- **Material Expressions**: Define materials with albedo, metallic, roughness, emissive properties
|
|
97
|
+
- **Multiple Render Modes**: From simple Inigo-style to PBR-quality Matthieu-style rendering
|
|
98
|
+
- **Shader Code Generation**: Convert symbolic expressions to optimized GLSL
|
|
99
|
+
- **Interactive Visualization**: Generate standalone HTML files with WebGL rendering
|
|
100
|
+
- **Jupyter Integration**: Inline visualization in notebooks
|
|
101
|
+
- **Offline Rendering**: Headless rendering via ModernGL (optional)
|
|
102
|
+
- **Image Effects (IMFX)**: Post-processing effects like outlines, dithering, anti-aliasing
|
|
103
|
+
## Installation
|
|
104
|
+
|
|
105
|
+
### From PyPI (recommended)
|
|
106
|
+
|
|
107
|
+
SySL is published on PyPI under the name `sysl3d`. For most users this is the easiest way to get started:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
pip install sysl3d
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
You will also need [GeoLiPI](https://github.com/bardofcodes/geolipi), which provides the
|
|
114
|
+
geometric expression system that SySL builds on:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
pip install geolipi
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### From source
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
git clone https://github.com/bardofcodes/sysl.git
|
|
124
|
+
cd sysl
|
|
125
|
+
|
|
126
|
+
# Install dependencies
|
|
127
|
+
pip install -r requirements.txt
|
|
128
|
+
|
|
129
|
+
# Editable install for development
|
|
130
|
+
pip install -e .
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Quick Start
|
|
134
|
+
|
|
135
|
+
### Basic example
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
import geolipi.symbolic as gls
|
|
139
|
+
import sysl.symbolic as sls
|
|
140
|
+
from sysl.shader import DEFAULT_SETTINGS, RenderMode, evaluate_to_shader
|
|
141
|
+
from sysl.shader_runtime import create_shader_html
|
|
142
|
+
|
|
143
|
+
# Create simple geometry
|
|
144
|
+
geometry = gls.Sphere3D((1.0,))
|
|
145
|
+
|
|
146
|
+
# Define a basic V4 material (albedo, emissive, mrc)
|
|
147
|
+
material = sls.MaterialV4(
|
|
148
|
+
(1.0, 0.2, 0.1), # albedo
|
|
149
|
+
(0.0, 0.0, 0.0), # emissive
|
|
150
|
+
(0.5, 0.3, 0.0), # metallic / roughness / clearcoat
|
|
151
|
+
)
|
|
152
|
+
scene = sls.MatSolidV4(geometry, material)
|
|
153
|
+
|
|
154
|
+
# Choose a render mode and settings
|
|
155
|
+
settings = dict(DEFAULT_SETTINGS)
|
|
156
|
+
settings["render_mode"] = RenderMode.V4
|
|
157
|
+
|
|
158
|
+
# Generate shader
|
|
159
|
+
shader_code, uniforms, textures = evaluate_to_shader(scene, settings=settings)
|
|
160
|
+
|
|
161
|
+
# Generate HTML viewer
|
|
162
|
+
html_code = create_shader_html(
|
|
163
|
+
shader_code,
|
|
164
|
+
uniforms,
|
|
165
|
+
textures,
|
|
166
|
+
show_controls=True,
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
# Save to a file and serve via a simple HTTP server
|
|
170
|
+
with open("sysl_example.html", "w") as f:
|
|
171
|
+
f.write(html_code)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Jupyter Notebook
|
|
175
|
+
|
|
176
|
+
```python
|
|
177
|
+
from IPython.display import HTML, display
|
|
178
|
+
from sysl.shader_runtime.generate_shader_html import make_jupyter_compatible_html
|
|
179
|
+
|
|
180
|
+
wrapped = make_jupyter_compatible_html(html_code)
|
|
181
|
+
display(HTML(wrapped))
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Jupyter Notebook
|
|
185
|
+
|
|
186
|
+
See `notebooks/` for examples.
|
|
187
|
+
|
|
188
|
+
## Render Modes
|
|
189
|
+
|
|
190
|
+
SySL supports multiple rendering pipelines, each with different visual characteristics:
|
|
191
|
+
|
|
192
|
+
| Mode | Description | Use Case | Source|
|
|
193
|
+
|------|-------------|----------|----------|
|
|
194
|
+
| **V1** | Simple Inigo-style | Fast preview, basic shading |[ShaderToy](https://www.shadertoy.com/view/Xds3zN)|
|
|
195
|
+
| **V2** | Inigo + Color | Simple colored renders | [ShaderToy](https://www.shadertoy.com/view/Xds3zN)|
|
|
196
|
+
| **V3** | J. Matthieu-style | Material functions with (p, n) |[ShaderToy](https://www.shadertoy.com/view/3tKfDG)|
|
|
197
|
+
| **V4** | Adapted Matthieu | Local materials + mixing (default) |[ShaderToy](https://www.shadertoy.com/view/3tKfDG)|
|
|
198
|
+
| **V5** | Toon Shader | NPR stylized rendering |[ShaderToy](https://www.shadertoy.com/view/ll33Wn)|
|
|
199
|
+
| **V6** | Dithered Shader | V2 + Dithering + outline |[ShaderToy](https://www.shadertoy.com/view/33BXW3)|
|
|
200
|
+
|
|
201
|
+
### Selecting a render mode
|
|
202
|
+
|
|
203
|
+
You can select different render modes via the `RenderMode` enum:
|
|
204
|
+
|
|
205
|
+
```python
|
|
206
|
+
from sysl.shader import DEFAULT_SETTINGS, RenderMode, evaluate_to_shader
|
|
207
|
+
|
|
208
|
+
settings = dict(DEFAULT_SETTINGS)
|
|
209
|
+
settings["render_mode"] = RenderMode.V4 # v1–v6
|
|
210
|
+
|
|
211
|
+
shader_code, uniforms, textures = evaluate_to_shader(expression, settings=settings)
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## API overview
|
|
215
|
+
|
|
216
|
+
The main entry points most users interact with are:
|
|
217
|
+
|
|
218
|
+
- `sysl.evaluate_to_shader(expression, mode=\"singlepass\" | \"multipass\", settings=None)`
|
|
219
|
+
- `sysl.create_shader_html(shader_code, uniforms, textures, show_controls=False, ...)`
|
|
220
|
+
- `sysl.symbolic` – symbolic building blocks (materials, combinators, fields, etc.)
|
|
221
|
+
|
|
222
|
+
See the examples in `examples/` and `notebooks/` for more complete workflows.
|
|
223
|
+
|
|
224
|
+
## Image Effects (IMFX)
|
|
225
|
+
|
|
226
|
+
Post-processing effects available in multi-pass rendering:
|
|
227
|
+
|
|
228
|
+
- **Outlines**: Edge detection for shape boundaries
|
|
229
|
+
|
|
230
|
+
- **Selection Highlight**: Highlight specific primitives (used in editing mode)
|
|
231
|
+
- **Dithering**: Stylized dither patterns
|
|
232
|
+
|
|
233
|
+
- **FXAA**: Fast approximate anti-aliasing
|
|
234
|
+
|
|
235
|
+
## Project Structure
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
sysl/
|
|
239
|
+
├── sysl/
|
|
240
|
+
│ ├── symbolic/ # Material symbols and MatSolid definitions
|
|
241
|
+
│ ├── shader/ # Expression → GLSL shader conversion
|
|
242
|
+
│ │ ├── shader_templates/ # GLSL template modules
|
|
243
|
+
│ │ └── utils/ # UBO packing, texture encoding
|
|
244
|
+
│ ├── shader_runtime/ # HTML generation, offline rendering
|
|
245
|
+
│ └── torch_compute/ # PyTorch-based evaluation (optional)
|
|
246
|
+
├── scripts/ # Example scripts
|
|
247
|
+
├── notebooks/ # Jupyter notebook examples
|
|
248
|
+
├── tests/ # Pytest-based test suite
|
|
249
|
+
└── assets/ # Images for documentation
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Acknowledgments
|
|
253
|
+
|
|
254
|
+
This project builds heavily on the excellent work from the ShaderToy community:
|
|
255
|
+
|
|
256
|
+
- **Inigo Quilez** ([iquilezles.org](https://iquilezles.org/)) - SDF primitives, combinators, and basic sphere tracing / rendering techniques
|
|
257
|
+
- **Matthieu Jacquemet** ([ShaderToy](https://www.shadertoy.com/view/3tKfDG)) - A material system + alternate rendering system.
|
|
258
|
+
|
|
259
|
+
> **Important License Note**: The MIT license applies to the Python code in this repository. The GLSL shader templates are derived from ShaderToy contributions and retain their original authors' licensing terms. Please respect the original authors' licenses when using generated shader code.
|
|
260
|
+
|
|
261
|
+
## Citation
|
|
262
|
+
|
|
263
|
+
If you use SySL in your research, please cite:
|
|
264
|
+
|
|
265
|
+
```bibtex
|
|
266
|
+
@misc{ganeshan2025superfit,
|
|
267
|
+
title={Residual Primitive Fitting of 3D Shapes with SuperFrusta},
|
|
268
|
+
author={Aditya Ganeshan and Matheus Gadelha and Thibault Groueix and Zhiqin Chen and Siddhartha Chaudhuri and Vladimir Kim and Wang Yifan and Daniel Ritchie},
|
|
269
|
+
year={2025},
|
|
270
|
+
eprint={2512.09201},
|
|
271
|
+
archivePrefix={arXiv},
|
|
272
|
+
primaryClass={cs.GR},
|
|
273
|
+
url={https://arxiv.org/abs/2512.09201},
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
@article{ganeshan2025migumi,
|
|
277
|
+
author = {Ganeshan, Aditya and Fleischer, Kurt and Jakob, Wenzel and Shamir, Ariel and Ritchie, Daniel and Igarashi, Takeo and Larsson, Maria},
|
|
278
|
+
title = {MiGumi: Making Tightly Coupled Integral Joints Millable},
|
|
279
|
+
year = {2025},
|
|
280
|
+
publisher = {Association for Computing Machinery},
|
|
281
|
+
volume = {44},
|
|
282
|
+
number = {6},
|
|
283
|
+
url = {https://doi.org/10.1145/3763304},
|
|
284
|
+
doi = {10.1145/3763304},
|
|
285
|
+
journal = {ACM Trans. Graph.},
|
|
286
|
+
articleno = {193},
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## Known Limitations & Future Work
|
|
291
|
+
|
|
292
|
+
- **Code Duplication**: Shader templates have some duplication that could be refactored
|
|
293
|
+
- **Complex Scenes**: Very complex scenes may benefit from cone tracing (not yet implemented)
|
|
294
|
+
- **WebGPU**: Currently WebGL only; WGPU support planned
|
|
295
|
+
- **Configuration Persistence**: Saving/loading editor configurations not yet supported
|
|
296
|
+
|
|
297
|
+
See `sysl/shader/shader_templates/future_shaders.md` for planned shader additions.
|
|
298
|
+
|
|
299
|
+
## License
|
|
300
|
+
|
|
301
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
302
|
+
|
|
303
|
+
**Note**: Shader templates derived from ShaderToy retain their original licensing.
|
|
304
|
+
|
|
305
|
+
## Maintenance & contributions
|
|
306
|
+
|
|
307
|
+
SySL is currently **solo-maintained**. Releases, versioning, and roadmap decisions are
|
|
308
|
+
made by the maintainer and may evolve as the surrounding research/software does.
|
|
309
|
+
|
|
310
|
+
At this time the project has a **closed contribution policy**:
|
|
311
|
+
|
|
312
|
+
- External pull requests are not accepted by default.
|
|
313
|
+
- Bug reports and feature requests are still welcome via GitHub issues.
|
|
314
|
+
|
|
315
|
+
If this policy changes in the future, the README and `CONTRIBUTING.md` will be updated
|
|
316
|
+
to reflect the new contribution model.
|
|
317
|
+
|
|
318
|
+
## Contact
|
|
319
|
+
|
|
320
|
+
- **Issues**: [GitHub Issues](https://github.com/bardofcodes/sysl/issues)
|
|
321
|
+
- **Email**: [adityaganeshan@gmail.com](mailto:adityaganeshan@gmail.com)
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
*This project is under active development. APIs may change between versions.*
|