Тёмный

Fix Weapon Clipping and Custom FOV // Make An FPS in Godot 4 (E19) 

StayAtHomeDev
Подписаться 37 тыс.
Просмотров 11 тыс.
50% 1

In this video, we’re separating our weapon view from our player camera so we can customize our FOV (field of view) and fix any environment clipping depth issues.
🔥 GET THE SOURCE FILES ►► / stayathomedev_
👉🏼 FREE BASIC FPS SETUP SOURCE FILES ►► github.com/StayAtHomeDev-Git/...
-----------------------------------------------------------------------------------
✅ Basic FPS Setup Video ►► • Make An FPS in Godot 4
✅ FPS State Machine ►► • E07 - State Machine In...
-----------------------------------------------------------------------------------
0:00 The Godot FPS Project
0:24 Separate FOV
0:53 Two Different Techniques
1:21 The Viewport Technique
2:14 Using 3D Render Layers
2:57 Importing Mesh Resource from GLB
3:34 Culling 3D Render Layers
3:55 Matching Camera Transforms
4:11 Disadvantage To Viewport Technique
4:31 The Custom Shader Technique
5:15 Shader Code
6:10 Fixing Shadow Issues
6:53 Final Results
7:24 More FPS Tutorials
-----------------------------------------------------------------------------------
This series is part of my sponsored Godot FPS Project where we will walk through how to create an 3D FPS game in Godot 4, step by step. I won't be skipping any steps in the process and everything will be sequential video to video.
This initial basic FPS setup project is available for free to download and use using the MIT license via the link below. For all future videos, the project source files will be available to my GitHub Sponsors.
Joining my Patreon in one of the 3 tiers will give you:
- access to the private Discord channel
- your name in the project README
- early access to tutorial videos
- power to vote on what mechanics get covered in future videos
- full access to the project source files to use in your own projects
-----------------------------------------------------------------------------------
STAYATHOMEDEV ►► stayathomedev.com
TWITTER ►► / stayathomedev
GODOT ASSET MARKETPLACE ►► godotxc.com/
#godot #godotengine #fps

Игры

Опубликовано:

 

