rdg Posted January 23, 2007 Share Posted January 23, 2007 Hello again, I now try to get into houdini and picked a project. A lot of my projects depend on external data and I am now trying to get my external data into houdini. I guess there are a lot of ways to do this. I got the pythontohoudini-bridge working and already set some flags of objects with python. [1] This lead me to a lot of questions: Can I use this technique to "poll" data from python every frame and change properties over time? If I execute openport -r "python myScript.py" 12000 in the textport the console tells me "Error running python" - where can I set the paths for houdini to look for external programs? Can I put 'openport -r "python myScript.py" 12000' in a channel ? I guess not, as this script cannot return a value ... Should this be triggered at frame change? I even thought about encoding my textfiles as images and read them with chops (?) but I can not find ord/chr functions inside houdini to return the numbers to letters. My question should be: How can I read data from external files, that are not images, hips or the like? thank you for your patience, Georg [1] http://odforce.net/wiki/index.php/PythonTo...ni#Introduction Quote Link to comment Share on other sites More sharing options...
sibarrick Posted January 23, 2007 Share Posted January 23, 2007 (edited) What kind of data are you trying to read in? You can read in data with chops, using a file chop. Raw data can be read in simply my making a file with the .chan extension on it. Every row in the file is treated as a frame and each column is a channel. This data can then be passed to anywhere else in Houdini you like. Edited January 23, 2007 by sibarrick Quote Link to comment Share on other sites More sharing options...
rdg Posted January 23, 2007 Author Share Posted January 23, 2007 sibarrik, thank you. This helps alot and I will try this right now. I want to parse a xml file. I have a python script that returns ie. random chunks of tags. (Or you add arguments to the command line to have control over the picking of the chunks). So I want houdini to call the script every frame and get some answer back. Thats what I thought I need to do Georg Quote Link to comment Share on other sites More sharing options...
sibarrick Posted January 23, 2007 Share Posted January 23, 2007 That might be a bit more tricky. Chan files read data for an entire frame range at once. You might want to check out the unix sop..... Is this for a realtime thing? or can you parse everything first and then create a data file that houdini can read. i must admit I'm still a little hazy about what you are trying to achieve. Quote Link to comment Share on other sites More sharing options...
rdg Posted January 24, 2007 Author Share Posted January 24, 2007 i must admit I'm still a little hazy about what you are trying to achieve. me, too. I am trying to wrap my head around the concepts of data-flow. I have a long list of strings (names). I want to use this strings in various context of houdini. Sure I should shuffle the strings and write a textfile. That way I can concentrate on more obvious problems Georg 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.