Question about an expression and using it with particles.
9704 11 4- Screwtape
- Member
- 20 posts
- Joined: Jan. 2006
- Offline
Alright, I'm new to houdini, and I just finished the arrow exercise in the Magic of Houdini Book. I'm trying to take it one step further by adding an expression from the DNA bend exercise to each arrow when it hits the ground. Basically, I want a variation on the expression: “fit($FEND - $F, $FSTART, $FEND, 0, 1)”. What I want it to do is when an arrow hits the ground, have it wobble a little, and have the wobble lessen over say, 10 or 15 frames per arrow. The current expression causes an object to wobble from the first frame, to the last, and lessening slightly over time, until the end of the animation. If you are confused, I can try to explain a little better, and any help on this would be helpful.
Edited by - March 2, 2006 19:08:51
- Screwtape
- Member
- 20 posts
- Joined: Jan. 2006
- Offline
Ok, using the copy stamp technique, I've managed to copy the strength field in the twist node using: stamp(“..copy1”, “strength”, 0). I then added the variable strength to my stamp tab in my copy node. Currently in the value field for my strength variable, I have the expression: rand($ID)*sin($F * 50). This causes all of the arrows to go in and out of the ground repeatedly. Like I said before, I'm looking to make a few arrows out of my group to wiggle slightly, then slow to a stop, over maybe 10 or 15 frames. I feel that I'm really close and that if I can just put the right expression into the value field, I'll have it. thanks ahead of time to anyone who can help me.
- will c
- Member
- 57 posts
- Joined: July 2005
- Offline
halo,
hope you like the book. check out the attached file for one way to get the arrows to flex back and forth upon landing. it's going to be added to the second edition. it will be a great opportunity to further discuss attributes and passing info between contexts. the attached file needs to be cleaned up, made more procedural, etc, but all the guts for one way of doing it are there.
salud,
will
hope you like the book. check out the attached file for one way to get the arrows to flex back and forth upon landing. it's going to be added to the second edition. it will be a great opportunity to further discuss attributes and passing info between contexts. the attached file needs to be cleaned up, made more procedural, etc, but all the guts for one way of doing it are there.
salud,
will
- Screwtape
- Member
- 20 posts
- Joined: Jan. 2006
- Offline
Thank you! This is a great resource. Like I said before, I'm a beginner, so I'm having some trouble understanding some of it. My main question is, where does the variable $LANDED1 come from? Here's a very simplified version of my .hip file, could you take a look at it and either show me or tell me what I need to do to get a little shaking in my arrows? I'd be much obliged.
- will c
- Member
- 57 posts
- Joined: July 2005
- Offline
- Screwtape
- Member
- 20 posts
- Joined: Jan. 2006
- Offline
Wow, this file is great. I've figured out how to get all of my arrows to rotate on impact, and I'm very grateful for it. I was just wondering if you could show me how to modify the expression in my attribute node, the one that makes the variable LANDED, in order that the amount of frames that each arrow vibrates for is random. I read in the note that it isn't currently set to do that, but I can't figure out how to make it do that. I was also wondering if you could show me how to modify the stamped parameter in my copy1 node that causes the different arrows to vibrate at different amplitudes and frequencies. I also would like to know how to cause most of my arrows to stick, but have some arrows bounce off of the ground, and falling in disarray. I know that's a tall order, but you've been such a huge help thus far. Thanks again for the file you gave me, and I look forward to yur answer on this question.
- Screwtape
- Member
- 20 posts
- Joined: Jan. 2006
- Offline
alright, I'm starting to get desperate. I still can't figure out how to randomize the vibration amount per arrow, or how to make some arrows ricochet, then hit the ground, while others stick into the ground. If anyone could look at my previous post with all of my questions, download this arrows2.hip file, and take a look at what I'm talking about, I would be SOOO grateful! :cry:
- will c
- Member
- 57 posts
- Joined: July 2005
- Offline
halo,
here is the final salvo for you to check out. i added some random flexing time and made a couple of the arrows skid on the ground using DOPs. one interesting bit is you'll see the use of copy-stamp looping to group out the arrows, don't think that was covered in the book, but it is quite handy. it'll make it into the second edition as before, this file could be cleaned up, made more procedural, etc. but, the guts are working.
salud,
will
here is the final salvo for you to check out. i added some random flexing time and made a couple of the arrows skid on the ground using DOPs. one interesting bit is you'll see the use of copy-stamp looping to group out the arrows, don't think that was covered in the book, but it is quite handy. it'll make it into the second edition as before, this file could be cleaned up, made more procedural, etc. but, the guts are working.
salud,
will
- zoki
- Member
- 64 posts
- Joined: July 2005
- Offline
Hi guys, Hi Will
here are my arrows
its just previz quality render different sequences added in mplay and then converted into avi through command line, but I am satisfied with lesson and book!
I analyzed arrow3 file and is very nice, i get everything except dop section I still didnt cover this in book
regards
z
here are my arrows
its just previz quality render different sequences added in mplay and then converted into avi through command line, but I am satisfied with lesson and book!
I analyzed arrow3 file and is very nice, i get everything except dop section I still didnt cover this in book
regards
z
- eitht
- Member
- 257 posts
- Joined: Nov. 2010
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
- eitht
- Member
- 257 posts
- Joined: Nov. 2010
- Offline
-
- Quick Links