Skip to main content

NanoVDB Editor Python Module

Project description

NanoVDB Editor

Prerequisities:

  • numpy

Hello World

from nanovdb_editor import Compiler, Compute, Editor, EditorConfig

compiler = Compiler()
compiler.create_instance()

compute = Compute(compiler)
compute.device_interface().create_device_manager()
compute.device_interface().create_device()

editor = Editor(compute, compiler)

config = EditorConfig()

# Default values, set as needed
config.ip_address = b"127.0.0.1"
config.port = 8080
config.headless = 0
config.streaming = 0

editor.show(config)

Shader Parameters

Shaders can have defined struct with shader parameters which are intended to be shown in the editor's UI:

struct shader_params_t
{
    float4 color;
    bool use_color;
    bool3 _pad1;
    int _pad2;
};
ConstantBuffer<shader_params_t> shader_params;

Shader parameters can have defined default values in the json file:

{
    "ShaderParams": {
        "color": {
            "value": [1.0, 0.0, 1.0, 1.0],
            "min": 0.0,
            "max": 1.0,
            "step": 0.01
        }
    }
}

Supported types: bool, int, uint, int64, uint64, float and its vectors and 4x4 matrix. Variables with _pad in the name are not shown in the UI. Those parameters can be interactively changed with generated UI in the editor's Params tab.

To display a group of shader parameters from different shaders define a json file with various shader paths:

{
    "ShaderParams": [
        "editor/editor.slang",
        "test/test.slang"
    ]
}

Acknowledgements

This project makes use of the following libraries:

  • zlib – Compression library
  • c-blosc – High-performance compressor optimized for binary data
  • Vulkan-Headers – Vulkan API headers
  • Vulkan-Loader – Vulkan ICD loader
  • GLFW – Windowing, context, and input (optional)
  • Dear ImGui – Immediate-mode GUI
  • ImGuiFileDialog – File dialog for Dear ImGui
  • ImGuiColorTextEdit – Syntax-highlighted text/code editor widget
  • Slang – Shading language and compiler
  • filewatch – Cross-platform file watching
  • JSON for Modern C++ – JSON serialization for C++
  • cnpy – Read/write NumPy .npy/.npz files from C++
  • zstr – Transparent zlib iostream wrappers
  • llhttp – High-performance HTTP parser
  • Asio – Asynchronous networking and concurrency primitives
  • RESTinio – Lightweight HTTP server framework
  • fmt – Modern formatting library
  • argparse – Header-only argument parser for C++17
  • expected-lite – std::expected-like type for C++11/14/17
  • libE57Format – E57 point cloud IO (optional)
  • OpenH264 – H.264 encoder (optional)
  • GoogleTest – C++ testing framework

Many thanks to the authors and contributors of these projects.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nanovdb_editor-0.0.6.tar.gz (17.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nanovdb_editor-0.0.6-py3-none-win_amd64.whl (43.6 MB view details)

Uploaded Python 3Windows x86-64

nanovdb_editor-0.0.6-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (15.9 MB view details)

Uploaded Python 3manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file nanovdb_editor-0.0.6.tar.gz.

File metadata

  • Download URL: nanovdb_editor-0.0.6.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nanovdb_editor-0.0.6.tar.gz
Algorithm Hash digest
SHA256 62766e38d0d02b7986c0272596fa12f2c95e437d9e5931e71cf1ffa54ac1bd42
MD5 7bc32b6b640170edfc64f45765a85d51
BLAKE2b-256 4c5d0c23f0c5d5a4424bafed7136da47befbda28c94313ce0bcfe8deb1b076b6

See more details on using hashes here.

File details

Details for the file nanovdb_editor-0.0.6-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for nanovdb_editor-0.0.6-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c76c646363a475be3e552d8c3635c2c8ca7c6ed8a92a7a97810138bc98bcb18f
MD5 f863779a0ca7d1e40140f08f165146c7
BLAKE2b-256 1c3569d50a9bfe8efce62b5319d1cff20b0d2eda848ca0270bb3f289e0958c7e

See more details on using hashes here.

File details

Details for the file nanovdb_editor-0.0.6-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nanovdb_editor-0.0.6-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b90f85690ec430a6985197200c50fd1c27ecc69368ad763f1a532db3da766b26
MD5 318e10d3d4858eaa91c911a8a1c9c5ad
BLAKE2b-256 e7b5d032bc025ec472333b1b1be8b1b2482428da8a4fd7abbe0b4f9c09ca0f6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page