partio4Maya 2018

168 views
Skip to first unread message

Guy Dubost

unread,
Aug 2, 2018, 11:50:14 AM8/2/18
to partio-discuss
What i have so far
succeeded to compile for maya 2018 Centos7 after a bit of head scratching
had to compile bison , flex, swig, glew update to new cmake

in Maya 
- i can partioVisuzlize a previously exported pdb sequence from legacy particles
- the instancer shows also the particle but dont know how to instance geometry on that ?
- i failed to load a bgeo sequence exported from houdini 16.5.439. it makes Maya crash when trying this bgeo sequence in the instancer. We gonna try old bgeo format
- No idea how to use that with nParticles ?
- the partconv utility fails to convert anything with that error Partio: Magic number '2135839562 of '<path>/doppop_vdb_advection_v001.rop_geometry1.0018.bgeo' doesn't match bgeo magic '1114072431 .
- the makecircle cmd works and load into maya thru the partioVisualizer but not in the instancer (// Error: PartioInstancer->Failed to find id attribute )
- the partioImport just load a single frame and use it at the startup , so not sure about the use cases

- What tool to use to import a cache and being able to interact with the particles. The emitter can just load a single frame ?

John Cassella

unread,
Aug 6, 2018, 2:05:23 PM8/6/18
to partio-...@googlegroups.com
Hi,  ok  here goes!

succeeded to compile for maya 2018 Centos7 after a bit of head scratching
Cool,  yeah  things are getting a bit long in the tooth,  I know, hopefully it wasn't too hard to figure out.  thats one of the goals of the   "Big disney merge"  thats  half way done.

had to compile bison , flex, swig, glew update to new cmake
Some of these, if you just install the  system  versions  of the dev libs  should be found by  cmake and you don't need to do them  yourself.

in Maya 
- i can partioVisuzlize a previously exported pdb sequence from legacy particles 
<thumbs up>

- the instancer shows also the particle but dont know how to instance geometry on that ?
The  partio instancer  works the same way as a maya particle instancer,  so you need to  add one to the  scene  and  hook it up the same way.    The supplied shelf  tool mel  stuff   have   scripts  that do this for you.

- i failed to load a bgeo sequence exported from houdini 16.5.439. it makes Maya crash when trying this bgeo sequence in the instancer. We gonna try old bgeo format
Partio's   BGEO  loader right now  is still limited to the   .bhclassic  format  of  Bgeo,  the newer  .json  file format stuff  Sidefx  added is yet to be  reverse engineered  into the  main   partio  library  loaders

- No idea how to use that with nParticles ? 
see  last note below

- the partconv utility fails to convert anything with that error Partio: Magic number '2135839562 of '<path>/doppop_vdb_advection_v001.rop_geometry1.0018.bgeo' doesn't match bgeo magic '1114072431 .
see above  mention of  BGEO limitation

- the makecircle cmd works and load into maya thru the partioVisualizer but not in the instancer (// Error: PartioInstancer->Failed to find id attribute )
Yes the instancer  needs a base level of specific  attributes,   theoretically the loader should use the point number  as the ID  but its possible that it still wants  at least a minimum of  attrs   to include  something called  "id"

- the partioImport just load a single frame and use it at the startup , so not sure about the use cases
Partio import was never really fleshed out as a  final tool,   it  mainly was written as  a quick hack to bring in  LIDAR data  into a maya particle object,   it is not   that fast  on large data sets either..

- What tool to use to import a cache and being able to interact with the particles. The emitter can just load a single frame ?
Partio  Emitter  is what you want to use for  bringing in a sequence of frames  to an existing particle object.  It will act as a cache emitter  and mapper of attributes  via the interface,   it will run on multiple frames  and once the cache runs out  the particles  can be  affected  by  any other fields  you would like.
However  as long as there is cache that it  can load it will override  the positions on the points and any other mapped attrs  you desire.   Your best bet is to map things into the points  as custom variables  and then  use them in expressions to  drive other channels. 
Again  you need to be using    bhclassic  for houdini  files. 

At this point  i have  about  50/50  confidence in the partio emitter node being stable.  it has not been worked on in several years,   so  it may not be the most stable thing.    At my last job where were used this  tool,   we primarily  brought in  particle data to  maya   in  .bhclassic  format  from houdini,  and    used the instancer  and  the visualizer 
to render all the particle data  via  arnold using either   MTOA  to  do the translation of the instancer  to arnold  (I also wrote the first incarnation  of the   MTOA   Particle  and instancer  translators)  or    the  partio  visualizer  translator  procedural  for  ARNOLD   that comes  in the github repo as well.
If you are  trying to  just render directly  this is your best and fastest  way to get there.  I wouldn't suggest using the  emitter  as   it will definitely be slow   on large data sets  and  no where near as  efficient  with the  display and  speed of things.


I hope this helps

Johnc
redpawfx 

--
You received this message because you are subscribed to the Google Groups "partio-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to partio-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Guy Dubost

unread,
Aug 6, 2018, 2:59:24 PM8/6/18
to partio-discuss
Hi John
Yes Thx it helps a lot. 
Instancer
While you were writing this , i figured out working the instancer , which is pretty cool.

Emiter:
i figured out to make it work now. thx. The only thing is that when the cache is over, i have this error 
PartioEmitter->Error loading the Cache file, it does not exist on disk, check path/file. // 
and the particles are frozen in the last position . dont they inherit of a kind of velocity ?

Arnold
I m close to a success with the partio4Arnold but for now it compiles well without partioPoint5.cpp. there are issues in the code since with the later cpp since i m using Arnold5
I see in the CmakeList for Arnold the file has been commented
set(TARGET_SRC Loader5.cpp partioCacherSampler5.cpp)# partioPoint5.cpp)
Also i have this partioCacheSampler surface shader but not sure how to use it 
and when having this partioPoint5.cpp , how am i suppose to use it.

Thx Man you rock. Your work is inspiring :)
To unsubscribe from this group and stop receiving emails from it, send an email to partio-discus...@googlegroups.com.

Guy Dubost

unread,
Aug 6, 2018, 3:46:16 PM8/6/18
to partio-discuss
Also I see in the src/io a NEW_BGEO vs BGEO
what the difference ? . And i dont see the new_bgeo in maya in the dropdown list in the partio4Maya  nodes


Le lundi 6 août 2018 14:05:23 UTC-4, redpawFX a écrit :
To unsubscribe from this group and stop receiving emails from it, send an email to partio-discus...@googlegroups.com.

John Cassella

unread,
Aug 7, 2018, 12:40:34 PM8/7/18
to partio-...@googlegroups.com
The  NewBGEO is not  working as far as I can remember. 

I forget  how I handled the  emitter thing.  I think you can keyframe the state of the emitter somehow to turn it off.

As for the arnold stuff,  its been a while  and  one of the other devs was the one who was working on  the arnold 5  switchover  so  I am  honestly  not sure why thats   commented out  honestly.  I'm pretty sure you need it  though.
I will ping  the guy  who wrote it and  see if he has any updates.

as for the cacherSampler   the way thats designed to work is, it  either writes out  or  reads  a partio cache file  as a  point cloud and you can use it as a shading  input   so   for example you can  generate a point cloud  that defines the lit color of  an object    bake that out to a point cloud 
and then read it back in   while turning off all complex shading.  its kinda like  Partio's version of  point  based rendering  or    brickmaps.     I've used it in other creative ways  in the past as welll...  generating   and storing  data on point clouds in  houdini for example and then  using them to drive 
shading  calls  like falloff ramps  etc..  at render time.

If I find out anything about the  arnold 5 thing I'll pass it along.

thanks

-johnc




To unsubscribe from this group and stop receiving emails from it, send an email to partio-discuss+unsubscribe@googlegroups.com.

Guy Dubost

unread,
Aug 8, 2018, 9:28:59 AM8/8/18
to partio-discuss


Le mardi 7 août 2018 12:40:34 UTC-4, redpawFX a écrit :
The  NewBGEO is not  working as far as I can remember. 
it compiles witouht error though but dont see it in the list. I ll check the cmake file if i see something wrong.
I forget  how I handled the  emitter thing.  I think you can keyframe the state of the emitter somehow to turn it off.
gotcha
As for the arnold stuff,  its been a while  and  one of the other devs was the one who was working on  the arnold 5  switchover  so  I am  honestly  not sure why thats   commented out  honestly.  I'm pretty sure you need it  though.
I will ping  the guy  who wrote it and  see if he has any updates.
i fixed things in the cpp but api changed in 5.1 we re using and some functions doesnt exist anymore.
 
as for the cacherSampler   the way thats designed to work is, it  either writes out  or  reads  a partio cache file  as a  point cloud and you can use it as a shading  input   so   for example you can  generate a point cloud  that defines the lit color of  an object    bake that out to a point cloud 

and then read it back in   while turning off all complex shading.  its kinda like  Partio's version of  point  based rendering  or    brickmaps.     I've used it in other creative ways  in the past as welll...  generating   and storing  data on point clouds in  houdini for example and then  using them to drive 
shading  calls  like falloff ramps  etc..  at render time.
   thx for the explanation 

If I find out anything about the  arnold 5 thing I'll pass it along.
I appreciate , thx
thanks

-johnc



Guy Dubost

unread,
Aug 9, 2018, 11:59:36 AM8/9/18
to partio-discuss
Hi John

Theres something strange about attributes values interpreted by partio
like , we have a custom attributes "mayainstance" exported from houdini in bhclassic sequence
it a a 0 or 1 integer value on each particle
the partioInstancer seems to interpret it correctly since i can i have 2 different objects instanced based on this attribute (i use indexFrom mapped to mayainstance attr)
but with the partioEmitter, it dosnt interpret correctly and if i print the values to see why , there s only 0 or values like 2.00-e45
i mapped partioPP (mayainstance) to ppAttr (cParticleID) and objectIndex (in the particleShape) points to cParticleID (that i created as a PP attr in maya)
any idea why ?

Le mardi 7 août 2018 12:40:34 UTC-4, redpawFX a écrit :

f.michal

unread,
Aug 9, 2018, 12:17:20 PM8/9/18
to partio-...@googlegroups.com
W dniu 09.08.2018 o 17:59, Guy Dubost pisze:
> there s only 0 or values like 2.00-e45
looks like datatype miss (float/int) ?

Guy Dubost

unread,
Aug 9, 2018, 12:45:33 PM8/9/18
to partio-discuss
if i query the id attribute i get this
./partattr <path>/GeoCache_particles4Instances1.0200.bhclassic id
id0 4.2039e-45 
id1 7.00649e-45 
id2 9.80909e-45 
id3 1.26117e-44 
id4 1.54143e-44 
id5 1.82169e-44 
id6 2.10195e-44 
id7 2.38221e-44 
id8 2.66247e-44 
id9 2.94273e-44 

Guy Dubost

unread,
Aug 9, 2018, 1:05:10 PM8/9/18
to partio-discuss
partinfo gives the types which are correct
Number of particles:  52
Type        Count     Name                          
----        -----     ----                          
VECTOR      3         position                      
VECTOR      3         v                             
VECTOR      3         w                             
FLOAT       4         orient                        
INT         1         mayainstance                  
INT         1         id                            
INDEXEDSTR  1         instance                      
INDEXEDSTR  1         name                          
FLOAT       3         pivot                         
INDEXEDSTR  1         dopobject                     
FLOAT       3         scale                         
particle 0 data 0.7318 0.240398 1.19393
particle 1 data -0.560408 0.284073 1.10358
particle 2 data 1.69153 0.274068 -0.210059
particle 3 data -2.43141 0.0702739 -0.588217
particle 4 data 0.828126 0.238695 -1.83557
particle 5 data 0.223469 0.212954 0.0114021
particle 6 data -1.88531 0.193209 0.760123
particle 7 data 1.63519 0.200504 0.0772952
particle 8 data -3.3124 0.0783069 -1.84667
particle 9 data 0.993681 0.212481 -0.111544


Le jeudi 9 août 2018 11:59:36 UTC-4, Guy Dubost a écrit :

Guy Dubost

unread,
Aug 9, 2018, 1:13:11 PM8/9/18
to partio-discuss
ok i see in the CPP, all attributes query are force to float (even in the disney partio git)
their must be code to test the datatype first
const float* data = p->data<float>(attrhandle,i);

Guy Dubost

unread,
Aug 9, 2018, 5:41:08 PM8/9/18
to partio-discuss
So i did a fix in partioEmitter 
lines 701 and 775 , same code

particles->attributeInfo(userPPMapping[doubleIt->first].c_str(), doubleAttr);
if (doubleAttr.type == 3){
//INT
const int* doubleVal = particles->data<int>(doubleAttr,it->second);
doubleAttrArrays[doubleIt->first].append(doubleVal[0]);
} else {
const float* doubleVal = particles->data<float>(doubleAttr,it->second);
doubleAttrArrays[doubleIt->first].append(doubleVal[0]);
}

Guy Dubost

unread,
Aug 9, 2018, 5:56:35 PM8/9/18
to partio-discuss
better
 doubleAttr.type ==  PARTIO::INT 
instead of 
doubleAttr.type ==  3
Reply all
Reply to author
Forward
0 new messages