I have just finished implementing the reader for the RPC file format into PartIO
using the next limit github source https://github.com/nextlimit/realflow-file-formats
I'll be releasing it soon, however, in keeping with the partIO toolkit way,
I would also like to be able to write out a RPC file from within partio, but
there are no "writer" functions in the github code.
Do you guys have any plans for adding that to the github source at some point?
or should I just plan on rolling my own on the writing side of things? Do you see any gotchas ?
does the data have to be filtered to match so that for example realflow supported channels like position ,velocity etc.. need to be the same types that are written out by realflow? or is there type checking/conversion going on internally just in case?
Let me know,
thanks!
-johnc
RPC file format WRITER
Re: RPC file format WRITER
Hello,
Glad to hear you managed to put the RPC file format into PartIO. Thank you very much for that.
Unfortunately there is not source code for writing out the RPC file format, we can't just use the source code we use in RealFlow because it is very tight coupled with our internal libraries.
I guess that having the file format document and the zlib library in place it wouldn't be very difficult for you to write the code for the writer. The only difficulty might be in finding and writing out properly the fields "channel data file pointer" and "channel data size", those fields are needed so RealFlow can access directly to one specific channel and because a channel can be compressed having this information in the file is a must.
The only issues to consider as far as I remember are that the name and type of the channels that must be always be present, as you pointed out.
(1) Channel "id" with type [uint64], channel type is 4.
(2) Channel "position" with type [float]*3, channel type is 1.
(3) Channel "velocity" with type [float]*3, channel type is 1.
RealFlow should complain when the file format is not the one expected, in any case if you need anything else please let me know.
Glad to hear you managed to put the RPC file format into PartIO. Thank you very much for that.
Unfortunately there is not source code for writing out the RPC file format, we can't just use the source code we use in RealFlow because it is very tight coupled with our internal libraries.
I guess that having the file format document and the zlib library in place it wouldn't be very difficult for you to write the code for the writer. The only difficulty might be in finding and writing out properly the fields "channel data file pointer" and "channel data size", those fields are needed so RealFlow can access directly to one specific channel and because a channel can be compressed having this information in the file is a must.
The only issues to consider as far as I remember are that the name and type of the channels that must be always be present, as you pointed out.
(1) Channel "id" with type [uint64], channel type is 4.
(2) Channel "position" with type [float]*3, channel type is 1.
(3) Channel "velocity" with type [float]*3, channel type is 1.
RealFlow should complain when the file format is not the one expected, in any case if you need anything else please let me know.
You do not have the required permissions to view the files attached to this post.
Angel Tena
Head of RealFlow Technology
Next Limit Technologies
Head of RealFlow Technology
Next Limit Technologies
Re: RPC file format WRITER
Thanks for clarification Angel,
I'll post here with the update to partio when I release it soon. I also updated the .bin format because you guys also updated that one now to use uint64 for the particle id so both now work
anyway , If I can get a witer working which I think I will try very soon, after the initial working version seems stable, I'll try to refactor it into a stand alone set of classes that you guys can have a look at and modify at your discression, then hopefully you can just include it into your github repo distribution if you'd like.
Probably sometime after the new year, I'm also going to have a stab at writing an initial partio4Realflow plugin for reading / writing out particles from RF as well. I'll probably have some questions when I start writing that one
Thanks and I'll keep you updated.
-johnc
I'll post here with the update to partio when I release it soon. I also updated the .bin format because you guys also updated that one now to use uint64 for the particle id so both now work

anyway , If I can get a witer working which I think I will try very soon, after the initial working version seems stable, I'll try to refactor it into a stand alone set of classes that you guys can have a look at and modify at your discression, then hopefully you can just include it into your github repo distribution if you'd like.
Probably sometime after the new year, I'm also going to have a stab at writing an initial partio4Realflow plugin for reading / writing out particles from RF as well. I'll probably have some questions when I start writing that one

Thanks and I'll keep you updated.
-johnc