A handful of small tubes falling to the ground
3830 10 1-
- scottval
- Member
- 56 posts
- Joined: July 2017
- Offline
Hello-
I'm working on a small jingle which will show a handful of small tubes falling to the ground. The small tubes are narrow and arranged initially so they point in random directions, kind of like a handful of pins and needles. Then they fall to the ground and impact with the ground in a realistic manner.
I thought a good way to get them to point in pseudo-random directions would be to copy them to a grid and a mountain node. This seemed to look pretty good at first, but when the objects fall to the ground, the tubes are still attached to the grid, so of course it looked pretty stupid.
So I'm thinking I need to (1) delete the grid just before the tubes start falling (I don't know how), or (2) come up with some other way to get the tubes to point in random directions, like attribute noise or something, which I'm not very good at yet. Suggestions and ideas are welcome as always…
-Scott
Edit: I'm thinking it might work to change the mass of the grid to zero, but I don't know how.
I'm working on a small jingle which will show a handful of small tubes falling to the ground. The small tubes are narrow and arranged initially so they point in random directions, kind of like a handful of pins and needles. Then they fall to the ground and impact with the ground in a realistic manner.
I thought a good way to get them to point in pseudo-random directions would be to copy them to a grid and a mountain node. This seemed to look pretty good at first, but when the objects fall to the ground, the tubes are still attached to the grid, so of course it looked pretty stupid.
So I'm thinking I need to (1) delete the grid just before the tubes start falling (I don't know how), or (2) come up with some other way to get the tubes to point in random directions, like attribute noise or something, which I'm not very good at yet. Suggestions and ideas are welcome as always…
-Scott
Edit: I'm thinking it might work to change the mass of the grid to zero, but I don't know how.
Edited by scottval - April 2, 2019 01:08:24
-
- DwarfVader
- Member
- 12 posts
- Joined: March 2019
- Offline
Hi, I can help you with that.
So you have two questions basically, how to create the tubes and how to arrange them.
Firstly, how do you create the tubes and what process do you use? If you tell me, I can try to help you with your particular workflow.
Meanwhile, I can suggest a typical solution for such a task. It will use the Bullet solver, which is good to sim large amount of objects. Its limitation is that it does not handle concave geometry (which is also why it's so fast), so keep that in mind. There are other ways to do things like these, but this is what I would do.
First, let's make sure our geometry is well-prepared. In your Needle Geometry SOP, at the end of the node graph place a Pack node. This will make our simulation much faster (I won't go into detail why, here, but ask if you want to know).
Ok, now we need some way to distribute this geometry in space. There's even more ways to do that. Maybe there's a better solution, but the one I often see used, and what I use myself, is a point clouds. You need to think what kind of distributions you want. The simplest thing to do is scatter your items along a geometry's surface. You can also scatter them inside of a geometry/volume. Finally, you can generate particles and use them as a base.
Let's create a simple Sphere SOP. To it, we can attach a Scatter node to generate points on its surface, or a Points From Volume node to generate points within it, too. These will be uniform, so if you want tips on how to move them about let me know too.
Finally, let's get our random rotations. I will use an Attribute Noise node, but you should look into the Point node too. In the Atrtibute Noise, change Attributes value to N (N stands for Normals), and tick the Remap Noise box - this will make sure we also have negative values (360 degrees instead of 180 spread). Decrease the Element Size to make the ditribution more random, and vice-versa.
That's it! You can visualise the random normals by clicking the Normals button in the viewport:

