Do you feel out of your depth too?
My new design is now on Threadless, still my favorite place to sell art, even though I’ve been designing less lately!
Do you feel out of your depth too?
My new design is now on Threadless, still my favorite place to sell art, even though I’ve been designing less lately!
Stack: Unity 2021.3, Universal Render Pipeline (URP), Visual Effect Graph
Note: Currently, Visual Effect Graph is production-ready only for HDRP. It’s still in development for URP so it’s possible you may encounter bugs. However, I have used it successfully with URP and have only noticed minor – not game breaking – issues.
This is the effect that I created for the game that I am working on. Previously, I had only worked with the old Particle System. This is the first effect that I created in the Visual Effect Graph and I encountered a few issues that took me a while to solve. I hope this tutorial will help you so that you won’t waste as much time as I did.
In your project window, create a new Visual Effect Graph asset:
If you don’t see it, you likely don’t have a Visual Effect Graph package installed.
Go to your Player game object and add a new Visual Effect component. To Asset Template assign your Visual Effect Graph that you created in Step 1.
Open your Visual Effect Graph. Unity created a basic effect for us, but it has a bunch of blocks that we don’t need.
Footsteps will spawn only when the player moves. Therefore, in the Spawn node remove the Constant Spawn Rate block and add a Spawn Over Distance block:
Footprints won’t have any velocity, so from the Particle System node remove the Velocity block.
While we are here, change the space from Local to World in the Initialize Particle node:
Remove the whole Output Particle Quad node:
Instead of quads we will use decals. Create a new Output Particle Forward Decal node and attach it to the Update Particle node. Also, change the space from Local to World on both Update Particle node and Output node.
The footprints should exist in the world space, not the local space. But inside the graph, we only have access to our local position. We need to translate it into the world position. Basically, we want to know what’s the world space equivalent of our local (0,0,0) position.
To do this, create a new block called Change Space, set Target Space to “World”, set the input space to “L” which means “Local”, and leave the values as they are.
Link the output to the Position in the Spawn node:
First, create a Set Angle block. In this case, we only need to change two angles: X and Y, so select Channels accordingly:
By default, our footprints will be projected along the global Z (forward) axis, instead of lying flat on the ground. So we need to rotate them 90 degrees around the X axis to make them horizontal. Go ahead and create a new Vector3 block and set X to 90. Connect the Vector3 block to the Set Angle.XY block:
The Y axis is more complicated. The rotation around the Y axis depends on the player’s rotation. If the player is rotated to the right, then footprints need to be rotated to the right. If the player is facing to the left, then footprints need to match as well.
So, to rotate footprints we need to get the player’s rotation in the graph. We will do it by creating a property to hold the Player’s Transform. Open the graph’s Blackboard if it’s closed and press the “+” button to add a new Transform property. Rename it to “PlayerTransform”:
Now we need to make sure this property’s value is bound to the Player’s transform. Go back to your Player game object where you added the Visual Effect component. Add a new component called VFX Property Binder. Fill in the property name (PlayerTransform) and assign the Transform component. It should look like this:
Our property PlayerTransform holds the Player’s Transform component. We now have access to the Player’s Transform in the Virtual Effect Graph.
Go back to the graph and drag the property to the graph so that it creates a block. Expand “angles” because that’s what we need:
We only need the “y” angle because this is the (vertical) axis around which we need to rotate the footprints. Get the “y” value and link it to our “y” value in the Vector3 block we created previously. The entire section should look like this:
In Step 4, we calculated the world position of our footprints. Now, we need to use the calculated position to let the particles know they must use that position. Usually you could use a Set Position block to set the particle’s position. But if we did that, then all footprints would just be placed in a straight line like so:
That doesn’t look good. What we want is to have every second footprint slightly to the left, and every second footprint slightly to the right.
We will use a block that lets us specify the list of points where the particles are to be positioned. There will be a point for the left foot slightly to the left from the center, and a point for the right foot slightly to the right from the center.
In the Initialize Particle node, add a block called Set Position (Sequential: Line). Our list has only two points: one for the left foot and one for the right foot. Change the X values to move the points to the left and to the right. Change the space from world space to local space for each point because we are calculating the offset based on our centre in local space.
Set the Mode to Wrap so that when the particle system uses up all the points from the list, it will start over from the beginning. The first footprint will get the first point from the list, the second footprint will get the second position, the third footprint will again get the first point, and so on.
To the Particle Update node, add a block to fade alpha over life:
Adjust the Alpha curve to achieve the desired effect.
And that’s it. You now should have working footprints.
You might also need to add a Set Size block to the Initialize Particle node unless you have the footprint texture of exactly the right size.
If you have any issues following this guide, please let me know so that I can improve it. My email is [email protected] and my Twitter is @JustynaDorsz.
A while ago, I hired an attorney in Poland to deal with people who stole my designs. Some of them paid me compensation before I had to sue, so that was fine. But some refused. Unfortunately, then the pandemic happened and also my attorney got seriously sick and couldn’t work on my cases anymore, so that slowed things down.
I bet some thieves thought I forgot about them. No such luck.
Anyway, I hired a new attorney. He prepared and filed the lawsuits. And there will be more cases to follow.
(This is just a quick update to let you guys know that this is all still in progress in case you were wondering.)
I moved to another of the Canary Islands โ Gran Canaria.
I live in a tiny town that doesn’t even have a gym. Next time I will need to move to a bigger city. I’ve been lazy for too long and it’s definitely time to go back to exercising regularly.
Gran Canaria is as beautiful as Tenerife, only maybe less popular, so there aren’t as many tourists here.
The most baffling thing about Canary Islands is that you can’t get grapefruit juice here โ and it’s my favorite! I visited many supermarkets and fresh squeezed juice bars and not once was I able to buy it.
I’ve left Poland just as I had planned.
Those last few weeks before me leaving were crazy. I had to move all my things from the apartment that I was renting and somehow I had accumulated a lot of stuff. I tried to meet and say goodbye to most of my friends. I had trainings and dentist appointments too and some legal stuff to take care of. Overall, I was rarely home and didn’t get any work done. I didn’t have any time to plan my travels, so I only booked a plane ticket a day before leaving. And I booked the place to stay in Tenerife a few hours before going to the airport.
I packed only a small suitcase of clothes and a backpack with a laptop, sketchbooks, and my graphic tablets. I’ve been here, in Tenerife, for over two weeks now and I don’t miss any of my things I had in my apartment in Poland. Makes me wonder why did I even have that much stuff.
Tenerife is beautiful and even in February it’s very warm here. Every day, I go for a walk along the coast. I will stay here for a few weeks and then move on.
My drawing of a very antisocial cat in serious need of chocolate, titled “Go away. Unless you have chocolate”, got featured on the Threadless blog!
See other featured designs and read the article “Which Valentine’s Day Persona Best Fits You?”
I don’t promote here much but just in case you want to buy any of my designs or designs by other artists, there’s a sale on Threadless for 24 hours. Regular t-shirts are $10.95!
I’ve lived here, in Poland, my whole life. But now, that I think about it, what would be a good reason to live in one place for such a long time? Poland is not that great, really. Or rather, there are many things wrong with Poland and it often starts with the Catholic Church, who has a powerful influence on laws that are passed. But this is not really the post about that. Even if Poland was an amazing and fair country โ would that be a reason enough to live here all my life when there are so many possibilities?
For the past two weeks, I’ve been thinking about leaving Poland. I, of course, have not really thought it through yet. But I think I will spend Christmas here, with my family, and then I might leave in January. I don’t know where would I travel to yet. And there are so many things I need to do here before I can leave. And I obviously don’t have enough money for all that, but I will figure it out.
Have you heard about Noodle? It’s a hilarious pug that sleeps a lot. The owner now has an official Threadless store โ most likely because he wants to earn money to buy tons of snacks for his cute dog. Understandable.
I was lucky enough to be given an opportunity to create a design for his store. Here is the store. And this is my design:
Hope you like it ๐