P Custom Certainly
P Custom Certainly
Below is an extended explanation, diving deeper into pCustom's features, use cases,
workflows, and examples.
The pCustom node works by letting you write scripts in Lua to control particle attributes.
Attributes you can control include:
Attribute Description
2. Access pCustom:
▪ Position
▪ Velocity
▪ Size
▪ Color
3. Write Scripts:
o Use Lua scripting to define how each attribute changes over time or
interacts with the environment.
• Basic Arithmetic: +, -, *, /, %
• Random Functions:
• if condition then
• -- do something
• else
• -- do something else
• end
4. Example Scenarios
Here are practical examples of what you can achieve with the pCustom node.
pz = 0
• Explanation:
• Explanation:
• Explanation:
o The color components reduce over time as the particle's age approaches its
life.
vx = rand(-1, 1)
vy = rand(-1, 1)
vz = rand(-1, 1)
• Explanation:
vy = vy - 0.05 * time
• Explanation:
o Decreases the Y-velocity over time to simulate the downward pull of gravity.
You can use the pCustom node alongside other particle nodes to create even more
complex effects:
• pKill: Remove particles that meet specific conditions (e.g., too old).
• pCollision: Make particles interact with surfaces.
6. Advanced Techniques
5. else
7. end
9. if id % 2 == 0 then
10. red = 1
11. green = 0
12. blue = 0
13. else
14. red = 0
15. green = 1
16. blue = 0
17. end
o Even IDs get red particles, odd IDs get green particles.
7. Tips for Using pCustom
5. Combine Math and Randomness: Mixing math functions and randomness creates
natural-looking effects.
Conclusion
The pCustom node is an incredibly versatile tool in Fusion's particle system. It allows for
complete creative control over particles using Lua scripting. By combining math, logic,
and randomness, you can create effects that range from simple animations to highly
advanced procedural particle systems.