What a great first episode of *Matt's adventures into things he has no clue how to do but really wanted to figure out and make a video about* ! This video reminded me about the small considerations that go into making an experience, and even the seemingly smallest of aspects can really add to it. Great video, looking forward to what's to come!
"This video reminded me about the small considerations that go into making an experience, and even the seemingly smallest of aspects can really add to it." My bugs remind me of that every day.
There's nothing quite as satisfying as watching a roughed-out experiment with new mechanics turn into a polished experience. Loved watching this evolve.
That was superb. I found this as I was looking for "how to do depth of field in Unity". It was far easier than I expected. I'm at the stage of trying things out and testing stuff, before I work on the actual product.
Loved the video as usual. The moment you mentioned an escape room style game my heart skipped a beat. I've been working on something like that behind the scenes for months using the First Person Exploration Kit by While Fun Games on the Asset Store. Really nice work sir, keep it up!
well Brackeys, Sebastian League, Mix and Jam, Makin Stuff Look Good and now Game Dev Guide...... my go to guys for any problem in unity !!! Damn good, short and on point with a little entertainment (just perfect) keep posting and take your time mate. ♥
Not going to lie, THIS added to a concept I'm Pre-Deving right now would add just that tinny little hint of realism that I'm looking for. It would defiantly be a 'finishing and polish' element, but I love this idea of yours. You, Sir, get a thumbs up and subscribe from this one.
5:55 What if you slightly increased the intensity of a reflection while looking at it? I think this effect could also be achieved with ray-casting and would resemble how our eyes adjust to looking directly at bright lights/reflections. Great video by the way.
Great video! Could you follow this up with a tutorial on adding the items you pickup to your inventory and then being able to placing those items down within a room?
Lovely I did a similar experiment exactly a year ago xD The only addition was that I also lerped between the origanl and the final object rotation which added more beauty to it But your code certainly looks neater :) Great job
Very nice video - I have had the exact same idea and the my idea was also exactly as your about calculation the focus point - except I haven't actual done it yet. But the result here looks awesome and I will definitely try it out in my game. Thanks for sharing. Oh, I hit the subscribe button by the way :D
A really great and simple way of doing this. In the Book of the Dead HDRP Demo Project Unity uses the Depthbuffer(I think) to control the DoF, so you can focus on non Collision Objects like the Grass, but I never understood how exactly the calculations work. Also I cant figure out how to change any settings in the new URP PP Stack, the values are changing in the editor but nothing happens in rendering. Would be nice If you can explore this stuff :)
It appears things have changed since this video. If people are having difficulty finding the Post Processing Profile. The process as of this post goes like this. 1) Make sure HDRP is in your project with no conflicts or errors. 2) Make sure you have the HDRP asset in your project. 3) Create an empty game object in your seen 4) Add the Volume component it this object. 5) Click the New button next to Profile field in the Volume component 6) Double click the new profile you created, it should appear in the Profile field in the volume component. 7) Click the Add Override button when the profile opens 8) Now click Post Processing or the feature you are looking for. This took me hours to figure out. I do not see any documentation or tutorial that covers these steps. Hope this helps.
@@GameDevGuide For HDRP this is what I came up with: using UnityEngine.Rendering; using UnityEngine.Rendering.HighDefinition; VolumeParameter volumeParameter; public Volume volume; private void Start() { for (int i = 0; i < volume.profile.components.Count; i++) { if (volume.profile.components[i].name == "DepthOfField(Clone)") { volumeParameter = volume.profile.components[i].parameters[1]; volumeParameter.SetValue(new MinFloatParameter(15, 12, true)); } } } void FixedUpdate() { float distanceToFocus = Vector3.Distance(transform.position, focus.transform.position); volumeParameter.SetValue(new MinFloatParameter(distanceToFocus - 15f, distanceToFocus + 15f, true)); }
@@BrianBakerCA Thanks for sharing! Unfortunately, it doesn't work in unity 2019.3: Volume.cs(4,17): error CS0116: A namespace cannot directly contain members such as fields or methods
I enjoy coding adventure videos, been watching Sebastian lauges videos. Now I found this so gonna subscribe and add these vids, thank you for the entertainment!
I am using URP to make a level design on unity (2021.1.17f1 version) with visual 2019 and the library "using UnityEngine.Rendering.PostProcessing;" and "PostProcessVolume" is no recognized, what can i do?
nevermind I found the solution... well whoever have the same problem may be change "UnityEngine.Rendering.PostProcessing;" for "using UnityEngine.Rendering.Universal;" and "using UnityEngine.Rendering;" then "Volume" is now as reserved word so you don't have to use "PosProcessVolume" and last but no least use "volume.GetComponent(); volume.profile.TryGet(out depthOfField);" and thats it :D
soo i switched to urp a few hours ago and post process profiles don't work for some reason. the script you made needed a postProcess profile but i can only use volume component. How do i fix this?
Instead of lerping you could have set a speed at which the focus length changes... That would fix the fast transition on the background and might feel a little more natural
This is amazing but i this there's something i think we're missing... important focus points, i would make a checkerboard and look for important points. If you look at GTA V, focal point shifts as you do here but if you're looking at a tree and a person is closer than the tree but not in front, it'll automatically focus on the character instead of the tree. maybe assign some kind of tag to an object and focus important objects around the midpoint first and if there's nothing more important to show, or most points are closer things... you could make something really good about that, let's just say for a escape room game. Great video!
Brilliant. Loved the narrative wrapped style of delivery. I'd like to know what your thoughts were/are on Unity's physical camera and HDRP. Have you tried the same ArchViz scene in HDRP and Unity 2019.3.9. The post processing stack is now a "Volume" and I think the whole physical camera implementation is mucked up. My thoughts here: forum.unity.com/threads/the-unity-physical-camera-and-how-to-improve-it.877540/ I'd love to know if you'd be able to make the dynamic DoF script work for HDRP considering the Physical camera in HDRP would have physically accurate modeled Bokeh (claimed) and capture Volumetric atmospherics.
hey Game Dev, I've tried doing this but it's not working at all, is it possible you could make a video on the actual interaction with the game object and deselection of the object where it returns back to the original position. Would be grateful thanks.
Game idea: use the Dynamic Depth of Field(DoF) to simulate how someone with bad vision sees, where stuff is intentionally blury, and use the DoF as a part of gameplay
Is the it possible to get this script on GitHub? Im new to coding and this would make the visuals much better and I can't seem to recreate the script your showing 😅
Everytime I watch one of your video, I always wonder... WHY LERP?! It's a linear interpolation from point a to point b based on t that is [0, 1]... What you're doing is a trick to achieve a move toward but really screwed up because of the interpolation problem from the zeno paradox. Well, it's not a huge problem but I found it so messed up.
Hi, I know that you released this at the beginning of the year and probably have no interest in answering any further questions but, I am trying to recreate this in the URP and everything was going great until I had to try and get a public Volume. For some reason, it doesn't exist through script even though it does in HDRP... It's mind-bogglingly annoying because there is no documentation on it either.
Hello, does anyone know how I would go about making frosted glass in Unity? I know how transparency+blur works but the deal with frosted glass is that the effect is based on the distance between THE GLASS and THE OBJECTS behind it rather than just the CAMERA-OBJECTS. This mean that it would be some sort of DoF that considers CAMERA, GLASS and OBJECTS behind it. A double DoF? I don't know, my head hurts if I think too much about it :D Any help is welcome.
@@vjanomolee First of all, cool demo! Every lens (at every aperture) has a hyperfocal distance. If you focus on that distance you get the maximum depth of field. Although I don't remmeber why I recomended that 8 months ago..
Now I remember: There is no point in focusing beyond the hyerfocal distance, the image quality only goes down from there. But I doubt Unity simulates defocus blur at that level of fidelity..
Love the idea. Love your way of presenting the stuff. Keep on going. If you could paste important parts of your code somewhere to play around - this would be awsome!
Great video, looks fantastic! Any chance of you expanding on this to play with camera field of view and zoom to pull of the "Jaws" effect with a camera in game?
The "push-pull " effect, can likely use a very similar principle pulling the target at the beginning of the video. As in the real world, it's just the dolly moving backwards/forwards and the Camera Focal Length forwards/backwards respectively, simultaneously. This alongside the "Link FOV to Physical Camera" checked, so that when the focal length is changed in the camera it keeps the aperture in play and a physically-based DoF So long as the dolly action is predetermined in say, Timeline or Cinemachine, should be pretty straight forward to do if you code and understand a camera.
Don't use time as interpolator term in a damping formula like yours. Here's why. The expression a = lerp(a, b, t) is actually a First Order Low-Pass Exponential Moving Average Infinite Impulse Response filter where b is the input signal, a is the filtered output signal and t is approximating the cutoff frequency of the filter. It's "low-pass" because it actually removes the high frequency content of a. It's "infinite" because given an initial amount in a and a cutoff frequency lower than 1, a will never actually reach b mathematically. It's "exponential" because t is not actually the linear cutoff frequency, but rather approximates the cutoff frequency if used in a c^t form, thus changing it linearly yields a logarithmic cutoff frequency, so using deltaTime as a term of t makes very little sense. T should be set as a constant and regarded as a between 0.0 (complete cutoff - 'a' never changes) and 1.0 (instant transfer - no frequency cutoff or cutoff fq equals the nyquist frequency of the signal). If you wish to give t a linear meaning and try to compensate for variable framerate, at least write t as a function of deltaTime and a constant, but in a normalized exponentiated form like t = pow(c, deltaT) / (normTerm), where c is a constant, time-invariant "focus speed" and normTerm is the max value of c^dT, so that t stays in the unit range 0 to 1. Hope that makes a bit more sense.