When I placed the Floor before the Modulo, in order to fix this on my animation I subtracted 1 from my frame count because I was getting a blank in a 3 x 3 grid animation sheet. This worked. I suspect the same thing is happening to you, you are getting that last frame with the blank again when you moved the floor behind the modulo. This helped me a lot thank you, I needed a flipbook animation for a line renderer in unity, I had to use a shader to do it. THANK YOU, THANK YOU, THANK YOU!
thank u sir.....thank u soooooooo much.... google could not helped me but only your tutorial did.... thanks once again .... i have subscribed your channel and liked your videos toooo
Very good video, I used the Animation tab trying to get everything Hand Animated including the VFX with the particle system. but shader Graph seem overall better, more flexibility implementing at least with my knowledge
Thanks for the Video ! that was actually helpfull ! was searching for a solution for how to get the "Max Frames" to work with ASE. So the modulo is Fmod in ASE
So, this is a couple of years late but I believe I know why you need to call floor before modulo in your math calculations. This is just my assumption so take it with a grain of salt Let's say that we're at a time multiplied by speed of 10.95. Let that variable be "T". Now T = 10.95 If you floor T first, you get the value of 10. Let's say you modulo by (M = 10). That means that your final result will be zero. However, when you start with modulo before flooring, T gets either rounded or ceiled. Let's assume that it gets rounded to 11. This will return a modulo result of 1. At this point you don't even need to floor since you're already left with an integer value. I believe the reason why this happens is that the modulo method requires 2 integer parameters in order to work. If you plug in T directly without flooring it. The modulo method approximates it to the nearest integer but not by flooring it. This needs to happen because you can't modulo a float, which is T, with an integer, which is M. This is just an educated guess so I'll need someone to back this up
Great Tutorial. quick question: how would you do the character moving around, not only walking in the same place? Imagine that you have a piece of paper and the character is moving around.
first of all, I won't suggest using a shader like I did as the first option for creating a 2D game character. unity has multiple great tools for 2D game making. check these 2 tutorials for the "correct" approach for what you are looking: ua-cam.com/video/dwcT-Dch0bA/v-deo.html ua-cam.com/video/hkaysu1Z-N8/v-deo.html anyway, no matter how you make your animation cycle - using this shader or something more common. moving it on the axis (x, y and z), you will write a script that will change the GameObject location for every frame and try to sync it with the frames per seconds of the spritesheet/flipbook. see the mentioned tutorial
When I placed the Floor before the Modulo, in order to fix this on my animation I subtracted 1 from my frame count because I was getting a blank in a 3 x 3 grid animation sheet. This worked. I suspect the same thing is happening to you, you are getting that last frame with the blank again when you moved the floor behind the modulo. This helped me a lot thank you, I needed a flipbook animation for a line renderer in unity, I had to use a shader to do it. THANK YOU, THANK YOU, THANK YOU!
Thanks for sharing this.
I'm very happy I helped.
Yes it's not a bug, the params need adjusting to compensate for the order of the operations.
thank u sir.....thank u soooooooo much.... google could not helped me but only your tutorial did.... thanks once again .... i have subscribed your channel and liked your videos toooo
Very good video, I used the Animation tab trying to get everything Hand Animated including the VFX with the particle system. but shader Graph seem overall better, more flexibility implementing at least with my knowledge
Why would you want to animate via a shader instead of the built in animator tools? Seems way more complicated... is there any advantage?
great thanks. wonderful tutorial
Thanks for the video, it was super helpful! :)
Great! so helpful~ Thanks for sharing!
Mega useful tip! thank you so much!
Great tutorial!
Thank you!
thanks helped me out
Thanks mate, keep it up!
Thanks !
Thanks for this!
Thanks for the Video ! that was actually helpfull ! was searching for a solution for how to get the "Max Frames" to work with ASE. So the modulo is Fmod in ASE
תודה רבה
So, this is a couple of years late but I believe I know why you need to call floor before modulo in your math calculations. This is just my assumption so take it with a grain of salt
Let's say that we're at a time multiplied by speed of 10.95. Let that variable be "T".
Now T = 10.95
If you floor T first, you get the value of 10. Let's say you modulo by (M = 10). That means that your final result will be zero.
However, when you start with modulo before flooring, T gets either rounded or ceiled. Let's assume that it gets rounded to 11. This will return a modulo result of 1. At this point you don't even need to floor since you're already left with an integer value.
I believe the reason why this happens is that the modulo method requires 2 integer parameters in order to work. If you plug in T directly without flooring it. The modulo method approximates it to the nearest integer but not by flooring it. This needs to happen because you can't modulo a float, which is T, with an integer, which is M.
This is just an educated guess so I'll need someone to back this up
Thank you
Thanks
Is their a way to add a start frame
Is there a way to specify each frame duration in shader graph?
7:49 - Was that a Sins of a Solar Empire reference I heard? :D
I'm afraid not.
Just trying to be Dr. Frankenstein.
Thanks,,
Great Tutorial. quick question: how would you do the character moving around, not only walking in the same place? Imagine that you have a piece of paper and the character is moving around.
first of all, I won't suggest using a shader like I did as the first option for creating a 2D game character.
unity has multiple great tools for 2D game making. check these 2 tutorials for the "correct" approach for what you are looking:
ua-cam.com/video/dwcT-Dch0bA/v-deo.html
ua-cam.com/video/hkaysu1Z-N8/v-deo.html
anyway, no matter how you make your animation cycle - using this shader or something more common.
moving it on the axis (x, y and z), you will write a script that will change the GameObject location for every frame and try to sync it with the frames per seconds of the spritesheet/flipbook.
see the mentioned tutorial
"Quick question" followed by ""teach me the basics of game development"", lmao.
This approach is flawed, go learn Unity somewhere else.
thank you