Finally someone clearly explained Timeline's scripts and how to write them. It's quite difficult to understand why you need 4 classes for such a small thing:) Thanks!
Your content is so underrated. Keep these tutorials going. I'm completely new to computer graphics and shaders and I simply follow shader graph tutorials step by step. Can you make a series of good practices for shader graphs or ways to optimize imported ones. I've purchased two water assets from the unity asset store and just simply can't get them running smoothly on mobile devices.
Nice, however there is a potential issue when using alpha. Mixer should use Color finalColor = new Color(0f,0f,0f,0f); instead of Color.black as black is (0,0,0,1) and when added with weight finalColor += behaviour.ColorVal * weight; results in alpha greater than 1. So when blending shader _Color, where you want the alpha to fade in, it will ignore the alpha. Initialising finalColor = new Color(0,0,0,0) makes it all good.
Awesome! I've been wondering during the whole video why use the Timeline instead of the good old animator though, the Timeline is more oriented to cinematic/cutscene like sequences right?
Well, i think its mostly personal preference. I'm more comfortable/experienced using timeline. Plus I've often been creating timelines for cinematics and wanted to sync a shader with it. Once you have the code files for timeline, it should be pretty easy to work with.
You can do the same, add the script that controls the percentage variable to an object in the scene, and add a public variable for the material, and drag your material there, you can also add one more parameter for the position of the effect.
Hi, awesome trick, exactly what I was looking for! Would it be possible to animate a float from 0 to 25 or or so in 1 single 'ShaderControlAsset' bar on the timeline track, like you can do with an animator track with record (like position). Or is the quickest way just defining multiple 'ShaderControlAsset's with different values and let Timeline blend inbetween them with the mixer. (which also feels a bit like a hack though). Just brainfarts
I'm mostly sure either option would work. For my current implementation, the most straightforward is your second idea. I wouldn't call it a hack as it's really how timeline is meant to work. It is engineered to be a collection of lerps. Also, in game dev, and shaders in particular, i say there is no such thing as a "hack" :) If you can get something that looks good and has good performance, you've won.
I have a request if it sounds like fun! I want to create a track/trail effect for certain Tilemaps (2d)... So when something walks over the tilemap, it creates an effect (like grass parting). There's a few videos on doing a vertex change like this in 3D, but I can't find anything that could change hue's in 2D instead. Do you think this would be really complicated to do?
Cool idea. Off the top of my head, the two ways to pull this off would be either tessellating your sprite so it's actually a ton of quads, and coloring the verts. Or generate texture data in code and pass that into the shader. I'm not sure which of those would be better from a performance standpoint. I'm also guessing there's a better way to do this. I'll definitely add it to the idea list, and if I can come up with something clever or helpful will make a vid on it :)
@@GameDevBill Sweet!! That sounds awesome!! The quad idea is a great idea, I'm not sure it could work with a tilemap though. It probably could with some super intense thinking I'm sure but that sounds extra complicated lol. I'm wondering if just a simple(?) trail effect is all that is needed in 2D, similar to that of a particle effect trail
This tutorial video, unlike other videos, helps learners to use it in their own projects and provides documentation. true teacher
COME BACK BILL WE NEED YOU!!!
Finally someone clearly explained Timeline's scripts and how to write them.
It's quite difficult to understand why you need 4 classes for such a small thing:) Thanks!
Glad you liked it! Thanks for the feedback
Amazing Interview. I haven't been finding anyone that does a lot of shader graphs, but you are amazing. Definitely tuning in every video.
Hey, I hope you make more videos in the future! Your approach is great!
Very clear and helps a lot! Thanks!
Thank you very much! Timeline scripting is a bit complicated in the first place, it was very clear :)
Thanks 😄
Glad to hear it!
This looks awesome, it could make for a great "big hit" sort of effect!
Thanks, yeah, that would be a great use!
Your content is so underrated. Keep these tutorials going.
I'm completely new to computer graphics and shaders and I simply follow shader graph tutorials step by step.
Can you make a series of good practices for shader graphs or ways to optimize imported ones. I've purchased two water assets from the unity asset store and just simply can't get them running smoothly on mobile devices.
Some good ideas, and kind words :)
Thanks.
Nice, however there is a potential issue when using alpha. Mixer should use Color finalColor = new Color(0f,0f,0f,0f); instead of Color.black as black is (0,0,0,1) and when added with weight finalColor += behaviour.ColorVal * weight; results in alpha greater than 1. So when blending shader _Color, where you want the alpha to fade in, it will ignore the alpha. Initialising finalColor = new Color(0,0,0,0) makes it all good.
Awesome! I've been wondering during the whole video why use the Timeline instead of the good old animator though, the Timeline is more oriented to cinematic/cutscene like sequences right?
Well, i think its mostly personal preference. I'm more comfortable/experienced using timeline. Plus I've often been creating timelines for cinematics and wanted to sync a shader with it.
Once you have the code files for timeline, it should be pretty easy to work with.
You, Sir are beeeee-a-utiful!!
How can you add the script if you're using this shader as a fullscreen shader ?
You can do the same, add the script that controls the percentage variable to an object in the scene, and add a public variable for the material, and drag your material there, you can also add one more parameter for the position of the effect.
How would you change this to timeline animate multiple shaders attached to a single Mesh Renderer, where each shader on an individual track?
I'm also looking to do this! Any help appreciated
Thank you!
Hi, awesome trick, exactly what I was looking for!
Would it be possible to animate a float from 0 to 25 or or so in 1 single 'ShaderControlAsset' bar on the timeline track, like you can do with an animator track with record (like position). Or is the quickest way just defining multiple 'ShaderControlAsset's with different values and let Timeline blend inbetween them with the mixer. (which also feels a bit like a hack though). Just brainfarts
I'm mostly sure either option would work. For my current implementation, the most straightforward is your second idea. I wouldn't call it a hack as it's really how timeline is meant to work. It is engineered to be a collection of lerps.
Also, in game dev, and shaders in particular, i say there is no such thing as a "hack" :) If you can get something that looks good and has good performance, you've won.
Thank you so much!
This is amazing
thanks!
thank you so much for sharing!
You bet!
Hope you come back.
I have a request if it sounds like fun! I want to create a track/trail effect for certain Tilemaps (2d)... So when something walks over the tilemap, it creates an effect (like grass parting). There's a few videos on doing a vertex change like this in 3D, but I can't find anything that could change hue's in 2D instead. Do you think this would be really complicated to do?
Cool idea. Off the top of my head, the two ways to pull this off would be either tessellating your sprite so it's actually a ton of quads, and coloring the verts. Or generate texture data in code and pass that into the shader. I'm not sure which of those would be better from a performance standpoint. I'm also guessing there's a better way to do this. I'll definitely add it to the idea list, and if I can come up with something clever or helpful will make a vid on it :)
@@GameDevBill Sweet!! That sounds awesome!! The quad idea is a great idea, I'm not sure it could work with a tilemap though. It probably could with some super intense thinking I'm sure but that sounds extra complicated lol. I'm wondering if just a simple(?) trail effect is all that is needed in 2D, similar to that of a particle effect trail
cool !
thanks!