Now we just have to stamp the needles. Create a Copy Stamp node. Into the left input, connect your needle, and into the right input, connect your point cloud. If you had your needle model in a separate SOP network, you can use the Object Merge node to import it into this one.
There we go, there's our distribution. You should have the needles facing random directions automatically. You can create a simple Rigid Body simulation with Bullet by going into the right shelf > Rigid Bodies > RBD Objects (leftmost button). Houdini will bring you into the obj level and tell you to choose your Rigid Body object. Select your needles and press enter. Voila!
Now, just attach a ground plane to your simulation to see the effects. I have attached a very simple file, so feel free to ask more questions! Good luck!
So you have two questions basically, how to create the tubes and how to arrange them.
Firstly, how do you create the tubes and what process do you use? If you tell me, I can try to help you with your particular workflow.
Meanwhile, I can suggest a typical solution for such a task. It will use the Bullet solver, which is good to sim large amount of objects. Its limitation is that it does not handle concave geometry (which is also why it's so fast), so keep that in mind. There are other ways to do things like these, but this is what I would do.
First, let's make sure our geometry is well-prepared. In your Needle Geometry SOP, at the end of the node graph place a Pack node. This will make our simulation much faster (I won't go into detail why, here, but ask if you want to know).
Ok, now we need some way to distribute this geometry in space. There's even more ways to do that. Maybe there's a better solution, but the one I often see used, and what I use myself, is a point clouds. You need to think what kind of distributions you want. The simplest thing to do is scatter your items along a geometry's surface. You can also scatter them inside of a geometry/volume. Finally, you can generate particles and use them as a base.
Let's create a simple Sphere SOP. To it, we can attach a Scatter node to generate points on its surface, or a Points From Volume node to generate points within it, too. These will be uniform, so if you want tips on how to move them about let me know too.
Finally, let's get our random rotations. I will use an Attribute Noise node, but you should look into the Point node too. In the Atrtibute Noise, change Attributes value to N (N stands for Normals), and tick the Remap Noise box - this will make sure we also have negative values (360 degrees instead of 180 spread). Decrease the Element Size to make the ditribution more random, and vice-versa.
That's it! You can visualise the random normals by clicking the Normals button in the viewport:

