panda3d-gltf


Namepanda3d-gltf JSON
Version 1.2.0 PyPI version JSON
download
home_pageNone
SummaryglTF utilities for Panda3D
upload_time2024-03-31 23:33:42
maintainerNone
docs_urlNone
authorMitchell Stokes
requires_python>=3.8
licenseBSD-3-Clause
keywords panda3d gltf
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Pipeline](https://github.com/Moguri/panda3d-gltf/workflows/Pipeline/badge.svg)
[![License](https://img.shields.io/github/license/Moguri/panda3d-gltf.svg)](https://choosealicense.com/licenses/bsd-3-clause/)

# panda3d-gltf
This project adds glTF loading capabilities to Panda3D.
One long-term goal for this project is to be used as a reference for adding a builtin, C++ glTF loader to Panda3D.
If and when Panda3D gets builtin support for glTF, this module will go into maintenance mode and be used to backport glTF support to older versions of Panda3D.

## Features
* Adds support for native loading of glTF files
* Supports glTF 2.0
* Supports binary glTF
* Includes support for the following extensions:
  * KHR_lights (deprecated in favor of KHR_lights_punctual)
  * KHR_lights_punctual
  * BLENDER_physics
* Ships with a `gltf2bam` cli-tool for converting glTF files to BAM
* Ships with `gltf-viewer` for viewing files (including glTF) with a simple PBR renderer

## Installation

Use pip to install the `panda3d-gltf` package:

```bash
pip install panda3d-gltf
```

To grab the latest development build, use:

```bash
pip install git+https://github.com/Moguri/panda3d-gltf.git

```

## Usage

### Configuration

`panda3d-gltf` has the following configuration options.
See below for information on setting these options for the native loader and the CLI.

* `collision_shapes` - the type of collision shapes to build.
  Either `builtin` for `ColisionSolids` or `bullet` for `BulletRigidBodyNodes`.
  Defaults to `builtin`.
* `flatten_nodes` - attempt to flatten resulting scene graph, defaults to `False`
* `legacy_materials` - convert imported PBR materials to legacy materials, defaults to `False`
* `no_srgb` - do not load textures as sRGB textures, defaults to `False`
* `skip_animations` - do not convert animation data found in the glTF file, defaults to `False`
* `skip_axis_conversion` - do not perform axis-conversion (useful if glTF data is already non-standard and already Z-Up), defaults to `False`

### Native loading

`panda3d-gltf` ships with a Python file loader (requires Panda3D 1.10.4+), which seamlessly adds glTF support to Panda3D's `Loader` classes.
This *does not* add support to `pview`, which is a C++ application that does not support loading Python file loaders.
Instead of `pview`, use the `gltf-viewer` that ships with `panda3d-gltf`.

The loader can be configured via PRC variables.
These PRC variables are prefixed with `gltf-` but otherwise match the names above.
For example, use `gltf-collision-shapes bullet` to have the loader load Bullet shapes instead of CollisionSolids.

### Command Line

To convert glTF files to BAM via the command line, use the supplied `gltf2bam` tool:

```bash
gltf2bam source.gltf output.bam
```

See `gltf2bam -h` for more information on usage and available CLI flags.

### Viewer

`panda3d-gltf` ships with `gltf-viewer`.
This is a simple viewer (like `pview`) to view glTF (or any other file format support by Panda3D) with a simple, PBR renderer.

## Running Tests

First install `panda3d-gltf` in editable mode along with `test` extras:

```bash
pip install -e .[test]
```

Then run the test suite with `pytest`:

```bash
pytest
```

## Building Wheels

Install `build`:

```bash
pip install --upgrade build
```

and run:

```bash
python -m build
```

## License
[B3D 3-Clause](https://choosealicense.com/licenses/bsd-3-clause/)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "panda3d-gltf",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "panda3d, gltf",
    "author": "Mitchell Stokes",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/69/b1/8e39165a1ee1a3cec4750e55ce937301179bd6457574ef8e7e32a9fd70ab/panda3d-gltf-1.2.0.tar.gz",
    "platform": null,
    "description": "![Pipeline](https://github.com/Moguri/panda3d-gltf/workflows/Pipeline/badge.svg)\n[![License](https://img.shields.io/github/license/Moguri/panda3d-gltf.svg)](https://choosealicense.com/licenses/bsd-3-clause/)\n\n# panda3d-gltf\nThis project adds glTF loading capabilities to Panda3D.\nOne long-term goal for this project is to be used as a reference for adding a builtin, C++ glTF loader to Panda3D.\nIf and when Panda3D gets builtin support for glTF, this module will go into maintenance mode and be used to backport glTF support to older versions of Panda3D.\n\n## Features\n* Adds support for native loading of glTF files\n* Supports glTF 2.0\n* Supports binary glTF\n* Includes support for the following extensions:\n  * KHR_lights (deprecated in favor of KHR_lights_punctual)\n  * KHR_lights_punctual\n  * BLENDER_physics\n* Ships with a `gltf2bam` cli-tool for converting glTF files to BAM\n* Ships with `gltf-viewer` for viewing files (including glTF) with a simple PBR renderer\n\n## Installation\n\nUse pip to install the `panda3d-gltf` package:\n\n```bash\npip install panda3d-gltf\n```\n\nTo grab the latest development build, use:\n\n```bash\npip install git+https://github.com/Moguri/panda3d-gltf.git\n\n```\n\n## Usage\n\n### Configuration\n\n`panda3d-gltf` has the following configuration options.\nSee below for information on setting these options for the native loader and the CLI.\n\n* `collision_shapes` - the type of collision shapes to build.\n  Either `builtin` for `ColisionSolids` or `bullet` for `BulletRigidBodyNodes`.\n  Defaults to `builtin`.\n* `flatten_nodes` - attempt to flatten resulting scene graph, defaults to `False`\n* `legacy_materials` - convert imported PBR materials to legacy materials, defaults to `False`\n* `no_srgb` - do not load textures as sRGB textures, defaults to `False`\n* `skip_animations` - do not convert animation data found in the glTF file, defaults to `False`\n* `skip_axis_conversion` - do not perform axis-conversion (useful if glTF data is already non-standard and already Z-Up), defaults to `False`\n\n### Native loading\n\n`panda3d-gltf` ships with a Python file loader (requires Panda3D 1.10.4+), which seamlessly adds glTF support to Panda3D's `Loader` classes.\nThis *does not* add support to `pview`, which is a C++ application that does not support loading Python file loaders.\nInstead of `pview`, use the `gltf-viewer` that ships with `panda3d-gltf`.\n\nThe loader can be configured via PRC variables.\nThese PRC variables are prefixed with `gltf-` but otherwise match the names above.\nFor example, use `gltf-collision-shapes bullet` to have the loader load Bullet shapes instead of CollisionSolids.\n\n### Command Line\n\nTo convert glTF files to BAM via the command line, use the supplied `gltf2bam` tool:\n\n```bash\ngltf2bam source.gltf output.bam\n```\n\nSee `gltf2bam -h` for more information on usage and available CLI flags.\n\n### Viewer\n\n`panda3d-gltf` ships with `gltf-viewer`.\nThis is a simple viewer (like `pview`) to view glTF (or any other file format support by Panda3D) with a simple, PBR renderer.\n\n## Running Tests\n\nFirst install `panda3d-gltf` in editable mode along with `test` extras:\n\n```bash\npip install -e .[test]\n```\n\nThen run the test suite with `pytest`:\n\n```bash\npytest\n```\n\n## Building Wheels\n\nInstall `build`:\n\n```bash\npip install --upgrade build\n```\n\nand run:\n\n```bash\npython -m build\n```\n\n## License\n[B3D 3-Clause](https://choosealicense.com/licenses/bsd-3-clause/)\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "glTF utilities for Panda3D",
    "version": "1.2.0",
    "project_urls": {
        "homepage": "https://github.com/Moguri/panda3d-gltf"
    },
    "split_keywords": [
        "panda3d",
        " gltf"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a459e56a539b474e14d1beb7181494083aa2948dd3bc1eb983a726efc847bd2a",
                "md5": "384cd071ee076d109665498e43c3dabd",
                "sha256": "5c4da158bdb524ff02bab7ab2278fa204e6127e648c847d23408e1f628d1cadc"
            },
            "downloads": -1,
            "filename": "panda3d_gltf-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "384cd071ee076d109665498e43c3dabd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 28113,
            "upload_time": "2024-03-31T23:33:41",
            "upload_time_iso_8601": "2024-03-31T23:33:41.347245Z",
            "url": "https://files.pythonhosted.org/packages/a4/59/e56a539b474e14d1beb7181494083aa2948dd3bc1eb983a726efc847bd2a/panda3d_gltf-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "69b18e39165a1ee1a3cec4750e55ce937301179bd6457574ef8e7e32a9fd70ab",
                "md5": "a4f05bad22d59954982dee782c1f378c",
                "sha256": "61a934a2d015eaa527db605566b8195546790375bf955c023851c0257a0a928d"
            },
            "downloads": -1,
            "filename": "panda3d-gltf-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a4f05bad22d59954982dee782c1f378c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 29303,
            "upload_time": "2024-03-31T23:33:42",
            "upload_time_iso_8601": "2024-03-31T23:33:42.857327Z",
            "url": "https://files.pythonhosted.org/packages/69/b1/8e39165a1ee1a3cec4750e55ce937301179bd6457574ef8e7e32a9fd70ab/panda3d-gltf-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-31 23:33:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Moguri",
    "github_project": "panda3d-gltf",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "panda3d-gltf"
}
        
Elapsed time: 0.23270s