Code Monkey home page Code Monkey logo

wdas / partio Goto Github PK

View Code? Open in Web Editor NEW
453.0 54.0 134.0 1.28 MB

C++ (with python bindings) library for easily reading/writing/manipulating common animation particle formats such as PDB, BGEO, PTC. https://wdas.github.io/partio

Home Page: https://www.disneyanimation.com/open-source/partio/

License: Other

Python 5.08% Makefile 0.18% C 62.26% TeX 0.46% C++ 28.87% CMake 1.36% GLSL 0.03% SWIG 1.71% Dockerfile 0.01% Shell 0.06%
fileformats houdini particles point-cloud

partio's Introduction

Partio - A library for particle IO and manipulation

This is the initial source code release of partio a tool we used for particle reading/writing. It started out as an abstraction for the commonalities in particle models (i.e. accessing many attributes associated with an index or entity).

Super impatient building guide

    # Install Location ~ adjust accordingly
    prefix=$HOME/local
    git clone https://github.com/wdas/partio.git
    cd partio
    make -j prefix=$prefix install

Getting Started

CMake is used to build the project, but we provide a top-level Makefile for convenience that takes care of all the steps.

See the Makefile for the user-tweakable variables and corresponding cmake options.

The typical usage for an installation into /usr/local with a temporary staging directory of /tmp/stage is:

make DESTDIR=/tmp/stage prefix=/usr/local install

Source code overview

    src/
       lib/      Library code (public API in root)
       lib/core  Core library (KDtree traversal, data representations)
       lib/io    Input/Output (Different file formats)
       py/       SWIG based python bindings
       doc/      Doxygen documentation and (the start of) a manual
       tests/    Start of regression tests (I need more)
       tools/    Useful tools
                 partconvert <input format> <output format>
                 partinfo <particle file>
                 partview <particle file>

Class Model

The goal of the library is to abstract the particle interface from the data representation. That is why Partio represents particles using three classes that inherit and provide more functionality

ParticlesInfo - Information about # of particles and attributes ParticlesData - Read only access to all particle data ParticlesDataMutable - Read/write access to all particle data

The functions used to get particle access are these:

    readHeaders()
       returns ParticlesInfo
       reads only the minimum data necessary to get number of particles and
       attributes

    readCached()
       returns ParticlesData
       For multiple users in different threads using the same particle file
       ParticlesData

    create() and read()
       returns ParticlesDataMutable
       allows read/write access

Behind the scenes you could implement these classes however you like. Headers only representation is called core/ParticleHeader.{h,cpp}. Simple non-interleaved attributes is core/ParticleSimple.{h,cpp}.

Attribute Data Model

All particles have the same data attributes. They have the model that they are of three basic types with a count of how many scalar values they have.

    VECTOR[3]
    FLOAT[d]
    INT[d]

    VECTOR[3] and FLOAT[3] have the same data representations.
    VECTOR[4] is invalid however FLOAT[4] is valid as is FLOAT[1...infinity]

This seems to encompass the most common file formats for particles

Iterating

There are multiple ways to access data in the API. Here are some tips

  • Use SIMD functions when possible prefer dataAsFloat(),data(arrayOfIndices) as opposed to data(int singleIndex) which accesses multiple pieces of data at once

  • Cache ParticleAttributes for quick access instead of calling attributeInfo() over a loop of particles

  • Use iterators to do linear operations over all particles They are much more optimized than both data() and the dataAsFloat or

Backends

Behind the scenes there are SimpleParticles, ParticleHeaders, and SimpleParticlesInterleaved. In the future I would like to write a disk-based cached back end that can dynamically only load the data that is necessary. create(), read() and readCached could be augmented to create different structures in these cases.

Readers/Writers

New readers and writers can be added in the io/ directory. You simply need to implement the interface ParticlesInfo, ParticlesData and ParticlesDataMutable (or as many as you need). Editing the io/readers.h to add prototypes and io/ParticleIO.cpp to add file extension bindings should be easy.

Building the python Package for PyPi

To the partio for python and publish it to we have to build it using docker and upload it to PyPi.

