Home

Resources

Early Tests

Thesis Progress Blog.

The goal:
-Using C++/HDK, create a self contained node that can be used in Houdini to take the input of particles and add more particles that will inherit velocity from the original particles weighted based on the distance of the new particles to the old.

Vocabulary I will be using:
-Seed particles = The original particles that will be used as input to the node.
-Injected particles = The particles added to the system by the node.

Here I will be explaining my process and the steps I go through to acheive my final goal amd have a working tool.

First off I created a node that made one point and had controls for position. Then a SOP that creates a cluster of points around that point. The way that I am calculating the position of each of these points in the cluster is by first calculating a number taking the artist defined distance from a parameter and multiplying this by a random number. Then, getting a random number for each of the X, Y and Z coordinates. This vector is then normalized and scaled by the random distance number previously calculated.

My next step was to bring in particles and create clusters of points around each of them. First I accomplished this by querying the seed particles positions each frame and moving the points to surround the new position. Then I changed this to instead query the velocity of the seed particles and apply that velocity to the spawned particles, then move the spawned particles based on their own velocity. This was to get ready for using multiple seed particles influence to calculate velocity of the spawned particles.

Here is a test showing 5,000 seed particles with 1,000 particles spawned around each of them. This was just to test that the spawned particles were able to grab the seed's velocity attribute.

The next step I took was to allow for newly spawned seed particles. In the previous test the tool would only work on seed particles that were present the first frame. So in this next step I was able to allow for newly spawned particles and particles that died.

After getting the following behavior to work I the needed to be able to put all of the spawned particles in a data structure that would allow me to feed in a position and receive back the nearest points. For this I am using GEO_Pointtree which uses KDTree to setup such a data structure.

I was able to get the point tree to work but I am getting some strange results. I think I need to rework how I am calculating each points velocity because they seem to take one extra. I have also found this to be very slow. I was looking into multi-threading but that requires a large amount of reworking so for the time being I have chosen to look into faster options.

I have setup this for now which basically calculates each spawned particle based on their seed particles position each frame but the I have included a cos function which allows for the particles to scale their distance from the seed each frame. This was to try and give the particles some movement so they would not look so static. Here is an example:

I am using two numbers to act as seeds so that each particle is getting a different value from the cos function. The first is an attribute on the particles themselves which is a combination of their seed particles point ID added to the number in the sequence in which they are birthed. This number is used also with the current frame number. To make sure that the artist has control over how fast the particles move in relation to time I have added a scaling parameter. I have also created another scaling parameter to offset them from each other based on their ID. These two parameters can be changed to get varied results.

This is how the UI looks right now for the tool. Here is a quick test I did where I advected particles with a basic Pyro sim and then used my tool to increase the amount of particles from 50,000 to 5,000,000.