top of page

Using matrix to edit VFX


Tutorial by: Guisai, minor info updated by BlooJae

If you encounter any issues with this tip or you don’t understand part of it, you can ask for help on the Runeforge Discord Server.

or you can contact me directly: guisai , on discord

 

Required Tools

  • Ritobin by moonshadow565

  • Editor for Python files (I recommend Visual Studio Code + Python extension)

  • Potentially Maya + Riot plugin

 

How to add it to your .bin

The first step is adding one default matrix that doesn’t change anything, it is just a blank matrix.

You will add that at the end of your VfxSystemDefinitionData as the video shows here

  Transform: mtx44 = {
        1, 0, 0, 0
        0, 1, 0, 0
        0, 0, 1, 0
        0, 0, 0, 1
    }


 

How to use it

Transformation matrices are usually used in rendering applications due to their mathematical properties. In games, their dimensions are usually 4×4 (16 floating point numbers) and they’re in row-major order (unlike the typical matrices used in classical math which tend to be column-major). They are called “transformation” matrices because they’re a composition of translation, rotation and scale hence they can be used to transform points in a rendering scene.

So you can use these transformation matrices while doing custom particles for any league character.

You can read more about here


Editing the size


Decrease

You just need to use a value that is smaller than 1, example of making a particle 2x smaller:


Transform: mtx44 = {
        0.5, 0, 0, 0
        0, 0.5, 0, 0
        0, 0, 0.5, 0
        0, 0, 0, 1
    }
Increase

Same thing as before, but now you use a value that is bigger than 1, here is a example of making one particle 4x or 2x bigger [I’m lazy to calculate how much lol]:


Transform: mtx44 = {
        2, 0, 0, 0
        0, 2, 0, 0
        0, 0, 2, 0
        0, 0, 0, 1
    }

Result


 

Moving/editing xyz values


Editing the height [Y value] moving the vfx/decal up higher or lower

Transform: mtx44 = {
        1, 0, 0, 0
        0, 1, 0, 0
        0, 0, 1, 0
        0, 250, 0, 1
    }

Editing the position [Z value] moving the vfx/decal more left or right


Transform: mtx44 = {
        1, 0, 0, 0
        0, 1, 0, 0
        0, 0, 1, 0
        0, 0, 250, 1
    }

Results (May Vary, will need to do tests to get it perfect)


 

Rotating

For rotating matrix or any complex matrix you can use Maya to do it. Using this code made by Crauzer to get a transformation as a matrix format.


global proc getTransform()
{
    string $objects[] = `ls -sl -l`;
    
    for($obj in $objects)
    {
        float $matrix[] = `xform -q -m`;
        print("Transform for '" + $obj + "':\n");
        print("Transform: mtx44 = {\n");
    
        for ($i=0; $i<16; $i++)
        {   
            $value = $matrix[$i];
            //$padded = python("'" + $value + "'" + ".ljust(12)");
            print($value);
            
            if ($i % 4 == 3)
            {
                print("\n");
            }
            else
            {
                print(", ");
            }
        }
        
        print("}\n");
    }
};

And then you type getTransform with the mesh selected.

Video tutorial



 

219 views

HOW TO INSTALL CUSTOM SKINS

USING CSLoL-MANAGER

bottom of page