Re: ICE - text file & string manipulation
Thanks Matt, you do confirm what I concluded from my testing so far, that ICE string manipulation is indeed rather limited. I assumed it was going to be better than that - and double kudos to those people who have pushed this to some degree (thinking of mr Mootz' Topolizer for instance - that does rely on strings quite a bit) Your suggestion of putting all data for one particle on a line is interesting - but that doesn’t fit my case very well. The data is not really per frame animation data, that could be done as fcurves. That was just my idea for how to treat a lot of different setups in one go. I'll have data sets per 'setup', each needing to be built up from the data. If I can do them on a timeline (a bit like an obj sequence for geometry) I can treat them all at once in a single scene. I can specify the format of the data delivered to me (as long as it remains practical), which is a great luxury. And I'm probably not going to bother with the file format part - and just import the strings I need manually. I read you loud and clear that automation for the sake of it can be a trap (especially if you need to learn new skills for just one case) - and that some simple manual work can go a long way in getting to the end result faster. So far it looks like the tedious part -filtering the bulk of the data, and getting it onto particles or instances- is going to work, and the more tricky bits can be done manually - for a semi-automated solution. Which sounds more in line with my skills. -Original Message- From: Matt Lind Sent: Thursday, November 12, 2015 9:44 PM To: softimage@listproc.autodesk.com Subject: Re: ICE - text file & string manipulation ICE string manipulation is crude and only intended to do simple concatenation and tokenizing for simple cases such as appending an object name and model name to form a full path. It doesn't have the functionality of a scripting language. ICE string manipulation cannot convert text to floating point values with integrity either, or if it can, it involves a lot more workarounds than it's worth to employ. Based on your short description, you only need to import data as FCurves onto the parameters of an ICE compound you apply to your particle systems. The FCurves can be easily generated and applied via script, or re-applied in the event you change the file. The script can also employ a UI to load/save the data, present options to the user for processing the data, and so on. ICE cannot do any of that. You should consider is how data is formatted in the file to make life easier. For example, your file describes values for all scene elements in the scene per frame. An FCurve is a series of values for an individual parameter. By grouping the values per parameter instead of per frame of the scene, the data will be easier to parse (eg; put all 'values' on one line, put all particle 1 array on a separate line, put all particle 2 array on a separate line, etc...). Another thing to consider is how the data is arranged per line. If the data is as you illustrate, you'll have to do much more parsing and tokenizing to extract data and assign to the appropriate scene element. If you put all the related values together in a string, half the work is already done. You just then need to identify where it needs to be applied. At the most crude level you can use a file format as you've shown, but with tweaks. Constructing file formats and tools to read/write them is a field of it's own that can go very deep in study. Unless you see yourself using this custom file format long term, the time invested building the framework probably won't be realized after the fact as benefit. While it may suck to do all the work by hand now, in the long term it may be less work overall. food for thought as it's very easy to fall into the trap of developing automation because you can and not because you need to. Matt Date: Wed, 11 Nov 2015 22:17:21 +0100 From: <pete...@skynet.be> Subject: Re: ICE - text file & string manipulation To: <softimage@listproc.autodesk.com> Thanks Gustavo and Cesar, seems you agree that scripting is the way to go ? at least as far as getting data from file into ICE. that?s way above my head for the time I?ll have to sort this out ? so I might end up copy pasting data from the text file. I?ve been playing a bit with string manipulation in ICE ? for now just typing a string myself in ICE and then trying to filter the data I need out of that. It?s not easy ( trying to wrap my head around strings in ICE) but I?m getting there ? and so far it?s quite fast. I?m first dumping everything in one long string (hm, I?ll have to scale my data 1000 fold ? so I?m worried this will become a problem) ? and using a special character to split into an array, and each frame I?ll access one element of the array ? from which I extract the data. encapsulating the data I want with a dedicated character be
Re: ICE - text file & string manipulation
ICE string manipulation is crude and only intended to do simple concatenation and tokenizing for simple cases such as appending an object name and model name to form a full path. It doesn't have the functionality of a scripting language. ICE string manipulation cannot convert text to floating point values with integrity either, or if it can, it involves a lot more workarounds than it's worth to employ. Based on your short description, you only need to import data as FCurves onto the parameters of an ICE compound you apply to your particle systems. The FCurves can be easily generated and applied via script, or re-applied in the event you change the file. The script can also employ a UI to load/save the data, present options to the user for processing the data, and so on. ICE cannot do any of that. You should consider is how data is formatted in the file to make life easier. For example, your file describes values for all scene elements in the scene per frame. An FCurve is a series of values for an individual parameter. By grouping the values per parameter instead of per frame of the scene, the data will be easier to parse (eg; put all 'values' on one line, put all particle 1 array on a separate line, put all particle 2 array on a separate line, etc...). Another thing to consider is how the data is arranged per line. If the data is as you illustrate, you'll have to do much more parsing and tokenizing to extract data and assign to the appropriate scene element. If you put all the related values together in a string, half the work is already done. You just then need to identify where it needs to be applied. At the most crude level you can use a file format as you've shown, but with tweaks. Constructing file formats and tools to read/write them is a field of it's own that can go very deep in study. Unless you see yourself using this custom file format long term, the time invested building the framework probably won't be realized after the fact as benefit. While it may suck to do all the work by hand now, in the long term it may be less work overall. food for thought as it's very easy to fall into the trap of developing automation because you can and not because you need to. Matt Date: Wed, 11 Nov 2015 22:17:21 +0100 From: <pete...@skynet.be> Subject: Re: ICE - text file & string manipulation To: <softimage@listproc.autodesk.com> Thanks Gustavo and Cesar, seems you agree that scripting is the way to go ? at least as far as getting data from file into ICE. that?s way above my head for the time I?ll have to sort this out ? so I might end up copy pasting data from the text file. I?ve been playing a bit with string manipulation in ICE ? for now just typing a string myself in ICE and then trying to filter the data I need out of that. It?s not easy ( trying to wrap my head around strings in ICE) but I?m getting there ? and so far it?s quite fast. I?m first dumping everything in one long string (hm, I?ll have to scale my data 1000 fold ? so I?m worried this will become a problem) ? and using a special character to split into an array, and each frame I?ll access one element of the array ? from which I extract the data. encapsulating the data I want with a dedicated character before and after seems to be the easiest way to get at it in ICE. (I can specify to a degree how the data will be delivered to me ? lucky me) Converting from string to scalar is a bit tricky I?m finding, but I think I?ll just sort it out for integers ? which should be enough for my needs. I was hoping to drive some custom parameters from ICE, and viewing them in a viewport slate ? but it seems the refresh is hindered by gremlins. Anyways ? I have a prototype for the most tedious part that I wanted to automate ? so hopefully it scales well once I give it actual data.
Re: ICE - text file & string manipulation
Hi, I would parse the file and generate an icecache by scripting, so you can move the data easily through different ICETrees/scenes. Maybe some of this might is still be relevant (shameless plug) http://www.cesarsaez.me/2013/11/scan-files.html Cheers! On Wed, Nov 11, 2015 at 5:48 AM, Gustavo Eggert Boehswrote: > I guess you would have to do what you need via scripting, and then store > custom atributes you can read in ICE. I dont get exactly what your 'value' > stands for. > If you can tolerate just assinging particles to polygon islands, there are > existing tools for that: > http://www.gustavoeb.com.br/mtools/documentation/#special-cases-16. But > you would have to tolerate some unwanted behaviours in letters there are > composed by more then one island... like the letter "i". > > Best regards, > > Gustavo E Boehs > Dpto. de Expressão Gráfica | Universidade Federal de Santa Catarina | > http://www.gustavoeb.com.br/ > > 2015-11-10 10:51 GMT-02:00 : > >> Hi all, >> I would need to read in a text file, and extract it's information into >> ICE, >> >> for example: >> ABCD DDBB BCCA ABCD 'value': 4.0 >> CCDBA AABBD CCCAB 'value' : 456 >> ABC CDA ABB CBB 'value' : 0.345 >> >> I would want to assign letters to an array of particles that adapts to >> the what's in the text, >> line 1 would be the situation for frame 1, line 2 situation for frame 2 >> and so on. >> and recover 'value' as a scalar >> >> I haven’t started digging yet, it’s probably a case of rtfm, so no >> offense if you point that out to me :-). >> >> I have some clues about how to do this in scripting, but not at all in >> ICE. >> how to access a text file in ICE (ideally - if needed I could paste the >> contents of the text file into a custom property or a comment) , how to >> find and filter stuff, strip the part I need, converting the string into >> scalars - >> >> if anyone has any pointers on where to start and read up, or any gotcha's >> - it would be much appreciated. >> >> >> >> >
Re: ICE - text file & string manipulation
I guess you would have to do what you need via scripting, and then store custom atributes you can read in ICE. I dont get exactly what your 'value' stands for. If you can tolerate just assinging particles to polygon islands, there are existing tools for that: http://www.gustavoeb.com.br/mtools/documentation/#special-cases-16. But you would have to tolerate some unwanted behaviours in letters there are composed by more then one island... like the letter "i". Best regards, Gustavo E Boehs Dpto. de Expressão Gráfica | Universidade Federal de Santa Catarina | http://www.gustavoeb.com.br/ 2015-11-10 10:51 GMT-02:00: > Hi all, > I would need to read in a text file, and extract it's information into ICE, > > for example: > ABCD DDBB BCCA ABCD 'value': 4.0 > CCDBA AABBD CCCAB 'value' : 456 > ABC CDA ABB CBB 'value' : 0.345 > > I would want to assign letters to an array of particles that adapts to the > what's in the text, > line 1 would be the situation for frame 1, line 2 situation for frame 2 > and so on. > and recover 'value' as a scalar > > I haven’t started digging yet, it’s probably a case of rtfm, so no offense > if you point that out to me :-). > > I have some clues about how to do this in scripting, but not at all in ICE. > how to access a text file in ICE (ideally - if needed I could paste the > contents of the text file into a custom property or a comment) , how to > find and filter stuff, strip the part I need, converting the string into > scalars - > > if anyone has any pointers on where to start and read up, or any gotcha's > - it would be much appreciated. > > > >
ICE - text file & string manipulation
Hi all, I would need to read in a text file, and extract it's information into ICE, for example: ABCD DDBB BCCA ABCD 'value': 4.0 CCDBA AABBD CCCAB 'value' : 456 ABC CDA ABB CBB 'value' : 0.345 I would want to assign letters to an array of particles that adapts to the what's in the text, line 1 would be the situation for frame 1, line 2 situation for frame 2 and so on. and recover 'value' as a scalar I haven’t started digging yet, it’s probably a case of rtfm, so no offense if you point that out to me :-). I have some clues about how to do this in scripting, but not at all in ICE. how to access a text file in ICE (ideally - if needed I could paste the contents of the text file into a custom property or a comment) , how to find and filter stuff, strip the part I need, converting the string into scalars - if anyone has any pointers on where to start and read up, or any gotcha's - it would be much appreciated.