tyFlow Forum
Convert Color Float to Script Vector - Printable Version

+- tyFlow Forum (https://forum.tyflow.com)
+-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html)
+--- Forum: General Discussion (https://forum.tyflow.com/forum-2.html)
+--- Thread: Convert Color Float to Script Vector (/thread-1644.html)



Convert Color Float to Script Vector - Martians - 04-18-2020

How do I convert my particles color float to script vector?

With Box3 data op it would be smthg like this:

https://photos.google.com/photo/AF1QipOHtdAaF0Y5Y6keaUNDuW6FCZ6Fsy61RgT9tyQm


RE: Convert Color Float to Script Vector - tyFlow - 04-18-2020

You can use a Custom Properties operator to assign the mapping channel data to the custom vector channel of your choice.


RE: Convert Color Float to Script Vector - TubeSmokeGuy - 04-21-2020

Just for me to understand it: Is mapping channel data = color? I thought mapping channel data = UVW's?

Huh


RE: Convert Color Float to Script Vector - Martians - 04-21-2020

I'm looking at the Custom Properties Operator, but am uncertain how it should be setup? Could you provide an example of how it should be setup Tyson? I don't see any option to load or set color channels anywhere..


RE: Convert Color Float to Script Vector - tyFlow - 04-21-2020

If you want to sample texture colors from an object, use a Mapping operator to get the nearest object UVW and assign it to the particle. Then just apply the same map to the particles.

If you want to assign mapping data from a particle to a custom vector channel, use a Custom Properties operator. Just select mapping from the vector dropdown and define the custom vector channel name.


RE: Convert Color Float to Script Vector - Martians - 04-23-2020

Thanks so much for all the color additions in the latest build!! I'm afraid to say that I still cannot color my Fume smoke with particle color.... Sad

In pre-tyflow days I would store the color in a MXSVector - Which works with Fume.. Is that possible with TyFlow?


RE: Convert Color Float to Script Vector - tyFlow - 04-23-2020

That functionality is something you'd have to contact the FumeFX devs about. I already export custom properties in the interface I provided them, it would be up to them to import those values (like color assigned to a vector channel).


RE: Convert Color Float to Script Vector - TubeSmokeGuy - 04-24-2020

Wouldn't that be something we could achieve with "User custom export channels" as I requested here: http://forum.tyflow.com/thread-1654.html

Then you just could add custom channel for export, name it MXSVector and direct the values form the vertex color channel into it.


RE: Convert Color Float to Script Vector - tyFlow - 04-24-2020

MXSVector is not a channel name. It is the built-in way to get a user vector, specifically from PFlow. The method is not exposed in the IParticleObjectExt interface, so it's not something that other plugins can implement.


RE: Convert Color Float to Script Vector - TubeSmokeGuy - 04-27-2020

Don't know if this is helpful, but with Krakatoa and its Magma modifier you can redirect the color channel into MXSVector. See screenshot attached. Huh

In the particle data viewer utility the the MXSVector seems to be stored correctly as it has stored the colorvalues after the magma modifier.
And with Krakatoa partitioning saving particles to disk you can add the MXSVector natively from the channels list (left side of the screenshot).

   


RE: Convert Color Float to Script Vector - tyFlow - 04-27-2020

Oh I see now, looking at the SDK, MXSVector is exposed in a secondary interface, not connected to the standard IParticleObjectExt interface. I thought it was some hard-coded thing but it was just hidden Smile


RE: Convert Color Float to Script Vector - Martians - 04-28-2020

Thanks for the magmaflow tip TubeSmokeGuy - Tried it but still no colored smoke..

Then this popped up in my inbox - some good news from FumeFX devs:

Thank you for informing us about it.

We have checked and it seems this is a bug.
FumeFX does not pick up the color so we will need to fix that.

We are planning to solve this in our upcoming FumeFX 5.0.7 update.