I have particles coming from Realflow, loaded into Frost via a PRT Loader. I wanted to scale Radius with age, but I ran into two problems, so maybe I am getting something wrong.
When I try using Scale by Age, I am getting an error message:
When I use an Age Channel in KCM, for example to color particles by age, this works perfectly fine. I can also see the Frost mesh colored according to the PRT Loader’s particles. The Age property I read in KCM is of type int32, even when I read it and pipe that into an Output operator that’S explicitly set to Age/ Int32 and I try then using this property for the Change Radius with Scale option in Frost, I get this error.
Radius Channel.
I created an Output Type “Radius” in a KCM (I tried controlling Radius via age in KCM), attached the KCM to the PRT loader, but in Frost when activating “Use Radius CHannel” it says there was no radius channel. I thought I could create a radius channel using a KCM on top of my PRT Loader. Why isn’t that working?
So are my ideas/ workflows yompletely wrong or am I missing something? Any hints are very mucha ppreciated.
RealFlow expresses the Age of a particle as a Floating Point number of Frames. After one frame at 30FPS, the Age is 0.033333.
Particle Flow and by extension Frost and Krakatoa expect the Age in Integer Ticks, where one second has 4800 ticks, and at 30 fps one frame has 160 ticks.
In other words, to convert from RealFlow Age to Max Age, you need to multiply the RealFlow Age by 4800 and convert the result to an int32[1] value.
Unfortunately, you cannot do this dynamically, because the Age channel is already a float and attempting to reset it to int will cause a Magma error. What you can do is output as something else, for example to the MXSInteger channel which is already int32[1]. Save the PRT Loader to a new PRT sequence and include the MXSInteger in the list of channels to save. Do NOT save the Age channel. Now reload the resulting PRT sequence in a new PRT Loader and drop a Magma on the stack that loads MXSInteger (int32) and outputs as Age (int32). At this point, Frost would see the right format and accept the Age channel.
Radius:
If you TYPED IN the name “Radius” in the channels list, you might have ended up with the wrong channel layout. This is a bug and I will deal with it today (EDIT: Found and fixed for upcoming Beta Build v2.1.2). In short, if you have a Vector channel selected in the Output node like Color or Position and you type in “Radius” manually, the new channel will also be Vector and not a Float as it should be. If the current channel IS a Float, “Radius” will be correct.
NOTE that if you select from the “Channel List Sorting” the option “Floats Only”, you will see that “Radius” is already pre-defined and is the right format (float16[1]). Just pick it from the list instead of typing the name.
I tested this by piping the RealFlow Age (float32[1]) channel taken to the Power of 0.1 into the Radius (float16[1]) channel and Frost correctly scaled from small particles to larger particles over time…