Easy Caustics in Blender!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone and welcome to today's tutorial on blender shader nodes today i'll be teaching you how to make these caustic effects that you can see in the background now if you've been on my twitter account you would have seen this file on there and the fish the fish will be a future tutorial right now it's a bit too complicated to fit into one of my current tutorials but it will be coming sometime soon hopefully but for now we're just going to focus on the caustic effects which people have been asking about so let's get started first of all let's have a nice scene like this pretty clean it'll uh show off the effect quite well but yeah to get started let's make a new material for both the cube and the environment right here let's see it'll be point zero zero one so let's apply that to all the scenes and second what we are going to do is add in a voronoi texture this texture will be the basis for the entire effect so it's very important next up we are going to use an input texture coordinate or no input geometry coordinate we are going to use the position because that means no matter where something is in space the texture will be applied the same way so that means that if we were to do this and copy this cube anywhere we would put it the effect would be applied as if it were a light we are faking the caustics after all because making real caustics would be very difficult to do okay so next up what we are going to do is going to scale this texture by 1 on the x and y axis and 0 on the z axis because the way caustics work when they are on the edge of a plane like this they are stretched if we were to go like this they would not be stretched and that is not what we want so let's set the scale to about 3 for everything else three or two or maybe even one yeah one seems pretty good and now what we are going to do is to make the glow effect so to do that we need to use a color ramp and a very specific method of fall off which you if you've watched my tutorials in the past you would have seen so the way that we do that is using a math node set to minimum minimum and a math node set to logarithm there we go right there and for both of these we want them set to 0.999 on both of those both the top ones with the minimum it could be either one but i'm just keeping it the same for both and we want to hook up the color ramp to both the bottom sockets that's very important and if we were to move this around a little bit and then multiply the effect by a good amount we will see that the effect is working there we go we're getting a very interesting falloff effect now you want to turn the color ramp so that's like that as we could see it's looking a bit like caustics at the moment but we can improve it by a little bit first of all we need to organize the nodes right here so let's put the fall off in this collection or this node group so let's put that right there another thing that we can do to make the fall even sharper is by plugging in the logarithm into a multiply connected to the uh color ramp right there as we could see just like that i'll give you a nice good look at it right there if we plug that into the multiply and then cancel that as we could see it's looking quite a bit like caustics with that very nice light fall off so if we were to hook this into the principled bsdf node for the emission strength right there we'll see that nothing is happening because we need to set the color so the color that i chose for the fishbowl scenario was more of an orangey like this and i think we need to set this to like 200 or maybe even higher i think that's actually pretty good but we could set the color to whatever we want like more of a blue if it's a different lighting style or something like that and that is close to the final effect but we need to add in some animation so to do that we just add in a vector math at node right there as we can see if we move the z axis we could see that it animates over time which is what we want but to do this procedurally so that we don't have to manually animate it we put in hashtag frame like that divided by 24. as we can see it is now animating with every frame we can make this faster by playing in hashtag frame divided by 12. i think that looks pretty good for caustics there we go now another thing that we need to do is make it so that the caustics do not show up on the bottom of an object so if we were to scale this object up and put over here we could see that it's affecting the bottom and we do not want that so how do we fix it well the way that we fix it is fairly fairly simple we use the input geometry node once again just like with that one and we use the normal output the normal output will give us like the x y and z directions that the faces are oriented in so we use a separate xyz node right there and let's use the z-axis as we could see it's only affecting the top now there is a way to do it with the lights but it doesn't work in cycles while this one does so i'm just going to be using that method so if we multiply this the falloff by this we can see that boom it's only affecting the tops of these so if there we were to add in a overhang like this it won't affect the bottom which is exactly what we want that is close to the final fact let's see how it works or how it looks okay slight problem we could see that this is happening uh to fix that just hit the clamp node right there and boom that's all working very good yeah and that's basically the entire effect if you want and this is what i did i put this into a node group by pressing shift a group make group and now that it's like this we can apply it to any material just by adding in the node group like if i were to add in another cube in here that has a separate material let's set it to red let's see let's scale it up a little bit just so that we can see what's happening we could input if we were to name this node group let's say caustics 2 there we go we could go into this one and add in group caustics 2 then we could plug that into the emission strength and we'll have to set the color manually just because that's how it works and boom we got the caustics working on this object as well let's just add in a subdivision surface so that we can see the uh so that we could see that the uh z falloff works precisely as intended and yeah that is basically the entire effect let's see anything else that needs to be covered i think that is it again once again uh this the fish file is on my gumroad page and there will be a tutorial on how to make the fish move like that in the future i don't know when exactly but yeah if you want to support the channel be sure to check out my twitter page my gumboard page there's free and paid stuff on there my instagram that's new a patreon is coming once i figure out how to do it and let's see anything else no i believe that's it i hope you enjoyed this tutorial and i will see you in the next one
Info
Channel: Cartesian Caramel
Views: 55,773
Rating: undefined out of 5
Keywords:
Id: j17dGVw3_gM
Channel Id: undefined
Length: 7min 49sec (469 seconds)
Published: Mon Jan 24 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.