rdg Posted July 19, 2007 Share Posted July 19, 2007 I am working on a digital asset that generates animations like those schedules on airports: http://proforma.preset.de/tai-chi-hou-dini/rdg-flip-001.mov Everything fine so far. but now I have a 'brain-blocker': each digit is a DA with a parameter which letter to display 1=" ", 2="A", ..., 34 = 0, floats cause the system to flip. I can calculate the "distance" between different letters to 'fade' between two words. I store this in a point attribute as animation. To have this system extensible I don't want to hardcode the number of digits. That's where the problems rise: How can I add/modify/remove a animation on per point basis? I have line that is resampled to the number of digits and a partitionSOP creates the groups. No I can add manually as much attributeCreateSOPs as needed to be able to manually edit the animation of each digit. but how can this be procedural? I could hardcode about 20 digits with the corresponding groups and then deleteSOP the ones not needed. The script then could set keyframes in each group for each digit. shadeops (sorry for the kick!) mentioned the foreachSOP of H9 - but I cannot get it to work nor can I imagine how to use it in my context. If you have any idea how to approach such stuff - please share it. Georg Quote Link to comment Share on other sites More sharing options...
old school Posted July 19, 2007 Share Posted July 19, 2007 This actually would be a good case for Copy SOP Stamping. A Line SOP with each point the root of each character as you are doing. Add a point increments the line length adds a new digit. Next you copy your flipping letter object to each point through the Copy SOP and stamping to control the state of each. All the attributes should already be there. Just create a stamp variable for each attribute you want to control. Quote Link to comment Share on other sites More sharing options...
antoinedurr Posted July 20, 2007 Share Posted July 20, 2007 This is a neat problem! I envision two approaches to this problem: 1) a system like what you have, where you drive each "flipper?" procedurally, and 2) a system where the flipper is told what letter to go to, and it does it on it's own. If you're willing to have a DA for each letter, you can do the latter, as it involves simulation, which can't be stamped. If you have thousands of letters, then you might have to continue on the current track. In system 2, your DA has a parameter that is an actual letter. Inside, you translate that letter into a number. You use a POP setup with a single point, whose position on an axis (of your choice) corresponds to the floating point value. When the point hits 26, it gets reset to 0. Imagine it at TY=-3 (letter 'C'). The POP system checks the DA parameter (represented as an integer, not a float). If the int param doesn't match the current position, move the point down by whatever amount makes the system look good. Check if the TY <= 26, and if so, set it to 0. So the net effect is that if you change the letter from C to A, it will start flipping all the way through Z until it gets to A. Somewhere else you have the text (make a bunch of spare params, or a dedicated DA just to hold the info). Each letter DA should end in a 4 digit number, containing row and column positioning, e.g. letter0305 is the fourth row and sixth column (start things at zero). The letter DA's letter parameter can now be extracted from the words DA, by doing a substr(chs("../words/word" + int(opdigits($OS)/100)),opdigits($OS)%100, 1), i.e. use the first two numbers from $OS to point at the correct word, and the second two to point to the correct column. Because each letter DA is a simulation, which checks if the letter has changed and does nothing if it hasn't, the system will only change when you reset the words in the words DA. So now you have to reset the words. Depending on how much you plan on changing the words, there are multiple approaches which I can explain if you give some text examples. Now that I think about it some more, you could combine the stamping approach using your existing DA. Instead of having a simulation in each of X by Y DA's, you could have one simulation exactly like the above, but with one point for each letter. So you have a grid of points, each falling based on what letter they are and are going to. Then the stamping becomes trivial, just feed the simulation points into the stamp SOP, and the DA with an appropriate transform into the left side, and set a stamp variable to abs($TY). Resetting the words is also challenging, depending on how much you want them to change, and how you're telling the system to switch one particular word to the next. -- Antoine Quote Link to comment Share on other sites More sharing options...
rdg Posted July 20, 2007 Author Share Posted July 20, 2007 Thanks for your answers. As I need now more medical than houdinic assistance I am not going to research on this for a while, but as soon I am recovered I will continue. The Letter flipping is already an OTL and is driven by the value as described in my first post. Just create a stamp variable for each attribute you want to control. Is it possible to create copy stampparameters on the fly? If my top-level-DA (the 'line of digits') says: I am 12 digits long, how can I tell the copySOP that there are now 12 stampVariables? For my approach I would need a script/command that allowes me to set an keyframe for an specific point-attribute at a given time, like: at time 14 set null1.point(1).attribute("myletter") to 3 Till next week or so, Georg Quote Link to comment Share on other sites More sharing options...
rdg Posted July 21, 2007 Author Share Posted July 21, 2007 (edited) Thinking distracts from the bordedom of recovery. I think I can solve it like this: I want a text/xml file that holds the lines of words <generic> <scramble /> <line>I am feeling</line> <pause>2</pause> <line>better today</line> <pause>2</pause> <reset /> </generic> The Digital Asset will contain the letter flipper and offer an input. The Utility Digital asset will read the textfile and then create a subnet with all the necessary groups (one for each letter) and the animation of the letters. -> the letter flipper can now be copied to the points and reads the stamped attribute animations. This won't be as realtime as Antoine's particle approach. But a fistfull of if-else could assure that there is only one subnet for each display_line. Georg Edited July 21, 2007 by rdg Quote Link to comment Share on other sites More sharing options...
khuong Posted January 7, 2008 Share Posted January 7, 2008 hi, i'm new to Houdini i like this animation but i can't figure out how to do it... is there any tutorial of creating this fx? your tip is very helpful for me, thanks a lot Quote Link to comment Share on other sites More sharing options...
rdg Posted January 14, 2008 Author Share Posted January 14, 2008 This is my setup. It's by far not as procedural as the one Antoine kindly sent me. Eg. you have to animate each letter on your own in contrast to Antoine's which actually reads a textfile. There is a lot of room for improvement. another_airport_45.zip Georg Quote Link to comment Share on other sites More sharing options...
khuong Posted January 16, 2008 Share Posted January 16, 2008 This is my setup.It's by far not as procedural as the one Antoine kindly sent me. Eg. you have to animate each letter on your own in contrast to Antoine's which actually reads a textfile. There is a lot of room for improvement. another_airport_45.zip Georg Thank you so much for posting your source file Georg ! My knowledge is tiny, so please don't upset if i couldn't get what you tried to advise sorry btw, how can i get the Antoine's setup you mentioned? thanks Khuong Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.