Scattering | Particles | Animation

Aslak Kjølås-SæverudAslak Kjølås-Sæverud Posts: 19
edited April 2016 in Fabric for MODO

Hi there.

I'm doing this project where I'm trying to make all the elements of a forest grow.

Right now I'm working on making moss, and I'm looking for an way to scatter the them and play the growth animation at each scattered position.

Is it possible to feed Fabric the positions of particles created in MODO to scatter from? And then use the age of the particles to drive an alembic animation?
So something like this just insted of the sphere having the growth animation driven by the age rather than just scaling.

Is it maybe possible to achieve something like this within Fabric?

Comments

  • malbrechtmalbrecht Fabric for Houdini Posts: 752 ✭✭✭

    Moin,

    Is it possible to feed Fabric the positions of particles created in MODO to scatter from?

    yes and, unfortunately much more so, no ...

    The problem with Particle-Fabric-interaction, if you do not want to use a cache (e.g. a CSV file, which modo could create and which you could read in from Fabric), is that you will most likely spawn more than one particle per frame. While you can get the data of ONE particle from modo to Fabric (using a particle operator, reading out the data on "assign" or "new", depending on where you want to grab the data - probably in "assign" state), currently there is no "subframe" data transfer.
    So you only get ONE particle per frame and a (random?) second one on the next frame.

    What you CAN do, however, is to populate your area in a pre-roll. So you would spawn your particles from frame 1 to, say, 50, giving you 50 particles. In your graph you would check the frame number for "50", until then you store each particle data set that you get in into an array (or a dictionary). Only from frame 50 onwards you would actually do your growth, age control etc.

    This isn't elegant, but it is the best idea that I could come up with so far on connecting modo's particles with Fabric. Unfortunately there is no particle array in modo that you could simply "grab" and transfer (not that Fabric's *current' implementation could handle it anyway :smile: )

    If you can use a cache (CSV), things are easier - but you loose the life-interaction feature.

    That is, beside the fun of it, one of the reasons why I started my "maParticles" system in Fabric :wink:

    Marc


    Marc Albrecht - marc-albrecht.de - does things.

  • mootzoidmootzoid Fabric Employee Posts: 185 Fabric Employee

    Hi Asiak,

    Being able to use geometry (e.g. polygon meshes, particles) as inputs, same as in for example Fabric for Maya or Softimage, is on our to-to list for Fabric for Modo, but the current beta does not yet support inputs for geometry.

    Cheers,
    Eric

  • malbrechtmalbrecht Fabric for Houdini Posts: 752 ✭✭✭
    edited April 2016

    Hi, Eric,

    just to nit pick ... with the particle operator you don't actually pipe geometry from modo to Fabric, but e.g. a Vec3 "per particle". The problem really isn't the lack of geometry-interaction, but that there is no way of accessing all particles as distinct entities as an array within one frame.

    Marc

    P.S. using that operator approach you can actually "dissect" each particle, splitting its data into channels like position, rotation, age, mass etc.


    Marc Albrecht - marc-albrecht.de - does things.

  • mootzoidmootzoid Fabric Employee Posts: 185 Fabric Employee

    Hi Marc,

    What I meant is the approach that most users will probably want:

    plug the geometry object into the Canvas item and latter will take what it needs: in the case of a polygon mesh it would take vertices, polygons, normals, ... and for particles it would take positions, sizes, velocities, ...
    So a polygon mesh would be a Fabric PolygonMesh object (with attributes) and particles would be a Points object (with attributes).
    One could then use the existing attribute presets to get/set the arrays of .

    At least that is how I would want it to work!

    Cheers,
    Eric

  • malbrechtmalbrecht Fabric for Houdini Posts: 752 ✭✭✭

    Yeah, got you - only that the particles are not "static" but keep changing their properties over time.

    Example:

    Frame 1: No particles
    Frame 2: 1 particle with position, size etc.
    Frame 3: 49 particles including the previous one
    Frame 4: 32 particles (some from frame 3 have died already)
    ...

    I believe we "want the same", it's just that I see particle data as non-geometry data in the first place. They are "information". What modo does provide you with is a "virtual locator" that is getting attached to every single particle at the same time within one specific frame. This is the "particle operator". It's playing quantum physics :) by being "everywhere at the same time" (speak "frame").
    So what you would get, in theory, into the Fabric graph is a size-changing array of data sets per frame, because the number of particles can constantly change (if particles die). Technically that's just fine - if you CAN get the data out of modo. It should be available somehow, since modo can write out a particle cache file (giving you exactly that collection of data per frame - eventually with different numbers of rows, however).

    What I mean is: There are several logic issues to solve. One being that modo's particle simulation itself may change the data set that is being piped to Fabric (see above: The number of particles in the cloud may change from frame to frame), so how would the information you get out of Fabric be incooperated into the next step? If the Fabric graph does not "agree" on killing a specific particle - who will be right?
    Another logic question being the creation of particles as such: Wouldn't it make sense, in a way, to "create" the actual particles in Fabric and only get the particle simulation "parameters" from modo? If you'd mimic the way modo's particles are created, you could grab the simulation's configuration, create the particles in Fabric (and thus have the graph get "to say") and then send back the cloud to modo per frame. Else Fabric (being the "plug in") would not have a "logical" way of creating particles, which, for a particle simulation, would be necessary.

    Just brainstorming here, of course. So let me repeat: We want the same. Awesomeness. I am merely looking at how the integration would look like with the tools available in modo now.

    Marc


    Marc Albrecht - marc-albrecht.de - does things.

  • mootzoidmootzoid Fabric Employee Posts: 185 Fabric Employee

    I think we are talking about different approaches.
    What I meant is way more primitive:

    A Canvas node can have an input port of type "particles" into which you can plug the whole particle object.
    Things are then evaluated as following:

    • Modo evaluates its particle system.
    • Canvas fetches the entire particles and creates a native Points object with attributes from them.

    Basically you would only be able to use particles as input, not as output.
    At least for starters.

  • malbrechtmalbrecht Fabric for Houdini Posts: 752 ✭✭✭

    Ah - OK - if the Canvas node is not expected to modify (i.e. output) the data, then, yes, we are talking about very different things here indeed!

    So in that case you'd send all particle information "per frame" into the Canvas node and "just" use the information to, e.g., polygonize over the data, outputting a PolygonMesh (as an example usecase), right?

    Makes sense. I was hooked on the idea of modifying geometry - and that is where the particle thing just didn't fit for me.

    Marc


    Marc Albrecht - marc-albrecht.de - does things.

  • mootzoidmootzoid Fabric Employee Posts: 185 Fabric Employee

    So in that case you'd send all particle information "per frame" into the Canvas node and "just" use the information to, e.g., polygonize over the data, outputting a PolygonMesh (as an example usecase), right?

    Yes, exactly!

Sign In or Register to comment.