Late to the party but these videos are really great! I'd love to add a few things, some which I believe are shortcomings that should be fixed and others that are just minor improvements, so there they are: - Focus stuck to close when looking at the sky. After the Branch to check if something was hit, there's nothing in the false route, which makes it so that if your focus is set to close range and you look in the sky, it'll stay that way. To fix this, on the False route Set the Focus Location to infinity (0). Then, since we can't plug 2 different floats into the MakePostProcessSettings input node, we can add the "Select Float" node. the True route's float goes into A, False route float into B, and we can use the same boolean from the line trace node to determine whether we want A or B to go into the Focal DIstance Input. - You can't Focus other Pawns/Character If you put a debug sphere on the hit location, you'll see that characters and pawn wont be hit by the raytracing line. To fix this, we can swap the Line Trace By Channel Node with a Line Trace For Object node. Drag from the "Object Types" input and select "Make Array". We can now add custom enum values of things we want to be hit by the trace line but by default there's already what we need: add 3 pins with WorldStatic, WorldDynamic and Pawn. Now Characters and Pawns will affect the depth of field too. Note: an Aperture of 1.0 is quite extreme and the depth of field will be extremely narrow. Increase it to 2.8 or more so that three dimensional object cen be in focus entirely. - It's barely noticeable but the the focusing is always immediate and not really smooth. This can technically be done by using the "FInterp" To node
I did it a little differently. Instead of all the math after the line trace, I just pulled off the "Distance" pin of the Break straight to the "Manual Focus Distance" pin of the "Make CameraFocusSettings" node. Well, I routed it through a "Select Float" with a huge number on the B pin. The bool pin on the hit trace triggers the selection. That way I can stare at the sun without the focus going to zero. You do have to add a "Set CameraFocusSettings" node after the Make node. But that exposes other stuff you can tinker with. Added a few other nodes so I can change focal length, sensor size, and aperture from the blueprint. Planning to be able to adjust the camera for different situations or to create different effects. Probably doesn't matter, but I prefer to do this sort of stuff in-camera and save the post-processing for environmental stuff.
Hi! Everything looks cool and works, it would be great to know how to fix camera clipping to walls when camera penetrates through object when in close contact with any object.
This was a great tutorial, please keep up the great work! One question.... after implementing this, my map has gotten very bright. I know it's because of the f-stop effects we are adding to the first person camera, but this add more light into the camera lens. How do we counteract this so our map lighting stays as desired?
Hello Thank you for making a great tutorial. As a beginner in game development, I have a question. I don't know where to ask questions, so I'm asking here first. Do you use Lumen at the end when you make the game? Or I wonder if you use the old method. I'm not sure how to start writing when I first make a game.
Hi Sir good day i how to adjust the boundary from wall to mannequin, because when i try hit the wall same from video i show the another side or inside the wall. Thanks
I got everything working but is there a way to set the character model to not be affected by the camera depth of field? Right now the model is blurred if i look down or if im sprinting the hands are out of focus which looks a bit off, wondering if theres a way to make sure this mesh is always in focus?
You can add a custom material to your gun that will make it displaced and thus not affected by the depth of field, however I have not done this in a while and forget exactly how to do it. Once I make my gun system however I will be figuring this out :)
Learned quite a bit from your tutorials so far, thanks! I just have one question, I have set the first-person camera on the x-axis behind the head to prevent clipping and seeing through walls when close to them, this makes the body very blurry when viewing down.
Hm that’s pretty interesting. I haven’t tried this, but I will later today when I get the chance. I would presume it’s one of two things for why the feet are still blurry. It could either be that the distance for which things become focused is not a big enough value (the feet aren’t close enough to be focused) or potentially the mesh has an issue with the hit result and so it isn’t detected as a hit… I think the first one is more likely true
@@codethings Apologies if what I'm about to ask does not make sense but I was wondering if it would be possible to configure the DOF in a way where if it for example hits a mesh like a flashlight (that is close to the first-person camera) it would not apply the effect or it would focus. If that makes sense :)
hmm im sure there is a way but I have never tinkered with it before. however, i have found a few articles and a video here that might help. best of luck! Also, if i do figure it out when i try to do something like this, i will make a video on it! forums.unrealengine.com/t/exclude-objects-from-post-processing/420929 forums.unrealengine.com/t/how-to-exclude-a-mesh-from-depth-of-field/153544 th-cam.com/video/zRXFlPxRJHk/w-d-xo.html
Hey man, these tutorials are fantastic! I had a quick question. I currently have a sharpening post process material and a fish lens post process material in my first person camera that seem to get cancelled out when I implement any kind of auto depth of field (including your method). Is there some way to make them compatible?
It seems I might be doing something wrong.. I believe I followed your tutorial but when I try this out, results are inverted. Wall in front of me gets blurred and background is in focus. Do I need to invert something somewhere?.. :/
Hmm, im not too sure but im sure its something very simple. If you want to, you can join our discord community and we can try to solve in our code-help section :)
Why don't you respond to my other comments under your other videos? It's no secret to you that on the topic "Field system" there are already videos on TH-cam with approximately the same mechanics and they came out before yours LOL.
You should at least not be caught that you are copying someone's lesson, the defocus works only when you set the settings to Epic! And why are the hands in defocus? If you are already copying someone else's lesson, then at least fix the bugs! And how to make it work at low settings????
None of my lessons/tutorials are “copied” the settings in this tutorial for the oscillation, rotation, etc settings I found online and they seemed good before recording. The process of making the system I thought of on my own. The hands are in focus because of the focal length, you can set the material of the character to not be affected by depth of field, which will fix it (or the pawn itself). This will make it so it is not effected by depth of field and thus cannot be focused. This same logic would apply if you were holding a weapon or some item. You could alternatively check to see if you’re holding a weapon and if you are toggle a boolean which can be used to check whether you should utilize the DOF or not. There are many ways to fix this issue.
Late to the party but these videos are really great! I'd love to add a few things, some which I believe are shortcomings that should be fixed and others that are just minor improvements, so there they are:
- Focus stuck to close when looking at the sky.
After the Branch to check if something was hit, there's nothing in the false route, which makes it so that if your focus is set to close range and you look in the sky, it'll stay that way. To fix this, on the False route Set the Focus Location to infinity (0). Then, since we can't plug 2 different floats into the MakePostProcessSettings input node, we can add the "Select Float" node. the True route's float goes into A, False route float into B, and we can use the same boolean from the line trace node to determine whether we want A or B to go into the Focal DIstance Input.
- You can't Focus other Pawns/Character
If you put a debug sphere on the hit location, you'll see that characters and pawn wont be hit by the raytracing line. To fix this, we can swap the Line Trace By Channel Node with a Line Trace For Object node. Drag from the "Object Types" input and select "Make Array". We can now add custom enum values of things we want to be hit by the trace line but by default there's already what we need: add 3 pins with WorldStatic, WorldDynamic and Pawn. Now Characters and Pawns will affect the depth of field too.
Note: an Aperture of 1.0 is quite extreme and the depth of field will be extremely narrow. Increase it to 2.8 or more so that three dimensional object cen be in focus entirely.
- It's barely noticeable but the the focusing is always immediate and not really smooth. This can technically be done by using the "FInterp" To node
I did it a little differently. Instead of all the math after the line trace, I just pulled off the "Distance" pin of the Break straight to the "Manual Focus Distance" pin of the "Make CameraFocusSettings" node. Well, I routed it through a "Select Float" with a huge number on the B pin. The bool pin on the hit trace triggers the selection. That way I can stare at the sun without the focus going to zero. You do have to add a "Set CameraFocusSettings" node after the Make node. But that exposes other stuff you can tinker with. Added a few other nodes so I can change focal length, sensor size, and aperture from the blueprint. Planning to be able to adjust the camera for different situations or to create different effects. Probably doesn't matter, but I prefer to do this sort of stuff in-camera and save the post-processing for environmental stuff.
But this doesn't work with a normal non-cinematic camera, right?
can you share the picture blueprint?
@@khris1977 I uninstalled UE. But nothing really to share. Same as in the video except for the change I made.
you are a life saver, your videos are amazing
Love RE mechanics tutorials. For how successful the franchise is I never see anyone make UE tutorials for it.
Hi! Everything looks cool and works, it would be great to know how to fix camera clipping to walls when camera penetrates through object when in close contact with any object.
is there a way to fix body and hands being blurred?
This was a great tutorial, please keep up the great work! One question.... after implementing this, my map has gotten very bright. I know it's because of the f-stop effects we are adding to the first person camera, but this add more light into the camera lens. How do we counteract this so our map lighting stays as desired?
This is really cool, thanks for the lesson!
This is newest code for UE 5 in 2024.😳 This is lot better than collision detection.
Code Things - Thank You for this new code.
Of course, I'm very happy to hear that it helped you! Goodluck in your game deveopment journey :)
Hello
Thank you for making a great tutorial.
As a beginner in game development, I have a question.
I don't know where to ask questions, so I'm asking here first.
Do you use Lumen at the end when you make the game? Or I wonder if you use the old method.
I'm not sure how to start writing when I first make a game.
There's no execute when I make input mapping collapsed graph. Any solution?
I have the issue that my character mesh has the dof effect
Hi Sir good day i how to adjust the boundary from wall to mannequin, because when i try hit the wall same from video i show the another side or inside the wall. Thanks
I got everything working but is there a way to set the character model to not be affected by the camera depth of field? Right now the model is blurred if i look down or if im sprinting the hands are out of focus which looks a bit off, wondering if theres a way to make sure this mesh is always in focus?
me too
Unfortunately I had to scrap the code because it blurs the weapons and your arms
So, I have a problem. When I use this with a dirt mask, the dirt mask just disappears. Is there a way to fix that?
The "Add Input Mapping" nodes from the 6:46 minute are gone in UE 5.4 :( Is there any way around that?
just notice that my gun is blur how can i fix it?
You can add a custom material to your gun that will make it displaced and thus not affected by the depth of field, however I have not done this in a while and forget exactly how to do it. Once I make my gun system however I will be figuring this out :)
Learned quite a bit from your tutorials so far, thanks! I just have one question, I have set the first-person camera on the x-axis behind the head to prevent clipping and seeing through walls when close to them, this makes the body very blurry when viewing down.
Hm that’s pretty interesting. I haven’t tried this, but I will later today when I get the chance. I would presume it’s one of two things for why the feet are still blurry. It could either be that the distance for which things become focused is not a big enough value (the feet aren’t close enough to be focused) or potentially the mesh has an issue with the hit result and so it isn’t detected as a hit… I think the first one is more likely true
@@codethings Apologies if what I'm about to ask does not make sense but I was wondering if it would be possible to configure the DOF in a way where if it for example hits a mesh like a flashlight (that is close to the first-person camera) it would not apply the effect or it would focus. If that makes sense :)
hmm im sure there is a way but I have never tinkered with it before. however, i have found a few articles and a video here that might help. best of luck! Also, if i do figure it out when i try to do something like this, i will make a video on it!
forums.unrealengine.com/t/exclude-objects-from-post-processing/420929
forums.unrealengine.com/t/how-to-exclude-a-mesh-from-depth-of-field/153544
th-cam.com/video/zRXFlPxRJHk/w-d-xo.html
great content, keep it up! could you do a tutorial on how to do a body cam like unrecord?
I 100% plan on doing one!
Can we increase the strength of DOF and Decrease?
Hey man, these tutorials are fantastic! I had a quick question. I currently have a sharpening post process material and a fish lens post process material in my first person camera that seem to get cancelled out when I implement any kind of auto depth of field (including your method). Is there some way to make them compatible?
It seems I might be doing something wrong.. I believe I followed your tutorial but when I try this out, results are inverted. Wall in front of me gets blurred and background is in focus. Do I need to invert something somewhere?.. :/
Hmm, im not too sure but im sure its something very simple. If you want to, you can join our discord community and we can try to solve in our code-help section :)
@@codethings yeah i will join in the evening!
Did you guys found out why its inverted? And how to fix it? I have the same problem
@@acsuperletalis hi, yes, i found it myself. For me it was on timer when you set up so it will check every 0.2 seconds, looping was not ticked
@@TommyTheHeist Thanks for the help!
Why don't you respond to my other comments under your other videos? It's no secret to you that on the topic
"Field system"
there are already videos on TH-cam with approximately the same mechanics and they came out before yours LOL.
You should at least not be caught that you are copying someone's lesson, the defocus works only when you set the settings to Epic! And why are the hands in defocus? If you are already copying someone else's lesson, then at least fix the bugs! And how to make it work at low settings????
None of my lessons/tutorials are “copied” the settings in this tutorial for the oscillation, rotation, etc settings I found online and they seemed good before recording. The process of making the system I thought of on my own. The hands are in focus because of the focal length, you can set the material of the character to not be affected by depth of field, which will fix it (or the pawn itself). This will make it so it is not effected by depth of field and thus cannot be focused. This same logic would apply if you were holding a weapon or some item. You could alternatively check to see if you’re holding a weapon and if you are toggle a boolean which can be used to check whether you should utilize the DOF or not. There are many ways to fix this issue.