AWS Thinkbox Discussion Forums

custom attributes export

Hello,
I have few questions about Krakatoa MY

-Is it possible to export custom per particle attributes ( like normalized age, and so ) when writing out prt files ? My goal is to achieve color remapping as you did with velocity, but instead of using velocity I would like to use my own custom per particles attributes (scalar or vectors).

  • How krakatoa modifiers interpret custom per particle attributes ? For example, if I create a custom attribute named texturePP (that I set in particle expression as texturePP = noise(position) )and then set a copy modifier who copies texturePP to Emission, does krakatoa handle that ?

Best regards.

Mathieu

I’ll explain how it currently works, however I am open to changing this, as it may be restrictive for you.

Currently for Maya’s particle/nParticle systems, we support a hard-coded mapping of Maya per-particle attributes to Krakatoa channels.

The conversion goes as follows (it looks for the channels names either with or without the “PP” string and handles them accordingly):
Maya “positionPP” -> Krakatoa “Position”
Maya “velocityPP” -> Krakatoa “Velocity”
Maya “particleIdPP” -> Krakatoa “ID”
Maya “opacityPP” -> Krakatoa “Density”
Maya “rgbPP” -> Krakatoa “Color”
Maya “normalDirPP” -> Krakatoa “Normal”
Maya “incandescencePP” -> Krakatoa “Emission”

This conversion is done at the first step, so all per-particle attributes that do not match above get discarded. This means that you can’t currently get a “texturePP” attribute and copy it to “Emission”.

However, we can solve this problem in a few ways:

  1. We could add a Maya “texturePP” -> Krakatoa “TextureCoord” (which can then be copied into “Emission” using a modifier). This would be the easiest solution for your case.
  2. We could provide a general way of mapping any available Maya per-particle attribute to a Krakatoa channel. This would be the most general solution for all cases, however, it may be overkill.
  3. You could rename your per-particle attribute from “texturePP” to “incandescencePP”. This would be used by Krakatoa as “Emission”. This is the most hacky of the solutions.

Which do you think would work best for you?

Hi,
Thank you for your fast reply.
My final goal is to render out different RGB passes of my particles build from my customs attributes to have more flexibility in composting, as you did within velocity remaping tutorial. Thus the best way do handle that will be to have krakato extra channels to plug anyone of maya PP attribute ( maybe in a futur realease :astonished:) ).
As you mentionned I gonna use an avaible krakatoa channel as incandescencePP and/or normalDirPP to store that information. The drawback is that if my attributePP is a scalar I need to convert it to vector so I lose two avaible slots to store two more scalar attribute PP. But if the copy channel modifier had extra functions ( as Copy As Vector Lenght ) to extract each different component it would be very usefull !

Mathieu

Thank you for the feedback. I think we will need a way of retrieving custom per-particle attributes for Krakatoa, so I will look at that option.

The copy modifier can actually copy a single-float channel into a vector channel. However, to use your workaround, the only single-float channel available is “opacityPP”.

So a really hacky workaround could be:
-Instead of using the vector channels incandescencePP and/or normalDirPP for you custom attributes, use the single-float channel “opacityPP”.
-Add a copy modifier: “Density” to “Color”.
-Add a set float modifier: “Density” to 1.0 (need to reset Density).

Definitely not a pretty workaround. I’ll work at a better way to do it.

Privacy | Site terms | Cookie preferences