# build the docker
  docker build -t partio:latest .
  # run the build
  docker run --rm -v $(pwd):/io partio:latest
  # use twine to upload to pypi
  twine upload dist/*
  • Andrew Selle, Walt Disney Animation Studios

partio's People

Contributors

aconty avatar anteru avatar aselle avatar awhetter avatar c42f avatar dadler avatar darcyharrison avatar davvid avatar dennisosrm avatar dracwyrm avatar fpsunflower avatar gdubost-pro avatar glm-mrouille avatar hulud75 avatar jamesvecore avatar jfpanisset avatar lchai avatar mclam009 avatar nikai3d avatar npbarber avatar nyue avatar podsvirov avatar redpawfx avatar roliveira avatar soapgentoo avatar steffenl avatar timgates42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

partio's Issues

Please provide a versioned library

Hello,
I am a Fedora contributor aiming to package partio. The review process suggested to include the versionned library on src/lib/CMakeLists.txt using the following line:

set_target_properties(partio PROPERTIES
    OUTPUT_NAME partio POSITION_INDEPENDENT_CODE ON
    VERSION ${CMAKE_PROJECT_VERSION}
    SOVERSION 1 
)

Edit: correct line.
Hopefully, you will provide the suggestion on the next release.
Thanks in advance.

homepage is not reachable

bash-3.2$ curl -I http://www.partio.us
HTTP/1.1 404 Not Found
Server: GitHub.com
Date: Tue, 21 Feb 2017 17:48:25 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 9116
ETag: "5519ee21-239c"
Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; img-src data:; connect-src 'self'
X-GitHub-Request-Id: B9EE:5574:7DDA635:A4DB039:58AC7D69

out of date license headers

Both the files lib/io/PDA.cpp and lib/io/readers.h have license headers which state "CONFIDENTIAL INFORMATION... " (The Disney internal license boilerplate?), rather than the BSD license which everything else is under. I assume this is just an oversight from when the project was released?

I'd submit a pull request based on this assumption, but it seems inappropriate for an outsider like me to be fiddling with the license headers ;-)

fatal error: 'SeExpression.h' file not found

Hi I am building Partio without python bindings but I am getting this error:

`Scanning dependencies of target partioSe
[ 42%] Building CXX object src/lib/CMakeFiles/partioSe.dir/PartioSe.o
In file included from /DEV/libs/partio/src/lib/PartioSe.cpp:35:
/DEV/libs/partio/src/lib/PartioSe.h:36:10: fatal error: 'SeExpression.h' file
not found

include <SeExpression.h>

     ^

1 error generated.`

resource leak in ZIP.cpp

I found the leak with the static code checking tool cppcheck. There are other minor bugs as well, but this one is the biggest.
The leak is found in file master/src/lib/io/ZIP.cpp on line 511

if(read_start<=0){std::cerr<<"ZIP: Invalid read buffer size"<<std::endl;return false;}

it should be:

if(read_start<=0){std::cerr<<"ZIP: Invalid read buffer size"<<std::endl;delete [] buf;return false;}

Checking with PVS-Studio static analyser

To demonstrate the capabilities of our analyzer, we regularly perform analysis of open source projects. We had recently checked the Partio project.

Here is the link to the article about it: http://www.viva64.com/en/b/0455/
Official page of the analyzer: http://www.viva64.com/en/pvs-studio/

If you have any questions, or if you are interested in the evaluation of our static analyzer or in any other source code quality control services that our company provides, please contact us at [email protected].

ubuntu22.4_error: ‘istream’ is not a member of ‘std’

Hi! I found an error when I build my project on Ubuntu22.4 with gcc/g++ 1.1, cmake3.28.1
And the error maybe from the partio libarary. If someone can give me some advice, I would appreciate it.

[1/3] Building CXX object external/par...lib/CMakeFiles/partio.dir/io/PRT.cpp.o
FAILED: external/partio/src/lib/CMakeFiles/partio.dir/io/PRT.cpp.o

/usr/bin/c++ -Dpartio_EXPORTS -I/tmp/tmp.N1TGuCtCNm/include -I/tmp/tmp.N1TGuCtCNm/external/glad/include -I/tmp/tmp.N1TGuCtCNm/external/partio/src/lib -I/tmp/tmp.N1TGuCtCNm/external/spdlog/include -g -std=c++11 -fPIC -fdiagnostics-color=always -w -Wextra -Wno-unused-parameter -MD -MT external/partio/src/lib/CMakeFiles/partio.dir/io/PRT.cpp.o -MF external/partio/src/lib/CMakeFiles/partio.dir/io/PRT.cpp.o.d -o external/partio/src/lib/CMakeFiles/partio.dir/io/PRT.cpp.o -c /tmp/tmp.N1TGuCtCNm/external/partio/src/lib/io/PRT.cpp

/tmp/tmp.N1TGuCtCNm/external/partio/src/lib/io/PRT.cpp:95:30: error: ‘istream’ is not a member of ‘std’
95 | static bool read_buffer(std::istream& is, z_stream& z, char* in_buf, void* p, size_t size, std::ostream* errorStream) {
| ^~~~~~~

/tmp/tmp.N1TGuCtCNm/external/partio/src/lib/io/PRT.cpp:92:1: note: ‘std::istream’ is defined in header ‘’; did you forget to ‘#include ’?
91 | #include "half2float.h"
+++ |+#include
92 | };

[py] error: cast from 'void*' to 'long unsigned int' loses precision

All good for 32-bit architecture, but for 64-bit build we get compilation error.

For MINGW64:

  C:/_/mingw-w64-partio/src/build-x86_64-w64-mingw32/src/py/CMakeFiles/partio_mod.dir/partioPYTHON_wrap.cxx: In function 'long unsigned int ParticlesDataMutable_ptr(const Partio::ParticlesDataMutable*)':
  C:/_/mingw-w64-partio/src/build-x86_64-w64-mingw32/src/py/CMakeFiles/partio_mod.dir/partioPYTHON_wrap.cxx:3841:93: error: cast from 'void*' to 'long unsigned int' loses precision [-fpermissive]
   3841 | SWIGINTERN unsigned long ParticlesDataMutable_ptr(ParticlesDataMutable const *self){ return (unsigned long)(void*)self; }
        |                                                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~

For CLANG64:

  D:\a\_temp\msys64\clang64\bin\clang++.exe -DPARTIO_USE_ZLIB -D_USE_MATH_DEFINES -Dpartio_mod_EXPORTS -ID:/a/_temp/msys64/clang64/include/python3.9 -IC:/_/mingw-w64-partio/src/partio-1.14.6/src/lib -march=x86-64 -mtune=generic -O2 -pipe -O3 -DNDEBUG -pthread -std=c++14 -MD -MT src/py/CMakeFiles/partio_mod.dir/CMakeFiles/partio_mod.dir/partioPYTHON_wrap.cxx.obj -MF src\py\CMakeFiles\partio_mod.dir\CMakeFiles\partio_mod.dir\partioPYTHON_wrap.cxx.obj.d -o src/py/CMakeFiles/partio_mod.dir/CMakeFiles/partio_mod.dir/partioPYTHON_wrap.cxx.obj -c C:/_/mingw-w64-partio/src/build-x86_64-w64-mingw32/src/py/CMakeFiles/partio_mod.dir/partioPYTHON_wrap.cxx
  C:/_/mingw-w64-partio/src/build-x86_64-w64-mingw32/src/py/CMakeFiles/partio_mod.dir/partioPYTHON_wrap.cxx:3841:93: error: cast from pointer to smaller type 'unsigned long' loses information
  SWIGINTERN unsigned long ParticlesDataMutable_ptr(ParticlesDataMutable const *self){ return (unsigned long)(void*)self; }
                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~

I use toolchains from MSYS2.

Where to put python modules?

I noticed that the installed directory for python modules (_partio.so and partio.py) are in ~/lib64/, which might be unusual in some OS. I will suggest to install to ~/lib directly, even in 64bit OS cause in those 64bit environment, ~/lib64 is a symbolic link to ~/lib, and there is another ~/lib32 for 32bits libraries. But in Mac OSX and other 32bit OS, there is no ~/lib64`, which makes the installation error.

Fix endian.h conflict on redhat

According to Ben Houston, endian.h conflicts with the system header. We should change our name to PartioEndian.h to avoid this.

Houdini Geo export what is papi?

Hi,

I do an exercise with my students where I get them to write out particles as Houdini Geo in a C++ program and we write our own exporter but I suggest they also look (and later use) partio as a comparison. Whilst doing this I know what all the elements are in the file / exporter apart from writing the string

generator 1 index 1 papi

What does papi do? I have tried removing it and it doesn't load into Houdini (we use the academic version). and I can't find it mentioned in any of the geo documentation on the SideFX site. So I would be nice to know what it actually means so I can tell the students (rather than saying we need to write it I don't know why!).

Thanks for your help and the library we find it nice and easy to use for student projects.

Jon

CMakeLists.txt to MS VC++ project

Hi,m new to CMake,so can i get info for how can i create MS VC++ project from CMakeLists.txt.will appreciate if i get MS VC++ project of partio.Thank you

Partio file I/O is locale dependent

The stream input/output for GEO files will default to the global system locale. For users in non-US countries who are running with locales set to use , as the decimal separator, this will result in incorrect reads of typical geo files (since the . decimal point will TERMINATE parsing of a number rather than merely indicate the fractional part), and writing will produce floating point numbers with commas which will then be unreadable when in the US style locale.

I noticed this reading GEO files, but I suspect there may be similar issues scattered all through the code base, since grep turns up not a single instance of the word "locale." I feel your pain, it took me a long time to root these issues out of my code bases a couple years ago. (In fact, looking for one more wayward locale bug in OSL is how I stumbled onto this problem in partio, though it was not ultimately the cause of my woes.)

I think that the reasonable way to handle this is to decide that all parsing and output in your library should use the "C" locale (US conventions, also known in as "locale independent") so that file I/O will behave identically regardless of how a user's system-wide locale is set, or how an app sets the locale.

Some DCC apps set the locale to "C" to force locale independence, but others prefer to keep the system locale in order to have various UI elements use the local/foreign customary presentation format. A library like partio will inherit the locale set by the app (or the global one) and is expected not to mess with it. So you just have to deal with it and handle for each kind of input or output.

For stream I/O, this is fairly straightforward. In GEO.cpp, for example, you see something like

unique_ptr<istream> input(Gzip_In(filename,ios::in));
if(!*input){
    if(errorStream) *errorStream<<"Partio: Can't open particle data file: "<<filename<<endl;
    return 0;
}

and what you want to do is subsequently (but before any reads)

input->imbue (std::locale::classic());  // force C locale

and the same for output streams.

Compile error on Centos 6.2

Hi,

I get a strange compile error building partio on centos 6.2. I'm actually building the redpawfx fork, but at a glance, it looks like the issue is not in the forked changes, so I'll post the issue here - please let me know if you'd like me to move the issue to that repo!

Anyway, when building the PDB files, I get a lot of errors similar to this
[ 20%] Building CXX object src/lib/CMakeFiles/partio.dir/io/PDB.o
cd /home/users/matteb/Downloads/partio/partio.build/src/lib && /usr/bin/c++ -DPARTIO_USE_ZLIB -fPIC -O3 -DNDEBUG -I/home/users/matteb/Downloads/partio/src/lib -Wall -o CMakeFiles/partio.dir/io/PDB.o -c /home/users/matteb/Downloads/partio/src/lib/io/PDB.cpp
In file included from /usr/include/stdio.h:929,
from /home/users/matteb/Downloads/partio/src/lib/io/pdb.h:48,
from /home/users/matteb/Downloads/partio/src/lib/io/PDB.cpp:41:
/usr/include/bits/stdio.h: In function ‘int PDB::vprintf(const char_, va_list_tag)’:
/usr/include/bits/stdio.h:39: error: cannot convert ‘PDB::IO_FILE’ to ‘FILE
’ for argument ‘1’ to ‘int PDB::vfprintf(FILE_, const char_, va_list_tag)’
/usr/include/bits/stdio.h: In function ‘int PDB::fgetc_unlocked(FILE
)’:
/usr/include/bits/stdio.h:56: error: invalid use of incomplete type ‘struct _IO_FILE’
/usr/include/stdio.h:45: error: forward declaration of ‘struct _IO_FILE’
/usr/include/bits/stdio.h:56: error: invalid use of incomplete type ‘struct _IO_FILE’
/usr/include/stdio.h:45: error: forward declaration of ‘struct _IO_FILE’
...

I'm not an expert with C++ build issues, but I noticed it was looking at PDB::fgetc, which seems like it's putting the standard library stuff in the PDB namespace. I edited PDB.cpp and removed the:
namespace PDB
from around:
#include "pdb.h"

and put the namespace PDB in pdb.h directly, after

#include <stdio.h>
#include <stdlib.h>

This now compiles correctly.

Is this a genuine bug? Or maybe a mis-configuration on this system?

cheers

Incremental IO

I have some tools I have written against the PRMan point cloud api which I would love to adapt to using this library. However, a couple of the operations we have been running against particularly large point clouds would not be possible on our hardware with this library as it appears to read the entire dataset into RAM.

Is it feasible to adapt this library to also offer a streaming API so I can read/write a point at a time and the entire dataset is not held in RAM?

Writing then reading PDB files under windows x64

Hello,

I know there is a closed issue related to reading 64bits pdb file and that a fix has been provided, here is the log for the fix :

"Now we support .pdb32 .pdb64 and .pdb extensions. .pdb32 forces
32-bit write, .pdb64 forces 64-bit write, and .pdb writes 64 bit. .pdb reads will
try to detect 32 bit or 64 bit (which seemed to work on my demo files)."

With a win x64, when I write a pdb file using partio and then when I want to read it, I get the Partio: Attribute 'xxx' cannot map type error.
I think the problem comes from the writing process : Partio always writes 32 bit pdb files using the call

bool writePDB(const char* filename,const ParticlesData& p,const bool compressed)
{return writePDBHelper<32>(filename,p,compressed);}

On the reading side, partio will detect 64 bit and then will call
readPDBHelper<64>(filename,...)
And I get the reading error...

I think that a test on the OS for the writing process would fix this issue.
Thanks.

Python 3 support

The 1.10.0 release claims to support Python 3 but scripts like partinspect and partedit still use print without parenthesis so they are not executable with Python 3.

Plan to make a tag?

Hi,

I would like to add Partio into Homebrew and it is asked for each package to have a version or tag instead of just the lastest development snpashot (HEAD). I am wondering if you are gonna make a versioning tag for that ;)

  • Drake

Error when make install

When I install this package it shows the following error message

/usr/bin/ld: cannot find -lOpenGL::OpenGL
collect2: error: ld returned 1 exit status
src/tools/CMakeFiles/partview.dir/build.make:91: recipe for target 'src/tools/partview' failed
make[2]: *** [src/tools/partview] Error 1
CMakeFiles/Makefile2:967: recipe for target 'src/tools/CMakeFiles/partview.dir/all' failed
make[1]: *** [src/tools/CMakeFiles/partview.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Is there any solution to this? Anything would help. When I search the internet I barely see any information regard to -lOpenGL::OpenGL. So I don't know how to solve this.

I am using the cmake version exactly 3.15.0

ModuleNotFoundError: No module named 'partio'

I know that this may be a trivial issue, but still I've found myself in a deadend trying to functionally install partio and make it able to be used by python. Say I've built partio following the readme instructions but this is not enough for my scripts to been able to use partio. I don't know if there are still people answering here, but I need this fixed for my thesis. I've also tried to install using the "Setup.py" with the command pip install . --use-pep-517 but for some reason i can't understand the setup is disrupted by an error for not finding CMake which is already installed in the expected directories. If you need further information feel free to ask.
Thank you for your time and possible response.

Tag a new release?

Hello,

The 1.1.0 release dates back to 2012, is there any reason for which you haven’t tagged a new release since that one?

Thanks!

Error reading maya2011 pdb files created under win7

Hello, I have problems reading pdb files from maya2011 created under win7. However I can read maya2009-win32 files with no problem. Here's an error message:
Partio: Attribute 'pß↨ ' cannot map type

The .pdb files are made from default emitter+particles and issuing:
dynExport -mnf 1 -mxf 100 -atr position -atr velocity -f "pdb"

I'll try to get to linux machine and generate pdb there to see if it helps...

_partio compilation - x64 vs2012, py27

Hello
I tried to compile python module and got such errors:

Creating library E:/codes/build/partio/py/Release/_partio.lib and object E:/codes/build/partio/py/Release/_partio.exp

1>partio.lib(ParticleIO.obj) : error LNK2019: unresolved external symbol "class Partio::ParticlesDataMutable * __cdecl Partio::readPRT(char const *,bool,class std::basic_ostream<char,struct std::char_traits<char> > *)" (?readPRT@Partio@@YAPEAVParticlesDataMutable@1@PEBD_NPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) referenced in function "class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class Partio::ParticlesDataMutable * (__cdecl*)(char const *,bool,class std::basic_ostream<char,struct std::char_traits<char> > *),struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class Partio::ParticlesDataMutable * (__cdecl*)(char const *,bool,class std::basic_ostream<char,struct std::char_traits<char> > *)> > > & __cdecl Partio::readers(void)" (?readers@Partio@@YAAEAV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@P6APEAVParticlesDataMutable@Partio@@PEBD_NPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@@ZU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@P6APEAVParticlesDataMutable@Partio@@PEBD_NPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@@Z@std@@@2@@std@@XZ)

1>partio.lib(ParticleIO.obj) : error LNK2019: unresolved external symbol "bool __cdecl Partio::writePRT(char const *,class Partio::ParticlesData const &,bool,class std::basic_ostream<char,struct std::char_traits<char> > *)" (?writePRT@Partio@@YA_NPEBDAEBVParticlesData@1@_NPEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) referenced in function "class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool (__cdecl*)(char const *,class Partio::ParticlesData const &,bool,class std::basic_ostream<char,struct std::char_traits<char> > *),struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,bool (__cdecl*)(char const *,class Partio::ParticlesData const &,bool,class std::basic_ostream<char,struct std::char_traits<char> > *)> > > & __cdecl Partio::writers(void)" (?writers@Partio@@YAAEAV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@P6A_NPEBDAEBVParticlesData@Partio@@_NPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@@ZU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@P6A_NPEBDAEBVParticlesData@Partio@@_NPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@@Z@std@@@2@@std@@XZ)

1>E:\codes\build\partio\py\Release\_partio.pyd : fatal error LNK1120: 2 unresolved externals

Homebrew has a very very old Partio

On MacOS, for users who use homebrew ("brew install partio"), they are getting Partio 1.1.0, which -- oh dear -- dates from 2012.

I know that you guys don't maintain the homebrew recipe for building partio, but clearly whoever once did is not updating it regularly, so maybe it's in the interest of the Partio project for its maintainers to occasionally submit a PR to homebrew to bump the version to something modern?

Hardcoded path in CMakelists.txt

I currently try to build PartIO in Ubuntu 14.04
It almost works so far. The only thing i currently miss is the SeExpression part.
Nonetheless. If found the following line in the toplevel CMakeLists.txt

SET(SEEXPR_BASE "c:/aselle/seexpr-inst" CACHE STRING "path to SeExpr")

the SEEXPR_BASE var should be replaced with a userdefined variable or do i miss something here?

Best Regards
Stefan

scons error

... scons: building associated VariantDir targets: build/Linux-3.19.0-x86_64-optimize
scanForFurtherDocFiles(["build/Linux-3.19.0-x86_64-optimize/src/doc/dummyTarget"], ["src/doc/doc/html/index.html"])
Install file: "build/Linux-3.19.0-x86_64-optimize/src/tools/partinfo" as "dist/Linux-3.19.0-x86_64-optimize/bin/partinfo"
Install file: "build/Linux-3.19.0-x86_64-optimize/src/tools/partview" as "dist/Linux-3.19.0-x86_64-optimize/bin/partview"
scons: *** [build/Linux-3.19.0-x86_64-optimize/src/py/libpartio.so] Source file: src/py/partio.i is static and is not compatible with shared target: build/Linux-3.19.0-x86_64-optimize/src/py/libpartio.so
scons: building terminated because of errors.

how can I fix error?

Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)

when run:

# on ubuntu20.04LTS
make -j prefix=$prefix install

It's raise:

CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindGLUT.cmake:130 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:114 (find_package)

How to solve this problem?

partio python ptc set format attribute

partio Community,

Hello.
Thanks for partio python!

A noob question.

In a .ptc I generated with partio python
I see the PTC Header(?) attribute

Format : 640x480x300

Would anyone have an idea/example
of how to set the 'Format' value
using partio Python ?

Thank you.

partio 1.14.0 osx build failure

👋 trying to build the latest release, but run into some build issue.

The error log is as below:

build failure
CMake Error at src/tools/CMakeLists.txt:38 (add_executable):
  Target "partview" links to target "OpenGL::OpenGL" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_C_FLAGS_RELEASE

Full build log is here, https://github.com/Homebrew/homebrew-core/runs/1547382827
relates to Homebrew/homebrew-core#66889

And help would be appreciated!

AIR point cloud support

Is there any interest in having AIR point cloud support as well? I'm not sure about what the .apc format is actually like, but it will also accept RIBs specifying a Points primitive.

I have some experience writing tools for converting to/from AIR clouds, so I would be more than happy to write it up myself. =]

CMake build fails on Arch Linux when building with zlib

When using cmake to build partio, the build fails with the following (snippit) of errors:

../../lib/libpartio.a(ZIP.o): In function `Partio::ZipFileReader::Get_File(std::string const&, bool)':
ZIP.cpp:(.text+0xd63): undefined reference to `inflateInit2_'
../../lib/libpartio.a(ZIP.o): In function `Partio::Gzip_In(std::string const&, std::_Ios_Openmode)':
ZIP.cpp:(.text+0x15c9): undefined reference to `inflateInit2_'
../../lib/libpartio.a(ZIP.o): In function `Partio::Gzip_Out(std::string const&, std::_Ios_Openmode)':
ZIP.cpp:(.text+0x1b08): undefined reference to `deflateInit2_'
../../lib/libpartio.a(ZIP.o): In function `Partio::ZipFileWriter::Add_File(std::string const&, bool)':
ZIP.cpp:(.text+0x1fcc): undefined reference to `deflateInit2_'
../../lib/libpartio.a(ZIP.o): In function `Partio::ZipStreambufCompress::overflow(int)':
ZIP.cpp:(.text._ZN6Partio20ZipStreambufCompress8overflowEi[_ZN6Partio20ZipStreambufCompress8overflowEi]+0x65): undefined reference to `deflate'
ZIP.cpp:(.text._ZN6Partio20ZipStreambufCompress8overflowEi[_ZN6Partio20ZipStreambufCompress8overflowEi]+0xcd): undefined reference to `crc32'
...

I believe this is caused by the partio library depending on zlib but the link order is incorrect:

/usr/bin/c++   -fPIC -O3 -DNDEBUG   -Wl,-O1,--sort-common,--as-needed,-z,relro CMakeFiles/partattr.dir/partattr.o  -o ../../bin/partattr -rdynamic -lz ../../lib/libpartio.a

should be

/usr/bin/c++   -fPIC -O3 -DNDEBUG   -Wl,-O1,--sort-common,--as-needed,-z,relro CMakeFiles/partattr.dir/partattr.o  -o ../../bin/partattr -rdynamic ../../lib/libpartio.a -lz

Windows support

Does Partio currently support windows? Has anyone made a fork or any patches to get partio to compile for Windows?

Thanks!

Tony

PyQt5 support for partinspect and partedit

There are two Python scripts, partinspect and partedit, which are not PyQt5-ready when used verbatim. Simply changing from Qt to from PyQt5 in the import section allows me to run partinspect. For partedit however it's not enough, it then complains about from minibar.gui import mbWidgetStyling and I'm not sure what to do about this.

Adding Color to partview...

First of all, thanks for partio!

I thought I'd get my feet wet by adding color support to partview; I referenced the code getting position, but for some reason, position is being read into the color. Where am I not understanding the documentation?

Thanks!

//glColor3f(1,1,1); glBegin(GL_POINTS); for(int i=0;inumParticles();i++){ const float\* pos=particles->data(positionAttr,i); const float\* color=particles->data(colorAttr, i); std::cout<<"Color: "<

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.