Now we just have to stamp the needles. Create a Copy Stamp node. Into the left input, connect your needle, and into the right input, connect your point cloud. If you had your needle model in a separate SOP network, you can use the Object Merge node to import it into this one.
There we go, there's our distribution. You should have the needles facing random directions automatically. You can create a simple Rigid Body simulation with Bullet by going into the right shelf > Rigid Bodies > RBD Objects (leftmost button). Houdini will bring you into the obj level and tell you to choose your Rigid Body object. Select your needles and press enter. Voila!
Now, just attach a ground plane to your simulation to see the effects. I have attached a very simple file, so feel free to ask more questions! Good luck!
-
- scottval
- Member
- 56 posts
- Joined: July 2017
- Offline
Hello-
Thanks for your help. To create a tube, I was simply using the “tab” menu and selecting tube. Then I did a transform to adjust its scaling. It looks like you're doing the same thing in your project file.
I really appreciate your putting together a project file like this for me. One thing I would have been concerned about was that the tubes might have stayed attached to the sphere as they fell to the ground. I had copied tubes to a grid with a mountain node, and the tubes stayed attached. I'm not sure why they are not staying attached to the sphere, but they remain attached to the grid.
The project uses a lot of concepts with which are new to me, like pack, object_merge, points from volume, attribute wrangle, rest and dop import. I think I will have to dial it back, work on simpler projects, and work through these concepts gradually.
-Scott
Thanks for your help. To create a tube, I was simply using the “tab” menu and selecting tube. Then I did a transform to adjust its scaling. It looks like you're doing the same thing in your project file.
I really appreciate your putting together a project file like this for me. One thing I would have been concerned about was that the tubes might have stayed attached to the sphere as they fell to the ground. I had copied tubes to a grid with a mountain node, and the tubes stayed attached. I'm not sure why they are not staying attached to the sphere, but they remain attached to the grid.
The project uses a lot of concepts with which are new to me, like pack, object_merge, points from volume, attribute wrangle, rest and dop import. I think I will have to dial it back, work on simpler projects, and work through these concepts gradually.
-Scott
-
- DwarfVader
- Member
- 12 posts
- Joined: March 2019
- Offline
If you send me your project, I can take a look. Take things at your own pace! But if I may recommend something, it's a good into to Houdini tutorial. I'm quite new as well, but they really take you up to speed quickly. The Gnomon's Intro to Houdini 17 is great, but there's many free ones that are also good. I watched all of them, you pick up stuff all the time.
I'm sure that after you follow one or two, these concepts will seem intuitive to you - they aren't difficult themselves, they just need a framework in your head to fit into.
Put simply:
Pack - it “packs” the object. Think of it as instancing. Houdini only keeps one copy of the object in memory, and places it around as many times as you ask. This lets it go fast.
Object Merge - here it is used to import Surface Operators (geometry objects) from one network into another. In the node, you specify the object's name/path, and it appears in your current network.
The other nodes you listed aren't necessary to get into at this point - they are created automatically from the Rigid Bodies shelf tool.
The reason that the points don't stay attached is precisely because of the Rigid Body solver and the Copy Stamp tool. The latter creates many separate details, which the RBD solver treats as separate objects.
Please feel free to ask more questions - I'll be happy to help where I can
I'm sure that after you follow one or two, these concepts will seem intuitive to you - they aren't difficult themselves, they just need a framework in your head to fit into.
Put simply:
Pack - it “packs” the object. Think of it as instancing. Houdini only keeps one copy of the object in memory, and places it around as many times as you ask. This lets it go fast.
Object Merge - here it is used to import Surface Operators (geometry objects) from one network into another. In the node, you specify the object's name/path, and it appears in your current network.
The other nodes you listed aren't necessary to get into at this point - they are created automatically from the Rigid Bodies shelf tool.
The reason that the points don't stay attached is precisely because of the Rigid Body solver and the Copy Stamp tool. The latter creates many separate details, which the RBD solver treats as separate objects.
Please feel free to ask more questions - I'll be happy to help where I can
-
- Midphase
- Member
- 833 posts
- Joined: Jan. 2018
- Offline
You shouldn't be intimidated by all this, it's really pretty straightforward, but it can be even simpler than that, here's what I did:
Create a Sphere, turn it into a volume by using the ISO Offset (don't worry about what it does, just that it's necessary to give you a set of points inside the sphere and not just on the surface). Next I added a scatter node to create the points, 1000 is too many, so I just changed the value to 100. Next I created the Tube, just a simple tube, at the size I need. Then I connected the Tube to a Copy to Points just like Dwarf Vader did. The problem now is that all the tubes were perfectly aligned, but I wanted them to point to random directions. The easiest way to do this is with an Attribute Randomize node after the Scatter node which randomizes very specifically the N (normals) direction. Just type N in the Attribute Name and Houdini knows what you're talking about. Then I typed a range from -180 degrees to 180 degrees in the min/max fields for each of the axis (x,y,z) which made all the tubes point at random directions. Last thing is add a Transform node to bring the Tubes up into the air, 2 meters should be enough, but you can pick and choose from what height you need them to fall down from.
Follow me so far?
The rest is dead easy…go back up to your Scene/OBJ level…click on the Geometry node (there should be only that node) so that it's highlighted, and go up to your shelf and under the Rigid Bodies shelf click on the RBD Objects icon (the one with the Bowling Pins). Houdini does its thing…click play and watch your Tubes fall down into oblivion.
All done!
Wait…
Oh, you want the Tubes to actually fall unto a surface and collide? No problem, go back to the Shelf and this time under the Collision tab, simply hit the Ground Plane icon and you're done!
See? It wasn't that hard!
P.S.
The SetUp Attribute Wrangle, Rest, and DOP Import nodes are added automagically when you hit that RBD Objects shelf tool the first time…so don't worry about them!
Create a Sphere, turn it into a volume by using the ISO Offset (don't worry about what it does, just that it's necessary to give you a set of points inside the sphere and not just on the surface). Next I added a scatter node to create the points, 1000 is too many, so I just changed the value to 100. Next I created the Tube, just a simple tube, at the size I need. Then I connected the Tube to a Copy to Points just like Dwarf Vader did. The problem now is that all the tubes were perfectly aligned, but I wanted them to point to random directions. The easiest way to do this is with an Attribute Randomize node after the Scatter node which randomizes very specifically the N (normals) direction. Just type N in the Attribute Name and Houdini knows what you're talking about. Then I typed a range from -180 degrees to 180 degrees in the min/max fields for each of the axis (x,y,z) which made all the tubes point at random directions. Last thing is add a Transform node to bring the Tubes up into the air, 2 meters should be enough, but you can pick and choose from what height you need them to fall down from.
Follow me so far?
The rest is dead easy…go back up to your Scene/OBJ level…click on the Geometry node (there should be only that node) so that it's highlighted, and go up to your shelf and under the Rigid Bodies shelf click on the RBD Objects icon (the one with the Bowling Pins). Houdini does its thing…click play and watch your Tubes fall down into oblivion.
All done!
Wait…
Oh, you want the Tubes to actually fall unto a surface and collide? No problem, go back to the Shelf and this time under the Collision tab, simply hit the Ground Plane icon and you're done!
See? It wasn't that hard!
P.S.
The SetUp Attribute Wrangle, Rest, and DOP Import nodes are added automagically when you hit that RBD Objects shelf tool the first time…so don't worry about them!
Edited by Midphase - April 2, 2019 17:21:36
>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
-
- scottval
- Member
- 56 posts
- Joined: July 2017
- Offline
-
- scottval
- Member
- 56 posts
- Joined: July 2017
- Offline
I'm still not clear on how to get the object to which the tubes are being copied to not remain “glued” to the tubes as gravity takes its effect. The above posts, while impressive, all say something like “its in the file I'm giving you, it's easy” but, sorry, I just don't know where to look.
I'm thinking about the following solutions. (Assuming I'm copying the tubes to a grid):
1) Delete the grid after copying the tubes to its points. Can this be done with a delete node?
2) Indicate the grid is static, so that it is not affected by gravity. (I'd like to do this, but I don't know how.)
And hopefully the tubes will fall free of the grid and not remain attached to it.
-Scott
Edit: Maybe I don't need to make copies of the tubes to the points of another object, but rather just make copies of the tubes, maybe with the copy node.
I just tried that, and I found that the tubes remained in a fixed relation to each other as they fell and landed on the ground, like there was a transparent material holding them together. I am suspecting that this might have to do with the tubes residing in a single geometry object, and maybe I need to split them out into separate geometry objects somehow.
I'm thinking about the following solutions. (Assuming I'm copying the tubes to a grid):
1) Delete the grid after copying the tubes to its points. Can this be done with a delete node?
2) Indicate the grid is static, so that it is not affected by gravity. (I'd like to do this, but I don't know how.)
And hopefully the tubes will fall free of the grid and not remain attached to it.
-Scott
Edit: Maybe I don't need to make copies of the tubes to the points of another object, but rather just make copies of the tubes, maybe with the copy node.
I just tried that, and I found that the tubes remained in a fixed relation to each other as they fell and landed on the ground, like there was a transparent material holding them together. I am suspecting that this might have to do with the tubes residing in a single geometry object, and maybe I need to split them out into separate geometry objects somehow.
Edited by scottval - April 3, 2019 15:12:21
-
- Midphase
- Member
- 833 posts
- Joined: Jan. 2018
- Offline
I don't think you're clear on exactly what you're trying to accomplish. Is there a video of a similar effect that you're trying to copy?
>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
-
- scottval
- Member
- 56 posts
- Joined: July 2017
- Offline
Hello Kays-
Thanks for the help. I'm attaching the HIPNC file, so you can see what I'm doing. It's rather simple, like I said above, but rather than having two copies of the tube I have five. If you run the animation, you'll see that the tubes seem to remain attached, as if a transparent rod were holding them together as they bounce off the ground and come to rest. Thanks again!
-Scott
Thanks for the help. I'm attaching the HIPNC file, so you can see what I'm doing. It's rather simple, like I said above, but rather than having two copies of the tube I have five. If you run the animation, you'll see that the tubes seem to remain attached, as if a transparent rod were holding them together as they bounce off the ground and come to rest. Thanks again!
-Scott
Image Not Found
-
- Midphase
- Member
- 833 posts
- Joined: Jan. 2018
- Offline
Fixed it for you. You need to make sure to use the RBD Objects Icon in the Shelf Tools, the one with the bowling pins. I suspect you clicked on the Hero Object or one of the other ones which doesn't split the geometry into individual objects.
Basically, I just deleted your DOP node and the Rest/DOP Import from your geometry node tree and re-applied the RBD Objects and it worked as it was supposed to.
Also, you shouldn't use the Copy node, it's been deprecated. Instead, use the Copy and Transform node.
Basically, I just deleted your DOP node and the Rest/DOP Import from your geometry node tree and re-applied the RBD Objects and it worked as it was supposed to.
Also, you shouldn't use the Copy node, it's been deprecated. Instead, use the Copy and Transform node.
>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
-
- scottval
- Member
- 56 posts
- Joined: July 2017
- Offline
-
- Quick Links


