Hello everyone,
Let’s open a new Effect & Particles thread to discuss about dust effect when the characters are running, jumping or landing like described in Codecks card: Codecks
Here is a proposition for the running effect:
What do you think about this art direction?
4 Likes
A new version slightly different:
- dust impacts “aligned” with the steps
- scale the dust cloud to be bent down like this 0 instead of o
- color change to be more ground dust
4 Likes
Hey! Nice work! Are you using sprites or some kind of mesh for these particles?
I personally prefer more rounded puff clouds since the characters are also more rounded, but you proposition still works very well. The darker color certainly made it more grounded.
However, I think there was already a thread about particle effects in Particle Effects
I don’t know what should be done about it
I started working on the landing particles yesterday inspired by the ones in Mario Odyssey (not the ideal gif to see the landing particles but the best I found)
It seems they use a mesh not spites for the dust since they can cast very detailed shadows and I’m pretty sure you can turn the camera around the particles too.
I came up with this result, using a puff model that I created and some simple animations.
What do you think, people?
It seems that in Mario the clouds keep changing their form but I don’t know how to achieve this. I have little experience with particles. Any idea?
3 Likes
I also implemented the jumping particles using the same concept
Here’s the result. What do you think?
They are 4 particles system with different start delays.
Is there a better way to implement that?
Hey @erizzoalbuquerque ! Sorry about that, I missed the “Particle effects” thread when browsing the existing threads about this topic, I was looking for something with a title matching the card title…
I guess @cirocontinisio will soon merge these threads together and define the result as the official thread for the codecks card related to puff of dust/particle effects.
Your proposal might be more suitable for the game mood, a friendly game about cooking. Mine is a bit too “Japanese anime style” so, maybe too serious action style.
Actually, I am programmatically instantiating a prefab cloud like mesh with a custom shader doing vertex displacement to make it a bit random and alpha dissolving to make it disappearing during the effect life time.
Yours is already great! Maybe adding some rotation over time might help and to animate the form with sprite sheet you can use “Texture Sheet Animation”
For the jump effect, I think you can use one particle effect and use Simulation mode to World to make them independent from the particle caster (pig’s feet)
Hey @treivize ! Thanks for the feedback!
Interesting. So you used a vertex shader… I imagined there were fancier things than the default particle system. The particles “aligned” with the footsteps are a nice touch too. I’m using this project as a way to learning more about vfx and shaders (I know very little)
But can I use “texture sheet animation” to fake the puff cloud deforming? Maybe I could use a vertex shader but I’m not very confident about doing that while maintaining the toon visuals from project.
I’m already using the World Simulation Mode. I had to use multiples particles systems so each cloud has a start size smaller than the prior.
Thanks for the advices. I’ll try to make my own version of the running particle and I’ll post here.
Actually you can just derive the Toon shader to a new one like done for Toon_Wind one. Shader graph unlit shader give you the capability to deform geometry also:
Did you try to use “Start Size” from a curve?
1 Like
Oh, so how this kind of stuff is done! Make sense. Thanks!
It works! As always thought this curve was a probability curve (probability X size). Actually, is size over time! Much more useful! I can use that! Thanks
I’m also having a strange high tri count. Each puff cloud mesh has approximately 300 triangles. And I have at most 10 particles at the same time on the screen. When I turn on the particle system I’d expect to have an additional 3000 tri count (300 x 10 particles), but it’s reaching 10000. I don’t know why this is happening. It’s not significantly affecting performance. By far. But it’s not what I expected.
So I implemented a walking particle and coded some logic so I could see the particles in action. I don’t intend to push the code since it’s just a hack that doesn’t follow any good practices and never should be seen by anyone but me
Here’s the result:
Any thoughts?
I used a smaller outline value because the outline would make the clouds very noisy when the camera is far from the character.
Should I wait for any kind of feedback from @cirocontinisio ? Or can I open already open a pull request? This is my first PR on this project.
Thanks for the help;
2 Likes
I don’t mind creating a more formal particle logic right now, but there’s no task for this on the roadmap, and maybe it’s a bit too soon since the character logic is not very well defined yet.
Hi @erizzoalbuquerque !
I really like the landing effect, the two others might need some tweaks: Making the particles more random in position and time of appearance maybe.
Maybe to help @cirocontinisio to validate the graphical direction, it might be a good idea to create a PR where your effect is attached to the main character. Anyone will be able to play with it and give feedback on it.
1 Like
Thanks, @treivize I’ll try to tweak more the jumping and walking effects. I’m not sure about adding a bit of time randomness to walking particles since the pig steps are constant, but I can try it out.
I’ll also open a PR (tomorrow) so the community staff can give it a review.
I created a PR and I’m waiting for it to be reviewed.
Thanks for the PR, @erizzoalbuquerque ! The effect looks good, I just want to double-check how many polygons is each of those cloud puffs, but other than that it should be ok.
Also I need to make sure the effect is “wired” into our existing StateMachine solution, which is currently being reworked (but almost there).
Thanks! @cirocontinisio ! I really don’t have idea of how many polygons is too much for a particle. My model has 300, I think. Maybe it’s too much, even if the number of particles is not greater than 15.
I did the script to control the particles as a temporary solution to test the particles. The code works without changing any other file but probably comparing the current state strings to decide to play the particles it’s not a very well-designed code hehe If there’s any feedback on how to integrate it better with the state machine I can recode it in the intended way
1 Like
Hi @erizzoalbuquerque , I have opened a PR to refactor the way your particle effect and (I hope more generally) potential other effects based on particle like impact effect in the future. Do not hesitate to have a look at it and let me know if something should be done differently. Link to the PR: Refactor Particle Effect Action by treivize · Pull Request #261 · UnityTechnologies/open-project-1 · GitHub
Hey @treivize ! I will have a look at the PR. This refactor is really important. The script I did was just a temporary terrible hack to see the particles working. At the time I did it, the State Machine was just beginning to take form, and I thought that thinking about a more permanent solution would be useless. So I wrote a quick little ugly code to wire the effects to the character
1 Like
Ok, I have updated my PR with an implementation solving all the points you raised except the first one (landing effect based on falling speed of the character)
It took me a while to get familiar with the pools/factories but at the end they are very simple to use and to integrate! wow!
I basically created a new PariticleEffectFactorySO taking a ParticuleSystem prefab as SO param and then created 3 factories one for each effect (the SO files are under ScriptableObjects/Pools/ParticleEffects:
Next I have created simple (the same as shown in the Pool Example) ParticleEffectPools for each of them:
Next I have replaced the usage of the Particle Prefab in the action PlayParticuleEffectSO to use the proper pool SO and added a Transform input to position/rotate/scale the effect based on a provided Transform from a prefab (is it fine to configure the effect positioning like that?)
In the action script, I have used the pool as following:
private void TriggerParticuleEffect()
{
_particles = _parentSO.particlePool.Request();
_particles.transform.SetParent(_stateMachine.transform);
_particles.transform.localPosition = _parentSO.anchor.localPosition;
_particles.transform.localRotation = _parentSO.anchor.localRotation;
_particles.transform.localScale = _parentSO.anchor.localScale;
_stateMachine.StartCoroutine(TriggerEffectCoroutine(_particles));
}
and in the coroutine, instead of destroying the particle system, I call the pool Return() method:
private IEnumerator TriggerEffectCoroutine(ParticleSystem particleSystem)
{
particleSystem.Play();
while (particleSystem.IsAlive())
{
yield return null;
}
_parentSO.particlePool.Return(particleSystem);
}
It works very well the particle system of each effect are created into a pool in the hierarchy the first time they are needed, attached to the character before playing and move back un-active in the pool at the end! Awesome @drod7425 !
1 Like
Hey, y’all. This is my first Unity forum post and I’m super excited to start contributing to this project!
I noticed that on Codecks there’s a task for syncing the amount of particles emitted based on fall speed.
I was wondering if anyone has already done this/started on it/ (is this even the right place to ask this?).
Thanks in advance.