4 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 34   
@stayathomedev
@stayathomedev 4 месяца назад
🔥 GET THE SOURCE FILES ►► www.patreon.com/StayAtHomeDev_ 👉🏼 FREE BASIC FPS SETUP SOURCE FILES ►► github.com/StayAtHomeDev-Git/FPS-Godot-Basic-Setup
@gadsentz6519
@gadsentz6519 4 месяца назад
Hello, I hope this message finds you well. I'm currently facing an issue with exporting my Godot game to APK, and I'm seeking your expertise to help me troubleshoot and resolve the problem. After importing a game , I made changes including updating the app name. However, when I export the project to APK, the game fails to transition to the next level. Interestingly, when I play the game within Godot, the level transition works as expected. If you have experience with Godot or have encountered a similar issue, I would greatly appreciate any insights, tips, or guidance you can provide to help me debug and solve this problem.Hi Godot Community, I hope this message finds you well. I'm currently facing an issue with exporting my Godot game to APK, and I'm seeking your expertise to help me troubleshoot and resolve the problem. After importing a game , I made changes including updating the app name. However, when I export the project to APK, the game fails to transition to the next level. Interestingly, when I play the game within Godot, the level transition works as expected. If you have experience with Godot or have encountered a similar issue, I would greatly appreciate any insights, tips, or guidance you can provide to help me debug and solve this problem.
@BastiaanOlij
@BastiaanOlij 4 месяца назад
As always, cool video! The shadow issue sure is annoying but likely will need us to expose a variable in shader that informs you what pass the shader is currently used for, so the matrix change isn't done during the shadow rendering pass. Also note that in Godot 4.3 a change is likely coming called "Reverse-Z". Instead of the traditional Z = 0.0 = near, Z = 1.0 = far, this is reversed. This is due to some crazy floating point precision magic that suddenly reduces Z-fighting on nearby objects dramatically. This does mean your POSITION.z solution may need a small tweak
@Legit_SuperFall
@Legit_SuperFall 24 дня назад
Thank you for your work man. I'm extremely grateful.
@ttrr1001
@ttrr1001 4 месяца назад
Very cool, encountered this problem a while back. Came up with the much uglier solution of just scaling the weapon model down until it would not extend beyond the player hitbox and placing the miniature model really really close to the camera so it would seem larger whilst also avoiding clipping into the world geometry. Good stuff 👍
@makebreakrepeat
@makebreakrepeat 4 месяца назад
Literally was just working on this in my first game. Much appreciated! 😃
@holydgworldcreation3066
@holydgworldcreation3066 4 месяца назад
Amazing... very helpful 🫶🏼🥹✨
@MarkWallbridge
@MarkWallbridge 4 месяца назад
Will be joining the Patreon on Payday ;)
@alexleonardkrea
@alexleonardkrea 4 месяца назад
Soooo good!
@marschlu
@marschlu 4 месяца назад
Nice video! Is there already a plan when multiplayer will be added?
@demian5631
@demian5631 4 месяца назад
Awesome video! Theoretically (for the render layer technique), you could have a full 3D model of the player in the default view and then make it invisible (shadows only) and have it cast shadows into the world. Give it animations to blend between that looks similar enough to moving the viewport around (you can find pretty much all of them on mixamo) and it'd only need to have a couple hundred faces to cast a proper shadow. Would lead to (slight) misalignment with the viewport and be more computantionally expensive but it would mean full body shadows in the world.
@slluxxx
@slluxxx Месяц назад
What if the weapon consists of multiple meshes? Guns have loads of movable parts (trigger and slide, just to name two). How would they get the shader treatment?
@DriftWare
@DriftWare 4 месяца назад
How do you plan on handling animations?
@Hafgandil
@Hafgandil 4 месяца назад
First! Amazing.
@user-fl5hz1il7m
@user-fl5hz1il7m 4 месяца назад
Very good video. But Im a little worried in case along with the weapon if I have hands, weapon parts etc.. everything needs this shader to look properly. So, not sure how better it is, performance wise, if we have 6-7 parts using this shader vs just a second viewport. (but indeed its easy)
@Dragon20C
@Dragon20C 4 месяца назад
can you please provide the shader code in the description, that would be appreciated!
@Nexagonal
@Nexagonal 4 месяца назад
Hi! How would you go about enabling and disabling your clip fix in code? I want to be able to use the same shader for the object when it's in the world AND when it's in your hand. Thanks!
@airsoftbeast11234
@airsoftbeast11234 3 дня назад
The problem with the shader method is that it messes up the alignment slightly in terms of camera perspective, so when you aim down sights, a ray casting directly outward from the camera will never line up with what the "Aiming down sight" alignment is. The further away you are the worse the effect gets. Any known fix for this?
@Stroinka420
@Stroinka420 2 месяца назад
How to disable casting shadow on weapon?
@Mrtargi
@Mrtargi 2 месяца назад
Hey! Have somebody fixed issue with shadows? In my case second mesh for shadows is not working
@issaissa7240
@issaissa7240 4 месяца назад
How to clik and get animation fire ?
@jasonwilliams8730
@jasonwilliams8730 4 месяца назад
👍
@plehmann2595
@plehmann2595 6 дней назад
Using a separate viewport with a separate scene rendering has quite an impact on performance. Better avoided if possible.
@saveborg1091
@saveborg1091 4 месяца назад
oh yes.
@Th3_pigeon
@Th3_pigeon 3 месяца назад
I followed all the steps of the first method, but for some reason I can only see what is shown in the subviewport camera. I already checked that the cameras have the correct layers and that the background of the viewport is transparent, even with that I couldn't solve it, could someone help me pls?
@Ju4nd3v
@Ju4nd3v 2 месяца назад
Note that the additional Viewport solution is not compatible with SSR (if you have it enabled in your WorldEnvironment node, try disabling it).
@Th3_pigeon
@Th3_pigeon 2 месяца назад
​@@Ju4nd3vthanks man :)
@issaissa7240
@issaissa7240 4 месяца назад
sorry but the structure node is not the same at the last episode : in FPS Cnntroller on the last episode we finish with CameraController --> WeaponRig --> CrowBar and on this video u got : CameraController --> WeponRig --> Weapon (a scéne with the crowbar ? ) what i miss please ? i look the episode 18 - but u don't do this thanks
@issaissa7240
@issaissa7240 4 месяца назад
i m stilling how fix this i think we have to sync a node materiel to a 3Dmesh instance, but how ?
@issaissa7240
@issaissa7240 4 месяца назад
The question is how u change the glb files to a staticMesh for godot and add some change on it, because now with glb format, godot refuse change information on it
@cenanozen
@cenanozen 3 месяца назад
So you found same shader code that does the trick, made a video about it, and asking for money to share it with your viewers?
@Legit_SuperFall
@Legit_SuperFall 20 дней назад
the code is on the screen The patreon is if you dont want to type it yourself. And other perks
@cenanozen
@cenanozen 20 дней назад
@@Legit_SuperFall No unfortunately not all of it. It is up to line 41. He is holding back some code that he found online behind a paywall. What a pity.
@stayathomedev
@stayathomedev 20 дней назад
@cenanozen let me know what you want codewise and I'll send it 😁 try to explain and then provide source code for a shortcut. Later videos are basically live step by step tutorials. Thanks for watching
Далее
These awesome 3D games are made in Godot
5:40
Просмотров 87 тыс.
Nice hiding.
00:43
Просмотров 3,3 млн
Active Ragdoll / Physics Animations in Godot 4.0
6:06
r/Softwaregore | artificial unintelligence
15:41
Просмотров 296 тыс.
Why I Switched To The Godot Engine
6:47
Просмотров 18 тыс.
The Strange Graphics Of LETHAL COMPANY
15:59
Просмотров 740 тыс.
Making AAA graphics in GODOT is SIMPLE
3:39
Просмотров 38 тыс.
А КАНАЛУ УЖЕ ЦЕЛЫХ 7 ЛЕТ!
16:17
Просмотров 74 тыс.