Categories
FMP

FMP:DESTRUCTION FX: DEBRI

Scattered, damaged or chipped off material from concrete is called as Debris. Even though it is a secondary element in rigid body stimulation, it has a major effect on visuals. The process of creating debris is as follows:

In order to create realistic debris, it is crucial to have an accurate understanding of its source. To achieve this, we need to utilize a fractured geometry that can provide us with the necessary data to compute the velocity and generate particles. As previously mentioned, we have created a fractured geometry that allows us to simulate and observe the motion of debris.
Once we have gathered the required data, we remove any superfluous components from the geometry to optimize the file size. Finally, by utilizing the trail node, we can calculate the velocity required to create points and generate particles that accurately represent the debris. As we have called out our fractured geometry it comes with 2 groups that are inside_building and outside_building.

When simulating the behavior of objects in a 3D environment, it is essential to follow a naming convention to avoid confusion when dealing with multiple fracture geometries. These geometries can create problems during rigid body stimulation, which can cause inaccuracies and glitches in the simulation.

To create debris, we add a debris source after the fracture geometries are defined. This debris source node plays a crucial role in the whole process by computing the velocity and creating the necessary points for debris creation stimulation. This helps generate debris points based on the computed velocity, which is necessary for simulating the realistic behavior of debris.

debris source workflow

To generate particles for debris in Houdini, we must first import the source points into the dop network. This is the critical setup for particle creation. The source points are created in the popsource node, and they are then multiplied as needed using the pop replicate node. The pop drag and pop force nodes are responsible for controlling the particle’s movement and can be adjusted as required for the project.

The pop solver node is where all the primary stimulation takes place. It is the core of the simulation, and without it, none of the networks will work. The pop solver node takes in information from all around and calculates the stimulation, including factors like bounce, drag, weight, and density. It is responsible for ensuring the particles move realistically and behave as expected.

Once we have the particles moving as we want them, we export them using the dop import node, and then we can move on to the rest of the simulation. This step is crucial, as it allows us to carry out the remainder of the simulation while still maintaining the particle’s realistic movement and behavior.

workflow for particles

The process which I used for making pieces for debris is as follows:

With the help of rbd material fracture I fractured the geometry in various pieces. then I used the “For each node”. This node specializes in calculating factors that we tell them to each and every component that it carries. The vex command I gave was as follows:

-ch(“px”) i.e. channel position ‘X’ ‘Y’ ‘Z’ respectively, as we have to give command to the position and pivot to move to the center of the viewport. This is done specifically to get the pivot of all the pieces to the center of their mass. As the points have their own pivot and the pieces have their own, it will cause us some weird artifacts.

The second code that I have used it $CEX/Y/Z to center pivot for all the pieces.

transformed individual pieces
Workflow for adding the pieces to the point to create debris

Then I added these pieces to the node name attributewrangle2. (info below)

After the dop import node, as the points were a bit too much, I deleted random points with the help of the VEX code (mentioned below). This vex code illustrates an “if” statement. If the statement is usually a code which will have 2 factors, ‘if’, and ‘then’. For example, if (…this happens)
then (….this should be the result);
While taking the same concept in mind the code states that if a random (rand) point number (ptnum) is bigger than this channel (chf) named (“deletepoints”), delete (removepoint) the points randomly.

“if” statement VEX code (remove_random_pts)

After this step, we tell Houdini to align random pieces to the newly fractured box pieces which would act as a shard, resembling debris. To carry out this function, I have used the VEX code mentioned below. (please refer to random ID match).

1) float (a terminology used for fractional or floating point numbers) and = rand(@ptnum);

This says that all points have random floating numbers which are not the same or identical to each other.

2) int npts (number of points) = npoints(1)+1;

the points we have start from 0 and there is no piece which has the number 0 hence we have to change the numbers given to the points so that we don’t get any error while instancing the pieces to the points.

3) i@id (id of individual points) = (int)fit01(rand, 0, npts);

Here I have used the FIT statement, where we can fit the given number to a different range. For example, we can fit 1-100 and change it to 1-10. it would still work the same just the numbers are different.
For this instance, we did it to fit the random number of fractured pieces to a random number of points available.

random ID match

After this step I copy stamped all the pieces to the points and we have our debris.

points for debris
Debris

Leave a Reply

Your email address will not be published. Required fields are marked *