i have an animated deforming (particle count is changing) object and a prt volume aplied to this object,
then i generated the particle sequence,
now i want to render the particles as real geometry, if i just do a regular prt birth and prt update it does not work since the particle count is changing
So my question is, is there a way to tell particle flow not to update but to completley reload the prt file at each frame or maybe just render each particle as a custom shape witout using pflow at all.
EDIT: Oh, reread your question, sorry.
- Chad
This is VERY tricky.
If all shapes are the same, you could load the PRT Loader into PFlow - particles will be moving around, but if they shapes and materials are identical, nobody will notice. When more particles appear, they will be added. When particles are removed, you can send them to be deleted.
We tried once to delete all particles on each frame and rebuild them, but the Birth keeps track of the FileIDs and wouldn’t produce new particles, so it was necessary to constantly add new and new particles with higher IDs which is sub-optimal.
Our inhouse PRT Mesher has the ability to assign shapes to particles without PFlow, but since the PRT Volume doesn’t have consistent IDs and the Indices are counted from bottom to top, it would have the same issue with shapes moving around unless all particles used the same shape so it wouldn’t be obvious. That, and the PRT Mesher is not available, and the resistance to adding it to future Krakatoa versions seems high.
So right now using dynamic PRT Volumes to assign shapes is a bad idea.
The closest solution is to
*Fill the shape with particles on frame 0 using PRT Volume, save to PRT.
*Load in a PRT Loader, apply a Krakatoa SkinWrap WSM and deform the particles from frame 0 on the following frames.
Now this works only if you have procedurally deformed object with non-changing topology. It wouldn’t work with a realFlow mesh for example.
Another alternative would be to create a huge amount of particles (a big box covering the whole area where the mesh will ever be), assign shapes to these and then use a Krakatoa Geometry Test to send out any particles that are not inside the volume. Then on the next update step bring the particles back into the Testing event and redo the test, thus “revealing” those that are in the volume and hiding those that are not (the sent out particles would not be deleted but just put in an event that does not render/display).
Hey, this is a use case for my wish of “Have PRT Volume create particles in a defined volume, but only assign channel data, do not cull. We can cull later with a KCM based on signed distance channel.”
In this case, the “later” would be after the particles are loaded into PFlow.
- Chad
EDIT: I see you covered how to do that in PFlow… Apparently I’m only barely reading forum posts these days.
thank you for the detailed description, once again the prt mesher would be great it seems is it too valuable to just add it to krakatoa ? maybe selling it as seperate plugin would be great
i need the particles to keep their grid like appearance, so deforming is not an option,
what i did first was about what you mentioned lastly, to create a particle volume covering the entire animation of the object and then make them renderable/invisible depending on whether they are inside or outside of the volume, but i couldnt go high enough in particle count with this technique.
All the particles have the same same shape + material, so you say “When more particles appear, they will be added. When particles are removed, you can send them to be deleted” when i remove a particle that has id 5 for example and then in the prt a particle with id 5 appears again afterwards will the PRT update operator put it in again ?
you mean just using the regular prt birth, prt update and Krakatoa geometry test to delete particle outside the object ? i tried that but did not really work for me .(
Ok, you are right, there is a bit of cheating required.
I just tested it and here is how it goes:
*I created a Teapot, applied an animated Bend and turned to PRT Volume
I then added a KCM to the PRT Volume (this is the trick!) and set to the following flow:
**Input Index channel, add a Script Input to it and output to ID channel.
**In the Script, enter (currentTime.frame as integer100000) where 100000 is the highest particle count expected per frame (YMMV).
*I then saved this to PRT with Position and ID channels only.
*Then I created a PRT Loader and loaded the PRT sequence
*Created a PFlow and used Krakatoa PRT Birth and Update to load the particles, and an ID Test to send out to a Delete event.
At this point, the PRT Birth and Update will see NEW particles on each frame because their ID will be increasing by 100K per frame. Thus, all particles will be deleted and new particles created on each frame, getting the same material and shape as the previous ones.
ah right that sounds logical, i will try it like that, thanks a lot bobo
heh, cool