Site search

RSS wiki

Comments

Recent Articles

particle user data

以前も紹介したかもしれませんが、

Particle instancerをレンダリングするとき,

Shaderがparticle Attributeを読むことができます。

で、particleIdとlifeSpanは自動らしいのですが、それ以外は設定が必要。

1.particle Shapeを選択

2.Add Model Attribute

3.MayamanAttributeノード>Particle Attributes>

Force Export Of Some Per Particle Attributesをon

Attributes To Exportに、例えばrgbPPと入れれば

rgbPPをribに書いてくれます。そうすればShaderから拾える、と。

color値以外の場合はsomething_Nみたいに接尾語で指定の必要があるみたい。

surface
LenovoSpecial(
float particleColor = 0;
/* Etc Etc*/
){
color newParticleColor = particleColor
attribute("user:rgbPP", newParticleColor);
/* Etc Etc*/
}

Write a comment