1. Home
  2. Docs
  3. Magio
  4. Tutorials
  5. Convert your existing VFX Graph to work with Magio

Convert your existing VFX Graph to work with Magio

Example: You have an awesome spreading rainbow effect and you would like to integrate it with Magio to interact with other effects and spread it on the object smoothly.

Steps:

  1. Navigate to Arctibyte/Magio/Core/VFX/Graphs
  2. Open Mesh/Skinned Mesh/Mutable Renderer template Graph (“MutableRenderer” template: MutableRenderer can handle both mesh and skinned mesh, but you have to be a little more flexible with it.)
  3. Copy all the properties from there (Paint them + Ctrl+C)
  1. Paste the properties to your graph (Open your graph + click the window + Ctrl+V)
  2. Add Magio Mesh/Skinned Mesh/Mutable positioning block to your initialize context
    1. This can be also added to other contexts
    2. See templates for examples on how to use these blocks.
    3. Or you can use the positioning variables your own way. The Plantify effect graph has an example of how to use them with a VFX shader graph.
  3. Connect transform, spread, nullify and mesh to the positioning block
  1. (Optional) Connect VFX multiplier and Lifeline multiplier to spawn context
  1. (Optional) Connect External force to absolute force block in Update context
  1. Magio property documentation can be seen in Arctibyte/Magio/Core/VFX/Graphs/VFX_Property_Documentation.txt
  2. Test out your effect:
    1. Select your target game object which has been converted to magio object.
    2. Change Effect pack->Select effect prefab
    3. Drag your new effect to the effect prefab slot
    4. Go to VFX tab
    5. Press Preview VFX
  1. Your object should start emitting your VFX right from it’s surface!
  2. Depending on the use case you might need to do more fine tuning such as multipliers etc. In this case please read Property documentation to understand the variables.

Leave a Reply

Your email address will not be published. Required fields are marked *