text file to position, scale, rotation
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/02/2003 at 19:20, xxxxxxxx wrote:
I have a way of generating position scale and rotation coordinates for an object at every frame in a dinky little custom app I made, but the only kind of file I can generate is plain old text. Is there a way to get this matrix of vectors assigned to an object in C4D? Or would anyone be willing to whip up a quick plug to handle the text?
Thanks
Gary -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/02/2003 at 15:21, xxxxxxxx wrote:
Still need it?
> Quote: Originally posted by garyingle on 20 February 2003
>
> * * *
>
> I have a way of generating position scale and rotation coordinates for an object at every frame in a dinky little custom app I made, but the only kind of file I can generate is plain old text. Is there a way to get this matrix of vectors assigned to an object in C4D? Or would anyone be willing to whip up a quick plug to handle the text?
>
> Thanks
>
> Gary
>
>
>
>
> * * * -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/02/2003 at 07:04, xxxxxxxx wrote:
Yes, I would still like to be able to do this. It will allow me to animate objects to music automatically. this is just one basic example.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/02/2003 at 07:55, xxxxxxxx wrote:
I just started really working with audio too. I have had my first success with a double state filter. If you could post an example of your format I will see if my parser will work on it. Is it a text file?
badtooth
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/02/2003 at 10:27, xxxxxxxx wrote:
Cool. I can generate a plain text file (.txt). I haven't really nailed down the specifics of the format, because I had no way to bring it into Cinema. I guess in its simplest form, each object's data would be output to a separate file, but I guess it would be cooler to come up with a format that can take the whole scene and apply data to it.
I'm trying to figure out what would be the best delimeter, since I would most likely use commas in the vector definitions. (x,y,z) Maybe just a TAB or a SPACE?
anyway...I'm thinking line 1 is object name
line 2 starts data. (position vector then rotation vector) each line of data equals 1 frame in cinema. I should use scale vector also, but my initial use of this doesn't really need it.Box01
p(200,0,0)[TAB]r(0,1,0)
p(190,0,0)[TAB]r(0,2,0)
p(180,0,0)[TAB]r(0,3,0)
etc....This would be just fine for the single object per export method. The multiple object format would have to be a little more detailed.
perhaps with some sort of end of object characters:
Box01
p(200,0,0)[TAB]r(0,1,0)
p(190,0,0)[TAB]r(0,2,0)
p(180,0,0)[TAB]r(0,3,0)
***
Box02
p(0,100,0)[TAB]r(20,0,0)
p(0,110,0)[TAB]r(25,0,0)
p(0,120,0)[TAB]r(30,0,0)
***
Box03
etc.Is any of this making any sense?
Thanks for your help
Gary -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/02/2003 at 15:11, xxxxxxxx wrote:
When you evaluate your sound into amplitudes with your filter are you using multiple bands? This means, do you want to output more than one amplitude? The problem that exists is that the importing of data has to go somewhere specific. For instance you spoke of PSR data. Well, that is fine, but what if you want to apply the data to brightness of a light? Why not just select an object and then import the data into an animation track that is a value type ( say Real ). Then you could use Xpresso to evaluate that data channel into anything you want ) PSR, object properties, etc... ). I say this because I had to do something very similiar a few months ago. Let me know what you think. Are you Mac/PC, both? Do you still just want a straight PSR import? Maybe it imports the data straight to the first selected object's PSR tracks ( creating them if they are not there ). Anyway, either way.
bt
> Quote: Originally posted by garyingle on 26 February 2003
>
> * * *
>
> Cool. I can generate a plain text file (.txt). I haven't really nailed down the specifics of the format, because I had no way to bring it into Cinema. I guess in its simplest form, each object's data would be output to a separate file, but I guess it would be cooler to come up with a format that can take the whole scene and apply data to it.
>
> I'm trying to figure out what would be the best delimeter, since I would most likely use commas in the vector definitions. (x,y,z) Maybe just a TAB or a SPACE?
>
> anyway...I'm thinking line 1 is object name
> line 2 starts data. (position vector then rotation vector) each line of data equals 1 frame in cinema. I should use scale vector also, but my initial use of this doesn't really need it.
>
> Box01
> p(200,0,0)[TAB]r(0,1,0)
> p(190,0,0)[TAB]r(0,2,0)
> p(180,0,0)[TAB]r(0,3,0)
> etc....
>
> This would be just fine for the single object per export method. The multiple object format would have to be a little more detailed.
>
> perhaps with some sort of end of object characters:
>
> Box01
> p(200,0,0)[TAB]r(0,1,0)
> p(190,0,0)[TAB]r(0,2,0)
> p(180,0,0)[TAB]r(0,3,0)
> ***
> Box02
> p(0,100,0)[TAB]r(20,0,0)
> p(0,110,0)[TAB]r(25,0,0)
> p(0,120,0)[TAB]r(30,0,0)
> ***
> Box03
> etc.
>
> Is any of this making any sense?
>
> Thanks for your help
> Gary
>
>
> * * * -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/02/2003 at 13:05, xxxxxxxx wrote:
I like the sound of it being very flexible like that, but my concern was how to deal with all the different types of lists? For instance: a light would only need one value: brightness. Where as position data is a vector with 3 subvalues in it. (200,100,50) So if I wanted to export position only would I have to export a list of the X values, then a list of the Y values, and finally a list of the Z values?
My uses for this go in so many different ways than just audio. I have messed around with an external dynamics simulation as well, (because I don't like the Dynamics module in its current release) And realtime driving and flying controls that will record as you "drive" or "fly" (Think reelmotion)
Just being able to bring in text and parse as needed would be so cool. I have built many parsing programs, but I just don't know enough about C++ and Cinema's SDK to pull it off without a TON of research.
Thanks again for your input.
Gary
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/02/2003 at 15:40, xxxxxxxx wrote:
It would be a simple method to deal with different types. You would define each channel to be read in as type value list return.
ExampleReal 6.521
Vector 3.145 -100.938 132.051If you wanted arbitrary keyframes you could add time for channels by:
Time 00.00.01.00 00.00.03.00 // Keyframes at 1 and 3 seconds
Real 6.521 3.412
Vector 3.145 -100.938 132.051 -4.120, 4.508, 13412.000Also could make it so time would reset the keyframed times for each channel just by putting a Time channel definition before each channel. Maybe a file could be imported into a channel layout that could then be applie to any timeline sequence channels with drag and drop. Hmm...
bt
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/02/2003 at 06:52, xxxxxxxx wrote:
This is beginning to sound pretty good. So where do we go from here?
gary
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/02/2003 at 07:48, xxxxxxxx wrote:
Post a link to a real data file. Using whatever layout you want ( I prefer the Time Channel Channel, Time Channel mehtod ( this is just to show that the time channel preceding the data channels defines where the keyframes go. ) Obviously more data could be added for spline interpolation of the keyframes. If the time data keys and data channel keys do not match in number both will stop being added when either one runs out. Once you get me a file I will send you back a C4D that shows how it all works. Then we could talk about a little compensation if it is worth it to you.
bt -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/03/2003 at 23:55, xxxxxxxx wrote:
My delayed response does not indicate that I am not interested any longer, just that you've given me a *LOT* to consider. I initially was just inquiring about bringing in PSR data, but now I need to rethink it a bit. I'm not sure that I'll be able to do arbitrary keyframes though. Think of it being more like a "baked" solution that is written to a text file at 1:1. (one set of data for every frame) I'm trying to come up with the best method and format so I don't waste your time. I will have a file up soon.
One of the potential issues I have been dealing with is the difference in scale (units) between the Cinema world and the 3D world in my app. I wonder if this interpreter could have a field to input a scale factor? or some sort of multiplier?
Gary -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/03/2003 at 09:20, xxxxxxxx wrote:
My skeleton plugin already has a dialog box so adding the scaling parameter is no problem. There is a consideration that if the data is a scalable parameter or not. We could hardcode PSR but this is so restricted. Might we consider a set of attribute flags that come after the name of the data channel?
bt