{"id":13419430,"url":"https://github.com/wdas/partio","last_synced_at":"2025-04-09T07:05:30.184Z","repository":{"id":971046,"uuid":"766265","full_name":"wdas/partio","owner":"wdas","description":"C++ (with python bindings) library for easily reading/writing/manipulating common animation particle formats such as PDB, BGEO, PTC. https://wdas.github.io/partio","archived":false,"fork":false,"pushed_at":"2024-03-02T04:57:02.000Z","size":1306,"stargazers_count":459,"open_issues_count":20,"forks_count":133,"subscribers_count":54,"default_branch":"main","last_synced_at":"2024-10-13T08:41:45.060Z","etag":null,"topics":["fileformats","houdini","particles","point-cloud"],"latest_commit_sha":null,"homepage":"https://www.disneyanimation.com/open-source/partio/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wdas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2010-07-09T16:37:38.000Z","updated_at":"2024-10-11T21:44:14.000Z","dependencies_parsed_at":"2023-11-17T01:09:50.074Z","dependency_job_id":"b7e67a0a-c9e2-4b7d-ad35-a98dd5b7ff12","html_url":"https://github.com/wdas/partio","commit_stats":{"total_commits":269,"total_committers":36,"mean_commits":7.472222222222222,"dds":0.828996282527881,"last_synced_commit":"321ae0ec92cc7d44e9f3cd2e9daed02e430a4bcd"},"previous_names":[],"tags_count":78,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdas%2Fpartio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdas%2Fpartio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdas%2Fpartio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdas%2Fpartio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wdas","download_url":"https://codeload.github.com/wdas/partio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994119,"owners_count":21030050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fileformats","houdini","particles","point-cloud"],"created_at":"2024-07-30T22:01:15.909Z","updated_at":"2025-04-09T07:05:30.162Z","avatar_url":"https://github.com/wdas.png","language":"C","readme":"# [Partio](https://wdas.github.io/partio) - A library for particle IO and manipulation\n\nThis is the initial source code release of partio a tool we used for particle\nreading/writing. It started out as an abstraction for the commonalities in\nparticle models (i.e. accessing many attributes associated with an index or\nentity).\n\n# Super impatient building guide\n\n        # Install Location ~ adjust accordingly\n        prefix=$HOME/local\n        git clone https://github.com/wdas/partio.git\n        cd partio\n        make -j prefix=$prefix install\n\n# Getting Started\n\nCMake is used to build the project, but we provide a top-level Makefile\nfor convenience that takes care of all the steps.\n\nSee the Makefile for the user-tweakable variables and corresponding\ncmake options.\n\nThe typical usage for an installation into `/usr/local`\nwith a temporary staging directory of `/tmp/stage` is:\n\n    make DESTDIR=/tmp/stage prefix=/usr/local install\n\n# Source code overview\n\n        src/\n           lib/      Library code (public API in root)\n           lib/core  Core library (KDtree traversal, data representations)\n           lib/io    Input/Output (Different file formats)\n           py/       SWIG based python bindings\n           doc/      Doxygen documentation and (the start of) a manual\n           tests/    Start of regression tests (I need more)\n           tools/    Useful tools\n                     partconvert \u003cinput format\u003e \u003coutput format\u003e\n                     partinfo \u003cparticle file\u003e\n                     partview \u003cparticle file\u003e\n\n## Class Model\n\nThe goal of the library is to abstract the particle interface from the data\nrepresentation. That is why Partio represents particles using three classes that\ninherit and provide more functionality\n\nParticlesInfo - Information about # of particles and attributes\nParticlesData - Read only access to all particle data\nParticlesDataMutable - Read/write access to all particle data\n\nThe functions used to get particle access are these:\n\n        readHeaders()\n           returns ParticlesInfo\n           reads only the minimum data necessary to get number of particles and\n           attributes\n\n        readCached()\n           returns ParticlesData\n           For multiple users in different threads using the same particle file\n           ParticlesData\n\n        create() and read()\n           returns ParticlesDataMutable\n           allows read/write access\n\nBehind the scenes you could implement these classes however you like. Headers\nonly representation is called core/ParticleHeader.{h,cpp}. Simple\nnon-interleaved attributes is core/ParticleSimple.{h,cpp}.\n\n## Attribute Data Model\n\nAll particles have the same data attributes. They have the model that they are\nof three basic types with a count of how many scalar values they have.\n\n        VECTOR[3]\n        FLOAT[d]\n        INT[d]\n\n        VECTOR[3] and FLOAT[3] have the same data representations.\n        VECTOR[4] is invalid however FLOAT[4] is valid as is FLOAT[1...infinity]\n\nThis seems to encompass the most common file formats for particles\n\n## Iterating\n\nThere are multiple ways to access data in the API. Here are\nsome tips\n\n- Use SIMD functions when possible prefer dataAsFloat(),data(arrayOfIndices) as\n  opposed to data(int singleIndex) which accesses multiple pieces of data at\n  once\n\n- Cache ParticleAttributes for quick access instead of calling attributeInfo()\n  over a loop of particles\n\n- Use iterators to do linear operations over all particles They are much more\n  optimized than both data() and the dataAsFloat or\n\n## Backends\n\nBehind the scenes there are SimpleParticles, ParticleHeaders, and\nSimpleParticlesInterleaved. In the future I would like to write a disk-based\ncached back end that can dynamically only load the data that is necessary.\ncreate(), read() and readCached could be augmented to create different\nstructures in these cases.\n\n## Readers/Writers\n\nNew readers and writers can be added in the io/ directory. You simply need to\nimplement the interface ParticlesInfo, ParticlesData and ParticlesDataMutable\n(or as many as you need). Editing the io/readers.h to add prototypes and\nio/ParticleIO.cpp to add file extension bindings should be easy.\n\n## Building the python Package for PyPi\n\nTo the partio for python and publish it to we have to build it using docker and upload it to PyPi.\n\n```bash\n# build the docker\n  docker build -t partio:latest .\n  # run the build\n  docker run --rm -v $(pwd):/io partio:latest\n  # use twine to upload to pypi\n  twine upload dist/*\n```\n\n- Andrew Selle, Walt Disney Animation Studios\n","funding_links":[],"categories":["TODO scan for Android support in followings","Graphics","C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdas%2Fpartio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwdas%2Fpartio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdas%2Fpartio/lists"}