# VR with Unreal Engine 5 - Full Beginner Course

https://www.youtube.com/watch?v=wqjJU4V6bGM

[00:00] hello hello hello hello and welcome
[00:02] welcome to Unreal Engine 5 VR course
[00:06] that is mostly tailored for
[00:08] architectural presentations what does
[00:10] that mean well I'll explain it in just a
[00:13] just a moment but while I give this kind
[00:16] of an introduction while I'm blabbing
[00:17] let me show you what we will be working
[00:20] on or working towards I should say
[00:23] throughout this this course or
[00:25] throughout this video
[00:27] basically an Unreal Engine 5.2 Lumen and
[00:31] nanite have become stable enough to be
[00:33] used for VR applications what does this
[00:36] mean well Lumen enables us to use
[00:39] Dynamic lighting as well as Dynamic
[00:41] Reflections meaning that if the light
[00:44] changes its angle the whole scene or all
[00:47] bounces of light inside of the scene
[00:49] will correspond without us needing to
[00:51] rebake it this is a huge thing for
[00:56] photorealism in an architectural
[00:58] presentation
[01:00] in terms of nanite it enables us to use
[01:03] really heavy meshes from for instance
[01:06] the mega scans library that we will most
[01:09] definitely be using in this course what
[01:13] you're seeing now on the screen is me
[01:15] interacting with a bunch of blueprints
[01:18] that I have created and I will be
[01:20] showing you how to make this kind of a
[01:22] interactable objects for your
[01:25] architectural presentations but that is
[01:27] going to come a little bit later because
[01:29] the most important part or the name of
[01:32] the game of this course is optimization
[01:34] how do you make your scene work with the
[01:37] hardware that you have add the highest
[01:40] possible quality I will be using an RTX
[01:43] 3080 non-ti version graphics card with
[01:47] 48 gigabytes of RAM for this course and
[01:51] considering that I'm going to be
[01:53] recording the screen capture at 4K
[01:55] resolution the graphics card will most
[01:57] likely perform closer to 3060
[02:00] ti so this should give you a pretty good
[02:03] understanding of what kind of Hardware
[02:06] we're dealing with and if you should
[02:09] readjust the settings that will be shown
[02:12] to get the same frame rate or frame rate
[02:15] as what I'm getting one last note about
[02:18] the files so all of the files that I use
[02:21] in this course as well as in every other
[02:24] video that I do for this channel are
[02:27] available for the patreon supporters so
[02:29] if you go to the link in the video
[02:31] description below and you support the
[02:33] channel you help out the channel then
[02:36] you will get the list of all of the
[02:38] different files that you can download so
[02:40] that you can follow along this course
[02:42] much much smoothly with that being said
[02:45] you definitely don't need the files to
[02:48] be able to follow along because all of
[02:50] the settings are General meaning that
[02:53] they will work on your files as well
[02:56] with that being said I think it's time
[02:59] to just jump right into it and let's get
[03:02] started
[03:07] alrighty then let's let's start so first
[03:11] of all the headset setting it up and
[03:14] making sure that it's connected to the
[03:15] computer that's uh very it varies very
[03:19] much between different headsets the one
[03:22] that I'm going to Showcase is our room
[03:24] domain that I'm going to use is called
[03:26] meta Quest 2 which is the most popular
[03:29] headset at least at the time of
[03:31] recording this video because it provides
[03:33] the best bang for the buck or Price
[03:37] performance ratio and 2023 I believe the
[03:41] price of this headset is around
[03:43] around 500 dollars something like that
[03:48] so you connect this headset to your
[03:51] computer you will need to choose between
[03:54] two softwares two two different programs
[03:57] that you install on your computer one is
[04:00] called Oculus app
[04:02] Oak all c u l u s Oculus app and or or
[04:10] rather another one is called steam VR
[04:13] the one that I'm going to be using is
[04:16] indeed Oculus app
[04:18] right here so
[04:20] you just download it it's free you log
[04:23] in with the same account that what
[04:26] you're using for the headset and you
[04:28] just simply go uh to your devices click
[04:31] on ADD headset follow along the simple
[04:34] instructions of what to do after which
[04:38] time and your headset will be connected
[04:43] at that point it's going to be connected
[04:45] with a tether through through a cable
[04:49] but if you wanted Wireless you indeed
[04:52] can have it Wireless so
[04:55] and the only restriction is if you want
[04:59] a wireless connection with the headset
[05:01] let me just change it here
[05:04] you need to make sure that it's
[05:06] connected to the same Wi-Fi as the
[05:08] computer which is going to be which you
[05:12] are trying to connect to and which has
[05:14] the app so here you can see that's my
[05:17] that's my computer and I can use the
[05:20] airlink which is the
[05:22] um wireless connection and I can click
[05:25] on launch
[05:27] while this is launching uh
[05:30] since you're
[05:32] most likely not all of you will have the
[05:36] VR uh the same VR headset as what I have
[05:40] and especially if you don't have the
[05:42] meta Quest headset you will most likely
[05:45] need to use team VR for which I will not
[05:48] be showcasing the procedure but it's
[05:52] pretty straightforward it is pretty much
[05:54] the same there are plenty like so many
[05:57] tutorials on how to connect your headset
[06:00] through steamvr so just make sure to you
[06:03] know quickly do a quick Google search
[06:05] and connect it that way
[06:07] basically once you're with the meta
[06:10] Quest once you're in uh and you're
[06:13] connected to the computer then you can
[06:16] start for instance let's go to desktop
[06:19] let's check out monitor one and now I
[06:22] can see exactly the same thing as what I
[06:25] uh was showing you in my on my screen
[06:29] right
[06:30] so that's that's like a
[06:33] in doing so I I am sure that this
[06:37] and this headset is definitely uh
[06:39] let's put it in here
[06:45] connected to the computer
[06:47] right
[06:49] move on to actually creating a
[06:51] Unreal Engine file
[06:56] so to create a new VR project you need
[06:59] to go to library and just launch your
[07:02] 5.2 version you can also launch it
[07:05] through here of Unreal Engine if you
[07:07] have a newer version
[07:09] hello people from the future then launch
[07:12] that one instead and after it initial
[07:17] initiates we will be able to choose a
[07:21] template and we will be using a VR
[07:24] template of course to start off with but
[07:27] then we will make adjustments to it to
[07:30] raise the quality as much as possible
[07:34] so I'll just go into games
[07:37] virtual reality
[07:40] I don't need a starter content so I will
[07:42] have this unticked and I'll just name my
[07:45] project VR
[07:47] YouTube
[07:50] maybe underscore as well
[07:52] and click on create
[07:56] once it's
[07:58] once you start it's going to compile all
[08:02] of the shaders it's going to the first
[08:04] start is always longer and then once
[08:07] it's done we will continue while I still
[08:10] have you here I just want to note that
[08:12] this kind of course is a little bit one
[08:16] step above a beginner level course it's
[08:19] going to be I don't want to say
[08:22] intermediate but it's definitely not a
[08:25] complete bit beginner course if you want
[08:28] a complete beginner course then please
[08:30] consider watching my previous video that
[08:33] I will leave a link to in the video
[08:36] description below so that you get up to
[08:39] speed with you know how to create
[08:41] materials how to navigate the scene and
[08:44] so on I will not be explaining those
[08:46] things here I will be hyper focusing on
[08:49] the VR aspect of it and the optimization
[08:53] settings great so now once the this is
[08:56] lo loaded in let's check if our headset
[09:00] actually gets recognized first of all so
[09:03] I will click on these three dots here
[09:06] change play mode
[09:08] and I will choose I'll try to choose VR
[09:13] preview and you can see that in my case
[09:15] it's grayed out the reason for that is
[09:17] because I have my headset right here
[09:19] right next to me and it's currently
[09:21] turned off so I will put it on an
[09:25] automatic phase detection should and
[09:27] turn it right on there we go and I also
[09:32] need my
[09:33] Rusty controller
[09:35] to actually connect it to my
[09:40] there we go connect it to my computer
[09:44] which turns on the Oculus app
[09:48] don't mind that one actually minimize
[09:51] that keep it running just have it
[09:53] minimized so now with the headset turned
[09:56] on let me double check
[09:59] yeah that's good when the headset turned
[10:01] on if I click these three dots now I can
[10:04] see VR preview option for the play as a
[10:10] play button so play this level in VR
[10:13] click on that
[10:15] I turn this on
[10:17] I can look around I I even see my
[10:20] controllers wait let me
[10:23] this is weird let me grab those no
[10:26] and grab those
[10:28] there we go
[10:31] and let's do something so let me guide
[10:33] you through the actual template first of
[10:36] all uh this is going to be quite quite
[10:39] quick if I hit something I'm sorry I
[10:42] don't see so you're able to pick up
[10:46] stuff in this book
[10:48] drop that one you're able to pick stuff
[10:51] up in this app
[10:53] or in in this template right you are
[10:56] able to drop stuff you're able to ah
[10:59] okay that that I just hit the freaking
[11:02] microphone I'm sorry you're able to pick
[11:04] up a gun shoot the gun
[11:07] you know and and so on
[11:09] so
[11:11] and restart the game blah blah a bunch
[11:13] of settings so it works great but
[11:17] unfortunately this is this does not have
[11:20] Lumen this does not have nanite and as
[11:22] you can see the quality is uh not not
[11:26] the best right so we need to amp up the
[11:30] quality while also also also making sure
[11:35] that the frame rate doesn't drop below a
[11:38] certain threshold so that's what we're
[11:40] going to be what we're going to be doing
[11:42] let me hit Escape here
[11:45] um so the settings that we want to work
[11:49] on are mostly located here under project
[11:53] settings project and editor settings so
[11:56] let me click on that and let's go to our
[12:00] project settings
[12:01] right here
[12:03] let me remove the headset for now I
[12:05] won't need to use it for a while
[12:09] and here
[12:11] the first thing that we want to
[12:13] enable is or make sure that is running
[12:17] is DirectX 12.
[12:21] direct X
[12:23] 12. great default air rhi is indeed
[12:28] DirectX 12. then the next one that we
[12:31] want to check is called sm6
[12:36] direct direct 3D the 12 Target Shader
[12:40] formats sm6 make sure that this one is
[12:43] Tick marked if those two are tick marked
[12:45] or running that is already a pretty
[12:48] pretty good start so now let's start
[12:51] raising the quality first thing and most
[12:54] important thing that I will do is I'll
[12:56] go to Target Hardware here and I'll
[12:59] instead of optimizing project settings
[13:01] for mobile scalable no no we will use
[13:05] desktop scalable which immediately asks
[13:09] us to restart the editor which we will
[13:12] do restart editor
[13:14] this might trigger a recalculation of
[13:19] the materials which no in the shaders
[13:22] which it did not that is great
[13:25] okay so immediately the the quality of
[13:28] of the light and so on gets raised a
[13:31] little bit higher which for us is great
[13:34] that's that's what we want
[13:36] okay next thing that we want to
[13:40] um
[13:41] change is allow
[13:45] static
[13:46] lighting
[13:48] allow static lighting needs to be turned
[13:51] off
[13:52] we want all of our Lighting in the scene
[13:55] to be dynamic
[13:57] so allow static eye lighting is turned
[14:00] off again triggers uh well you can see
[14:03] it right here triggers a restart now
[14:07] operation so we will be restarting it
[14:09] there's going to be as you can probably
[14:11] see there's going to be a lot of
[14:13] restarting going on and this time around
[14:16] it does indeed recompute all of the
[14:19] shaders right so let me pause the video
[14:22] and wait for it to do that
[14:25] okay so after restarting the light is
[14:29] all messed up that is expected don't
[14:31] freak out we will fix it in just a
[14:33] second but before we do that we need to
[14:36] do a few more adjustments to the
[14:38] settings so let's finish up there so
[14:41] again in Project settings we will go for
[14:44] under forward render forward shading we
[14:49] forward shading and we will have this
[14:55] will just simply untick forward shading
[14:57] like that asks us to restart it again no
[15:01] not this time you're not gonna catch me
[15:03] with that recompiling ever again so we
[15:07] will keep changing things and restart
[15:09] everything all at once
[15:12] so with forward shading unticked for
[15:15] mobile we don't care we don't even look
[15:17] at mobile we're just looking up towards
[15:19] forward render
[15:21] uh next one is going to be I guess Lumen
[15:25] we need to check out lumens so
[15:28] um at this point I would suggest
[15:31] instead of searching let's just go to uh
[15:35] rendering where is it rendering hello
[15:37] there it is rendering click here
[15:41] start kind of scrolling down definitely
[15:43] not mobile again start scrolling down
[15:46] until you see global elimination here
[15:48] make sure that it is set to lumen
[15:53] reflections
[15:54] make sure that those are set to Lumen
[15:57] reflection capture resolution
[16:00] 128 for our poor little computer are is
[16:04] going to be too much I would suggest
[16:06] either 64 or 96 in this case I will be
[16:10] using 64 because I'm recording so my my
[16:14] computer won't handle probably 96.
[16:18] um so that's the resolution at which
[16:20] um
[16:21] the scene will be captured by the
[16:24] reflections
[16:26] um last one
[16:28] let me while it's doing this let me just
[16:31] quickly check
[16:33] Global clear plans of retracing
[16:36] uh support Hardware Ray tracing for sure
[16:39] if available it should support Hardware
[16:42] tracing
[16:44] uh it requires enabling cache yes we
[16:47] enable that as well
[16:49] with that being said we don't use Ray
[16:51] traced Shadows or Ray traced skylights
[16:54] those are two expensive at least with
[16:57] the current Hardware that we have even
[16:59] if you're running RTX 1490
[17:03] okay uh Shadow Maps no those are fine
[17:08] nanite make sure that nanite is enabled
[17:13] static lighting we already disabled that
[17:16] forward shading already disabled that
[17:18] those were important ones
[17:20] and for VR
[17:22] um
[17:23] uh the the hmd fixed formulation level
[17:27] experimental I have this disabled
[17:30] um
[17:31] or rather sorry instance stereo I
[17:35] believe that one was
[17:39] was it instant stereo one of these
[17:43] um breaks or is able to break the
[17:47] preview that the shading preview uh so
[17:51] if you will see this kind of a jittery
[17:53] mess in terms of the Shadow casting then
[17:58] make sure to go in here and disable
[18:00] instant stereo as well as fist fixed
[18:03] formation level right here change those
[18:07] to disabled that will fix it if we will
[18:11] see this happen in this course I will
[18:13] make sure to go in here and show you
[18:16] that these settings are the ones
[18:19] responsible for the for that kind of
[18:21] behavior right now without it happening
[18:24] it's very hard to to show
[18:27] Auto exposure I personally prefer to
[18:30] have Auto exposure on so that it exposes
[18:34] properly the scene and later controlling
[18:38] the auto exposure with post process
[18:39] volume
[18:41] and last one is going to be
[18:44] anti-aliasing method I use temporal
[18:48] super resolution TSR method right here
[18:51] with the sample count set to I believe
[18:55] no msaa
[18:57] right here
[19:01] I think sorry
[19:04] um if if it messes up we will we will
[19:07] fix it but for now let's go for no msaa
[19:12] then if we go even lower or perhaps it's
[19:16] an another chapter uh let's just search
[19:20] let's go back to all settings here and
[19:23] in the search bar type in
[19:25] um
[19:26] yeah effect
[19:29] height
[19:32] yeah there we go support Sky atmosphere
[19:35] affecting height fog that's an important
[19:37] tick mark to have so let's take it
[19:41] great once that is done we are kind of
[19:44] finished with the general project
[19:46] settings let me restart uh save selected
[19:50] sure
[19:52] and after it restarts after it
[19:54] recompiles we will continue on with uh
[19:58] fixing the light and and so on for
[20:02] our scene
[20:07] there we go now this is starting to look
[20:10] pretty convincing
[20:13] with Lumen enabled you can see the
[20:16] Shadows are much more realistic the guns
[20:19] produce pretty cool shadows the darkness
[20:23] there is still you know not that great
[20:26] but if I select the light source I make
[20:29] sure that you have this changed from let
[20:34] me go here
[20:35] from static into movable
[20:38] and then it begins
[20:42] Shining Light right and it's all Dynamic
[20:46] all all Dynamic that one as well you can
[20:49] have it movable you know
[20:51] shiny so with that being said I will not
[20:55] be using those light sources I will be
[20:57] just deleting them all together I'll
[20:59] delete that
[21:01] delete
[21:03] these guys well maybe this is pretty
[21:05] cool I'll keep that
[21:08] um
[21:09] and I will just be basically stripping
[21:11] away the the template file into
[21:14] something that has less because I don't
[21:18] need it to be as as big to just test
[21:21] things out
[21:23] um what else is there
[21:26] the reflection capture our sphere
[21:28] reflection capture we don't need those
[21:30] anymore
[21:32] and actually for the light let me show
[21:34] you how I set up the light for a lumen
[21:37] scene so let's first of all get rid of
[21:39] all of the light that we have
[21:41] just going through this navigation or
[21:44] sorry the outliner I will select the
[21:47] directional light I will delete that
[21:49] keep scrolling down until I see the
[21:52] Skylight delete that Sky sphere
[21:55] delete that
[22:00] and that's it right light Mass
[22:02] importance volume don't really need it
[22:04] for now delete that
[22:08] okay anything that has anything to do
[22:12] with a light I have deleted these guys
[22:15] are still a little bit glowy but that's
[22:16] that's okay
[22:18] then under window make sure that
[22:20] environment light mixer is turned on so
[22:23] tick mark that a new window will pop up
[22:27] which you can talk here in the bottom
[22:29] where you can create Skylight
[22:31] atmospheric blah blah all of these
[22:35] uh different light creation tools are
[22:38] available to you the environment light
[22:40] mixer in my opinion is
[22:43] highly underused tool so create skylight
[22:48] like that
[22:51] create atmospheric light like that
[22:55] create Sky atmosphere like that let's
[22:58] look at the sky
[22:59] there it is doing its thing create
[23:02] volumetric clouds like that preparing
[23:05] the shaders give it a second it's gonna
[23:07] kick in
[23:09] and then create height fog as well bam
[23:13] like that and then for the height fog I
[23:17] can increase its density here to have it
[23:22] a little bit more or less foggy I can
[23:25] also make it volumetric fog let me move
[23:28] myself
[23:30] here I guess
[23:32] I can here under exponential height fog
[23:36] I can tick mark volumetric fog right
[23:39] here so it's going to be more accurate
[23:42] in this case I don't need it to be that
[23:43] accurate for now so I'll have it
[23:45] unticked
[23:47] okay
[23:48] these are all default settings by the
[23:51] way if your sky is black make sure that
[23:54] you go back to the video and where I
[23:58] said the effect height fog setting
[24:02] project settings
[24:08] effect I
[24:10] POG supports Sky atmosphere affecting
[24:13] height fog make sure that this one is
[24:15] Tick marked it's going to work done
[24:18] okay one last thing before we actually
[24:21] start the VR preview I'll go for uh I
[24:24] believe advanced settings
[24:27] okay our first little crash here and it
[24:31] is what it is so what I was doing was
[24:34] clicking these three little dots going
[24:36] to advanced settings and choosing a new
[24:40] viewport resolution to be 1920x1080 so
[24:44] that the preview that you see is a
[24:47] little bit larger once you start running
[24:50] the VR template
[24:53] um besides that not much has been
[24:55] changed all of our
[24:58] um like shadows and so on you can see
[25:00] that automatic exposure kinda works here
[25:04] and everything is neat and dandy all
[25:09] right so we can actually move forward we
[25:12] need to drop down the quality by quite a
[25:15] bit for this to to work because this is
[25:18] still too much too much of an Overkill
[25:22] so the first thing that I'm going to do
[25:24] I'll go to my um project settings
[25:28] and I'll go to rendering
[25:34] where is it rendering there we go
[25:37] scroll all the way down
[25:40] until you see VR
[25:44] where is it
[25:51] VR
[25:53] and here I'm just going to choose to
[25:56] untick instance stereo because now I
[26:00] um I'm 99 sure that this is uh
[26:04] problematic
[26:06] um
[26:06] tool as it is right now but instead I
[26:09] will use hmd fixed for viation level and
[26:13] I'll choose it to be medium Dynamic
[26:15] fixed variation experimental I will have
[26:19] this
[26:21] tick marked so medium tick marked
[26:23] instant stereo turn that one off for now
[26:26] at least
[26:28] size that everything here seems to be
[26:31] okay it asks me to restart I will not be
[26:34] restarting just now I will be creating
[26:37] one more thing here to drop the quality
[26:41] of lumen by
[26:44] quite a bit we need to drop it by quite
[26:48] a bit to make this work so
[26:51] under uh quickly add to the project
[26:53] enter this button right here under
[26:56] volumes I will create a post process
[26:58] volume simply here
[27:00] in its settings restart later in its
[27:04] settings I will go for
[27:07] Unbound
[27:10] infinite extent and bound setting out
[27:12] tick mark that
[27:14] and then here I will start changing up
[27:18] things in terms of Bloom and so on so
[27:21] the first thing that I want to do is
[27:23] change the exposure I think exposure
[27:26] compensation here is a little bit of
[27:28] overkill for on the bright side right so
[27:32] it's a little bit too bright let's do uh
[27:35] 0.5 something like that
[27:39] so we just darkened the scene a little
[27:41] bit once you put on the VR headset you
[27:44] don't want things to be overly overly
[27:46] bright
[27:48] um then in terms of
[27:51] lens flares I want their intensity to be
[27:54] zero lens flares at least for me they
[27:58] really mess up my perception of you know
[28:02] what's far what's close really gets into
[28:04] my eyes so I will tick mark those and
[28:07] make them zero intensity
[28:11] last thing or not lasting rather uh if
[28:15] we scroll down here to Global
[28:16] elimination method Lumen that's great
[28:18] and where we see Lumen Global
[28:21] illumination I will start messing around
[28:24] with these settings give me a second I
[28:28] will play around with this to see what
[28:30] works the best
[28:33] okay let's try this out so we are
[28:36] dealing with uh Lumen Global
[28:38] illumination set to lumens scene view
[28:43] distance at you a thousand millimeters
[28:46] or sorry a thousand centimeters which is
[28:49] uh 10 meters
[28:50] Max Trace distance also 10 meters
[28:54] lumenscene lightning update speed 0.5
[28:57] and final gather lighting update speed
[29:00] 0.5 those are the settings that I have
[29:04] changed here then in our project
[29:07] settings I have also worked on here
[29:11] if we go 444 back and most of the
[29:15] settings by the way are under rendering
[29:18] I have changed the
[29:21] the the
[29:23] where is it
[29:27] I have rather not changed but noticed
[29:30] that we are not using Ray tracing so I
[29:33] have uh
[29:36] am I blind
[29:39] hardwood retracing hello
[29:42] there we go support Hardware retracing
[29:44] that was tick marked but under Lumen I
[29:47] didn't use Hardware retracing when
[29:49] available so make sure that this one is
[29:51] sticked as well with those done
[29:55] we should be kind of good to go to test
[29:58] out if this is going to crash or not
[30:01] so let's see
[30:04] right now put on my headset
[30:08] takes a while
[30:12] okay how are we doing with the frame
[30:15] rate it says 45 I'm happy with 45.
[30:20] that's a stat
[30:22] uh GPU
[30:26] let's go for stat GPU and everything
[30:30] seems to be quite nice okay so we're at
[30:34] around 60 frames per second one trick
[30:37] that I am using is this scalability
[30:40] which you can enable if you go to your
[30:44] let's go here if you go to settings
[30:49] engine scalability settings and you play
[30:52] around with the scalability
[30:55] right here so I'm using medium for
[30:58] everything except for Global elimination
[31:00] where I use high let's see what happens
[31:02] if we go full blast with high for
[31:05] everything you can see by the way that
[31:07] the quality immediately jumps but also
[31:11] the frame rate immediately drops so
[31:14] we'll see uh let's press play again
[31:20] now we're at around
[31:23] how much is it 30
[31:25] all right yeah around 30 frames per
[31:28] second which is not ideal uh but if I
[31:32] wasn't recording this uh this video this
[31:36] would be just fine oh now we're back to
[31:39] 45 so maybe it was just a hiccup
[31:42] okay so now this in terms of light and
[31:46] Lumen we're kind of done uh now the next
[31:50] step is to actually introduce nanite
[31:52] into the scene and nanite is already oh
[31:55] by the way let's turn off the profiling
[31:58] so let me type in um tell the key that's
[32:02] right below the Escape key you have the
[32:05] tilde key and type in stat
[32:08] GPU
[32:10] to turn on or off the GPU profiling
[32:14] table then tell the key again stat
[32:17] unit
[32:19] to turn on and off the timings in
[32:23] milliseconds of the performance
[32:27] that unit let's turn that off and the FB
[32:31] FPS I will keep the FPS so that you can
[32:33] see it we're at around well actually now
[32:36] we're at around 60 well 50 which is
[32:40] great
[32:41] this is working just fine all right okay
[32:45] so with this done
[32:48] let's move on to our next step which we
[32:51] will call nanite everything and also
[32:54] import an actual project into this
[32:58] template
[33:01] all right so let's talk about nanite
[33:04] before we actually start importing
[33:06] things because here in this scene while
[33:09] nanite is indeed enabled it's not being
[33:13] used what I mean by that is if I go to
[33:16] the previous settings here which is
[33:19] currently lit and I go to nanite
[33:21] visualization and I choose triangles
[33:24] you can see that only these objects
[33:27] right here are running nanite everything
[33:30] else is not
[33:32] so we need to
[33:34] make sure that all of the objects here
[33:38] that we currently have in the scene is
[33:40] already nanite first of all what is
[33:42] nanite that is a dynamic
[33:46] um geometry optimization tool which
[33:49] works like magic that Unreal Engine
[33:52] people have developed which enables us
[33:55] to have really high
[33:57] complexity models and are seen without
[33:59] sacrificing too much of performance
[34:03] so before we move on I will delete a
[34:08] bunch of stuff here in the in the scene
[34:12] because I don't need it
[34:14] and I will just keep
[34:17] um just the platform
[34:23] there we go
[34:24] just the platform you know and there's
[34:26] this kind of a playing area here just so
[34:29] that we can carry around some stuff
[34:31] later down the line into the interior of
[34:34] our house so everything that is left I
[34:37] want to make it into nanite how do you
[34:39] do that well for for instance this
[34:42] object right here which is floor right I
[34:46] can just navigate to where the static
[34:49] mesh is which is SM Cube I click on this
[34:53] browse to
[34:55] um
[34:56] SM cube in content browser there we go
[34:59] and it's going to show me all of the
[35:02] objects here that you know are used in
[35:05] this scene I think most of them so I'll
[35:08] just select all of them
[35:10] holding down the shift key
[35:12] right click on them
[35:14] and where it says nanite
[35:17] I will enable that
[35:19] tick mark that
[35:21] right
[35:24] takes a little bit of time recalculates
[35:29] uh let's just double check yep that is
[35:31] Tick marked great now if I go to nanite
[35:35] visualization
[35:36] triangles I can see that indeed these
[35:41] objects
[35:42] are now nanite there is one object that
[35:46] is not though and that is the gun so
[35:50] let's select well let's go to LIT mode
[35:52] Let's select the gun and in this case
[35:54] the pistol is actually a blueprint right
[35:59] so we can't directly access its 3D model
[36:03] through here we need to actually go into
[36:06] edit pistol right here
[36:09] which will open up the blueprint of it
[36:12] and where we see skeletal mesh gun
[36:18] where is it but there we go skeletal
[36:21] mesh gun
[36:22] under mesh we can navigate to it
[36:28] see so skeletal mesh
[36:31] skeletal mesh acid that is being used I
[36:33] click on this browse too and now if I
[36:36] close this in my
[36:39] um
[36:41] how do I say this in in in my
[36:44] um
[36:45] content browser this gun mesh will be
[36:49] selected you can right click on it
[36:52] and then remember that it actually
[36:55] cannot be nanite because it's a skeletal
[36:58] mesh
[37:00] I'm being stupid
[37:03] never mind so we we keep it the way it
[37:05] is we don't change it to nanite
[37:08] ah and it's me who's recording a course
[37:11] huh forgetting that skeletal meshes
[37:14] cannot be nanite
[37:16] anywho let's start importing things and
[37:20] changing them into nanite as well so to
[37:23] import
[37:24] um we will be using data Smith for that
[37:27] because I'm a rhino user myself and all
[37:29] of my 3D models are in Rhino and in
[37:32] architectural
[37:33] um like
[37:34] field you usually either use Rhino or
[37:37] Revit or archicad so you will be using
[37:40] data Smith first of all you need to make
[37:42] sure that data Smith is used in
[37:46] your project so you go to settings
[37:48] plugins
[37:50] type in data Smith
[37:54] and make sure that data Smith CAD
[37:56] importer is Tick marked if it wasn't
[38:00] tick Market restart your project here
[38:03] safe selected it's going to restart and
[38:06] then you can see all of my recordings
[38:08] for this course already a lot of ticks
[38:13] so once it resets then restarts then you
[38:18] will have your data Smith import option
[38:22] right here well sorry under
[38:26] here in the top add quickly add to the
[38:29] project data Smith file import already
[38:32] covered this in the previous video
[38:35] um the introduction to Unreal Engine 5
[38:38] for architectural visualization so if
[38:40] you want to learn more about this make
[38:43] sure to check out that video so I'll
[38:46] click on file import
[38:47] actually sorry before I do that I will
[38:50] create a new folder in the content
[38:53] folder just call it a folder called it
[38:56] house
[38:58] there we go double click there
[39:00] and now under a quick a quick add button
[39:06] data Smith file import I will navigate
[39:08] to one of my buildings that I use for
[39:14] rendering examples
[39:16] I think we will use the same one as what
[39:18] we did for the last previous course
[39:23] so under Unreal Engine file data Smith
[39:26] base model there we go open up that one
[39:28] navigate to the house folder hit OK
[39:32] asks us what do we want to import in my
[39:36] case it's only the geometry I click on
[39:38] import
[39:39] and it's going to
[39:41] slowly get everything in here
[39:45] give it a second
[39:48] these files by the way I keep pushing
[39:51] this I know but they are available to
[39:54] patreon supporters there were some
[39:57] issues let's see the message log
[40:01] can't find one mesh that's fine that's
[40:04] probably just my my mistake anyway
[40:08] so now this uh model gets imported it's
[40:12] pretty far out so let's just select one
[40:16] of the objects here press F to zoom in
[40:18] here it is and it's climbing right on
[40:22] top of our nice little platform right
[40:26] so I need to move it slightly away or I
[40:30] need to move the platform away in this
[40:32] case I will do that with the model so
[40:34] here in my
[40:36] outliner I will choose base model right
[40:40] here because that is the main kind of
[40:44] compartment main folder that holds all
[40:47] of the geometry so base model and I will
[40:51] just move it away maybe to here
[40:55] something like that
[41:01] I prefer
[41:03] yeah I prefer this
[41:05] something like that instead
[41:08] okay great so now uh there are a few
[41:11] things that I want to fix uh thing
[41:14] number one is this platform right here
[41:16] this box right here I want its size to
[41:20] be different I don't want it to be that
[41:23] big I don't want it to climb into the
[41:26] house so here for the scale I will just
[41:29] simply change the X scale of it
[41:33] so that it stops
[41:35] right before the Terrace
[41:37] and maybe we can even make it
[41:40] even smaller something like that
[41:45] and please stop
[41:48] before
[41:50] that there is Begins the ball should be
[41:54] somewhere here maybe
[41:57] okay
[41:59] just small adjustments bear with me I
[42:02] want it to be
[42:03] neat and tidy
[42:07] there we go okay so that's done that's
[42:10] our post processing volume that can just
[42:13] live somewhere actually that can live
[42:15] anywhere in the scene I will just have
[42:17] it to the right
[42:19] um and our camera for navigation or for
[42:23] external view we can just change the
[42:27] angle of that camera to something like
[42:30] this yeah I should be fine okay
[42:33] I think we are kinda ready to start
[42:36] working on this geometry right here so
[42:39] our base model as it's imported uh as a
[42:45] data Smith file will have a geometries
[42:48] folder inside which we double click and
[42:51] here we have access to every single mesh
[42:54] that is used for this model so what I do
[42:57] is I select every single mesh I right
[43:00] click on them I choose to I choose data
[43:04] Smith sorry I choose nanite
[43:07] and I choose to enable nanite
[43:10] bam
[43:12] quickly really quickly recalculates
[43:16] the geometry to work with nanite
[43:20] okay great so that works then next thing
[43:24] to do is actually to find every single
[43:27] object that is within the glass layer
[43:31] this is important
[43:34] every single object that is within the
[43:36] glass layer
[43:39] we browse to those objects
[43:44] hello is it Rd selected
[43:49] let me give me a second I'm just gonna
[43:51] make sure that we are selecting them
[43:57] perhaps we are not
[43:59] uh while I'm while I'm investigating
[44:03] this
[44:05] oh they're right at the start well I'm
[44:07] investigating this um the reason why
[44:10] yeah okay we're not selecting them the
[44:12] reason why uh we are fishing out the
[44:15] glass objects is because nanite
[44:17] currently at the time of recording
[44:20] cannot uh have translucency meaning that
[44:25] all of our objects that are glass these
[44:28] guys right here they need to not be
[44:31] nanite so I'll have this disabled
[44:35] or unticked
[44:37] please antique there we go
[44:41] all right so now uh I think we need to
[44:46] just check the performance if that is
[44:49] being hit to too much
[44:52] so let me turn on the headset
[44:58] okay airlink connection lost give me a
[45:01] second
[45:02] do that do that
[45:06] that
[45:10] one launch
[45:14] there we go
[45:16] and now I should be able to
[45:20] play this in VR okay how's our
[45:23] resolution
[45:26] that is not too bad this time around
[45:29] let's walk
[45:31] so if I try to walk right now
[45:34] uh
[45:38] am I
[45:41] yeah there we go if I try to walk right
[45:44] now I'm I'm able to wait am I talking
[45:47] into the microphone I'm able to walk
[45:50] right up until the end of this platform
[45:54] but I can't walk any further and that is
[45:57] for a good reason there is no navigation
[45:59] mesh meaning that the I really want that
[46:03] gun meaning that the
[46:06] uh game does not enable us to walk also
[46:12] one more thing notice the collisions
[46:13] they are not
[46:16] they're not working right well first of
[46:18] all the the
[46:21] gun bullets don't bounce around we will
[46:23] fix that in just a second but also if I
[46:27] were to walk towards there
[46:29] um the collisions wouldn't be accurate
[46:31] so I need to change two things before we
[46:35] can say that the geometry has been
[46:37] successfully imported
[46:40] first thing to change is the the
[46:44] collisions so again selecting every
[46:47] single piece of geometry in our scene
[46:52] just like that right click
[46:55] right click on them
[46:57] not in our scene but in our imported
[47:00] scene I will choose to I will choose
[47:04] asset actions and I will choose to
[47:08] bulk edit via property Matrix right here
[47:13] this enables us to edit the for instance
[47:16] the collisions in this case for every
[47:18] single piece for all 1681 static meshes
[47:24] so I'll go to
[47:27] the attic mesh I believe I'll just type
[47:30] in Collision Double L T O L L engine
[47:36] Collision
[47:37] uh Collision complexity
[47:40] instead of project default we choose use
[47:42] complex Collision as simple
[47:47] like that so that means the geometry of
[47:51] these static meshes R is going to be
[47:53] used to calculate the Collision
[47:56] which is quite important
[47:59] I save all
[48:01] while see wall once it's done you can
[48:04] close it and move on
[48:06] so
[48:08] that's step one making sure that the
[48:10] Collision Works step two is going to be
[48:13] making sure that the the the the
[48:16] in that we're able to navigate uh to the
[48:20] mesh or to the building right so with
[48:24] this closed let's
[48:27] check out the navigation
[48:30] if we look closely
[48:34] which we won't but let's try yeah there
[48:38] we go that's the navigation mesh bounce
[48:42] right here
[48:44] there is this actor called nav mesh
[48:46] bounds this this actor if I remember
[48:50] correctly is a g no it's not g uh uh
[48:56] is a tab
[48:58] no it's not tab caps locked no
[49:00] oh no uh one second I need to check or
[49:06] actually we can just do this
[49:08] um for perspective we can choose
[49:10] cinematic View and it should show us no
[49:14] never mind it doesn't okay give me give
[49:16] me a second
[49:18] hey I've just simply forgot it's the
[49:22] letter p
[49:23] as in pineapple if you press that
[49:28] if you press that there we go it shows
[49:31] you what that navigation volume is going
[49:35] to be well navigating I guess so where
[49:39] you will be able to move around so in
[49:43] our case we want to take that volume and
[49:45] move it slightly over here
[49:49] something like that
[49:51] maybe a bit larger here and we just want
[49:56] to make sure that we're able to navigate
[49:58] inside of this room right all throughout
[50:04] and also around the building so I need
[50:07] to actually make it a little bit bigger
[50:09] which you can do by is it no it's not
[50:15] changing the scale
[50:16] or is it
[50:18] now I'm scared no no it's brush settings
[50:20] yeah it's brush brush settings changes
[50:23] the size of it right
[50:26] so that's X that's why
[50:30] like that
[50:33] something like so and the set we will
[50:36] work with the set in just a little bit
[50:39] but does that basically controls
[50:43] um how how far
[50:46] you can move right so not not how far
[50:49] you can move but uh how high up you can
[50:52] move so
[50:53] if I were to increase the set here in
[50:56] this case for instance the table
[50:59] uh if I increase the set to
[51:03] 2 meters then we can also jump on the
[51:07] table in our case we probably don't want
[51:09] it so I'll make it a little bit less
[51:12] like 50 centimeters there should be
[51:15] enough for us to be able to navigate
[51:17] through most of it even on top of the
[51:21] sofa which I kinda dislike so let me do
[51:25] it a little bit less 20.
[51:28] okay 20 is a mistake 30.
[51:32] 40 there we go
[51:35] 40 gives us the possibility to move
[51:38] around most of it and end kind of the
[51:41] sofa as well
[51:42] it's actually fine oh but uh also since
[51:46] this platform is raised we're not able
[51:50] to move
[51:51] here outside so we actually do need to
[51:54] have it pretty high up
[51:58] let's go for 70 then
[52:04] whatever I'll use 100 that's fine
[52:08] okay so that kind of concludes or and
[52:12] press P2
[52:13] to stop the preview
[52:16] that kind of concludes the import
[52:18] portion let's just check if it works and
[52:22] if I didn't make any mistakes and if the
[52:24] frame rate is still acceptable
[52:27] uh press play
[52:31] how are we
[52:33] kind of good kind of good and gonna lie
[52:36] oops sorry about that
[52:40] um you can see me putting on the
[52:44] my hands
[52:47] um so now let's do this let me move
[52:50] slightly away so that I have more
[52:53] more room of course the microphone is
[52:56] right at the uh
[52:58] come on
[53:00] table as well there we go the microphone
[53:03] was right yes right in front of me so
[53:06] it's a little bit annoying but now if I
[53:09] just
[53:10] ah throw it you can see the bounce right
[53:12] uh let me let me do that again ah come
[53:15] on come on where is it
[53:18] no
[53:19] no
[53:21] okay usually you do this in a room
[53:24] rather than by by the computer so so you
[53:28] want like a free
[53:31] a lot of free space for experimentation
[53:34] the
[53:36] this still does not work that's because
[53:39] the problem is in the bullets right off
[53:41] of this gun it's not the problem with
[53:44] the with the collisions of the house
[53:46] because you saw that on the freaking the
[53:50] box for instance come on
[53:53] there we go you can see that it bounces
[53:55] quite quite well okay let's go around
[53:59] and see
[54:04] yeah it seems like the exposure Works
[54:06] quite well
[54:11] I know I I look like an idiot and right
[54:14] now I hate how people look like with VR
[54:16] headsets on but hey it is what it is
[54:19] okay so the house looks fine
[54:22] um I will be texturing it next up and we
[54:26] will be going inside of it because right
[54:29] now if I go inside of this house that's
[54:32] not gonna be not gonna be great let's
[54:35] see if I'm gonna be able to
[54:39] come on
[54:43] no it doesn't catch it
[54:45] um maybe
[54:46] maybe if we go here
[54:50] there we go
[54:52] so now I'm inside of the of the house
[54:55] you can see automatic exposure kind of
[54:58] starts picking up but the fact that it
[55:02] does not have any openings
[55:05] uh really messes with it so that's the
[55:08] next thing that we're gonna gonna be
[55:10] fixing all of this is gonna be glass
[55:12] okay
[55:14] Next Step let's go it's gonna be
[55:17] materials
[55:23] alrighty then let's talk about materials
[55:25] now so in terms of VR applications the
[55:29] materials are pretty straightforward
[55:31] it's the same approach as what you would
[55:34] do for any architectural visualization
[55:36] project
[55:38] except for glass glass is still quite
[55:42] quite expensive so I will show you how
[55:45] to create a
[55:46] you know a cheapest so to say in
[55:49] performance wise glass material that we
[55:52] can
[55:53] so under our content folder I'll just
[55:56] create a new folder call it materials
[56:01] double click that and here just right
[56:05] clicking on the empty space I'll choose
[56:08] to create a new material
[56:10] like so call it Glass Master
[56:15] great
[56:17] now double clicking this material a new
[56:21] tab is opened that I can drag and drop
[56:24] right here dock it so that we have two
[56:27] tabs here available for us and in this
[56:30] Glass Master material preset uh or not
[56:34] preset just material we're going to
[56:37] apply the base color the specularity if
[56:41] I remember no sorry base color metallic
[56:44] how metallic it is the roughness
[56:47] and the opacity as you can see the
[56:50] opacity is not available for us
[56:53] currently so we need to change our
[56:57] material blending mode
[57:00] from opaque to translucent
[57:05] there we go
[57:07] once we've done that now the opacity is
[57:11] possible but the problem now is that
[57:14] everything else is kind of kind of gone
[57:17] right so I need to change the shading
[57:20] model
[57:21] or sorry the not the shading the
[57:23] lighting model
[57:28] lighting mode from volumetric
[57:30] non-directional into
[57:32] surface translucency volume like that
[57:38] okay
[57:40] so now uh what kind of a color base
[57:44] color and so on do we want well I'm just
[57:46] going to create
[57:48] a few numbers here because we'll go
[57:50] grayscale so all we need is just single
[57:54] values between zero and one so for the
[57:56] base color let's just hold down the key
[57:59] number one or key one
[58:03] on in your keyboards press 1 and hold it
[58:06] and click your mouse this will create
[58:09] this parameter node
[58:12] or not parameter sorry this scalar node
[58:16] you can also type in here right click
[58:19] here anywhere on the screen and type in
[58:21] constant
[58:23] sorry I just woke up I I need a minute
[58:26] you type in constant and you can choose
[58:28] that it's the same thing right
[58:31] so the shortcut for it is just holding
[58:34] down the key number one and pressing
[58:36] your mouse button okay and here I'm just
[58:40] going to change this into a parameter so
[58:44] I'm going to right click on my my
[58:47] constant node and convert it to
[58:50] parameter like that and call it
[58:54] um
[58:58] base
[59:00] color
[59:02] there we go this color connect there
[59:06] now I'm going to copy this base color
[59:10] node Ctrl C Ctrl V
[59:13] and drag it just a little bit down
[59:15] I'm going to select it and here on the
[59:19] right hand the left hand side under
[59:21] parameter name I'm going to change this
[59:22] to metallic
[59:28] and connect it like so
[59:30] and that's the name of the game we need
[59:31] two more nodes one for roughness and one
[59:33] for opacity so I'm just going to borrow
[59:35] these two drag them all the way down
[59:38] here
[59:39] one is going to be connected to
[59:41] roughness one is going to be connected
[59:43] to opacity and I just changed their
[59:45] names
[59:47] roughness
[59:50] and I'm lazy so I'm just gonna say oppa
[59:54] oppa for opacity okay
[59:56] what kind of values do we want to work
[01:00:00] with
[01:00:01] well for base color and metalness or how
[01:00:05] metallic it is we want once so I'm just
[01:00:07] going to say that the default value is 1
[01:00:10] here and one here
[01:00:12] right then for our roughness we want it
[01:00:16] to be
[01:00:17] slightly less rough
[01:00:20] um or sorry not perfectly smooth
[01:00:23] slightly rough so I will go for
[01:00:27] uh
[01:00:29] 0.96 something like that
[01:00:34] or is it a other way around is it 0.04
[01:00:38] well we'll figure it out
[01:00:40] and then for opacity I will go for just
[01:00:43] slight little Peak 0.1
[01:00:48] you can barely see let me go for 0.2 so
[01:00:52] that you can see better 0.2
[01:00:55] can kinda see the glass right here it
[01:00:59] does not change it does not bend the
[01:01:02] light it does not do anything because we
[01:01:04] will be using it just for the
[01:01:07] flat sheets
[01:01:10] right so we don't need it to to do
[01:01:12] anything more than what it's doing right
[01:01:14] now actually the roughness let me see
[01:01:19] yeah okay so 0.1 roughness creates the
[01:01:22] reflection much better
[01:01:24] um sorry it was it needed to be opposite
[01:01:27] so
[01:01:27] 0.06 right
[01:01:30] something like that for the roughness I
[01:01:32] was thinking of glossiness so again one
[01:01:36] for base color one for metallic 0.06 for
[01:01:39] roughness and 0.2 or
[01:01:42] I would say 0.1 for opacity
[01:01:45] let's save that
[01:01:49] close that
[01:01:51] let's create a derived material instance
[01:01:54] from this Glass Master material I'm just
[01:01:57] going to create a new folder call it
[01:01:58] instances
[01:02:02] right click on my Glass Master material
[01:02:05] and choose to create material instance
[01:02:07] like that
[01:02:09] call it glass
[01:02:11] just glass
[01:02:13] and drag it over or move to my instances
[01:02:17] folder like so
[01:02:19] okay great now let's apply the glass
[01:02:22] material to our windows so to do so I'm
[01:02:26] just going to select one of the windows
[01:02:28] and immediately on the left hand right
[01:02:31] hand side it gives me the glass layer
[01:02:36] where all of my windows are placed that
[01:02:39] is because in Rhino as I was modeling it
[01:02:43] I was I placed all of the
[01:02:46] um geometries that will be glassed
[01:02:48] preemptively into one layer
[01:02:51] and just drag and drop in my glass
[01:02:54] material after selecting all of them
[01:02:56] into this material tab right here
[01:03:00] bam
[01:03:04] and then we have questions I guess why
[01:03:07] the hell is this not working I'll the
[01:03:11] first assumption that I have is that
[01:03:14] these geometries are still nanite and
[01:03:17] nanite does not deal with transparency
[01:03:19] or translucency let me double check so
[01:03:22] this guy right here I just click on this
[01:03:25] browse to Europe 17 in content browser
[01:03:29] button right click it in the content
[01:03:31] browser go to nanite and yes indeed
[01:03:34] nanite is enabled for it so if I untick
[01:03:38] nanite or if I disable nanite
[01:03:40] you can see that now the translucency
[01:03:42] actually works let me just check one
[01:03:45] thing real quick to see if maybe in 5.2
[01:03:49] they already fixed it so here in my
[01:03:52] Glass Master material if I type in
[01:03:54] nanite
[01:03:56] yeah okay used with nanite that's tick
[01:03:59] marked and unfortunately yeah
[01:04:02] unfortunately uh it still does not the
[01:04:06] translucency still does not work with
[01:04:07] nanite that's okay
[01:04:09] okay so what we need to do is we need to
[01:04:12] disable nanite for all of the glass that
[01:04:14] we will have let me just quickly uh
[01:04:17] browse
[01:04:18] and I believe it starts in B rep 12 and
[01:04:22] ends in B rep 33 that's going to be
[01:04:27] B rep
[01:04:29] 33 like that right click nanite disable
[01:04:33] nanite we're done easy peasy lemon
[01:04:37] squeezy okay so that's glass yeah yeah
[01:04:40] we're that one we're done with uh the
[01:04:44] grass part now in terms of actually
[01:04:47] applying the photorealistic materials we
[01:04:50] will be using of course the quixel
[01:04:53] bridge
[01:04:54] this button right here
[01:04:57] quick sell Bridge
[01:04:58] which gives you this little tab right
[01:05:01] here if you don't know what this is
[01:05:03] again suggest looking at the beginner
[01:05:06] course Link in the video description but
[01:05:09] basically it's a library right a library
[01:05:11] of materials that you can use with not
[01:05:13] just materials assets as well that you
[01:05:15] can use with Unreal Engine
[01:05:19] so in my local already downloaded assets
[01:05:22] I have like a banana and stuff
[01:05:25] um and I have plenty of of geometries
[01:05:27] already downloaded and I'm just going to
[01:05:30] get a few of them in here so let's start
[01:05:33] with
[01:05:35] let's see floor yeah why not Chevron
[01:05:39] Walnut Park it
[01:05:41] export medium quality
[01:05:43] bam
[01:05:45] immediately arrives here we have our
[01:05:47] textures we have our material great
[01:05:49] we're good to go
[01:05:52] so here
[01:05:54] oh
[01:05:55] I'll select the floor I can see that I
[01:05:58] do have a how do you call it like a
[01:06:01] layer called Arquette or actor in this
[01:06:04] case
[01:06:04] and I all I need to do is just this
[01:06:08] material instance that we have
[01:06:10] downloaded I just drag and drop in to
[01:06:13] here
[01:06:14] give it a second it needs to
[01:06:17] calculate and now we're good to go now
[01:06:20] now we have a pretty convincing floor
[01:06:23] neat huh I like it all right so that's
[01:06:27] I'm going to of course not show you the
[01:06:30] whole process or rather I'm going to
[01:06:32] speed up through the whole process of me
[01:06:34] slapping on all of these materials uh
[01:06:37] but before I do so one last thing to to
[01:06:40] show is the assets so
[01:06:44] in VR we can't really have a lot of
[01:06:46] trees that's that's too heavy so instead
[01:06:50] we will need to do some sort of a more
[01:06:52] of a Icelandic landscape wipe instead of
[01:06:57] Forest wipe for this particular shot so
[01:07:01] let's go for home
[01:07:04] 3D assets
[01:07:06] nature
[01:07:08] I would say probably Rock
[01:07:12] volcanic
[01:07:14] [Music]
[01:07:17] yeah and we have like a bunch of
[01:07:18] Icelandic rock formations and and
[01:07:20] whatnot so I'm just going to
[01:07:23] I should probably just download one of
[01:07:25] these I already I think I already have
[01:07:27] one of these so let me just quickly now
[01:07:30] I just have forest floor huge Moss you
[01:07:33] rock embankment
[01:07:38] apologies for for making you wait
[01:07:41] everything that I have is
[01:07:44] um
[01:07:45] Forest based
[01:07:48] Forest Rocky embankment okay so I do
[01:07:51] indeed need to download something here
[01:07:55] through the assets again
[01:07:57] nature
[01:07:59] um let's just see embankment for a
[01:08:01] second
[01:08:04] Tundra
[01:08:05] uh Tundra Rocky ground we we can get
[01:08:08] that one in here
[01:08:10] why not
[01:08:13] okay so I will just
[01:08:16] select it
[01:08:18] make sure that you first select it and
[01:08:20] you change the quality from medium into
[01:08:23] nanite
[01:08:25] nanite I click click on download
[01:08:30] now it's going to take a little bit of
[01:08:32] time to download because this is not you
[01:08:34] know a lightweight piece of geometry so
[01:08:37] make sure that as you're downloading
[01:08:39] these guys that you are not
[01:08:42] um what's the good good word
[01:08:47] you're not over exerting or you're not
[01:08:50] over complicating things so you say you
[01:08:53] don't have too many elements different
[01:08:56] elements because even with this single
[01:08:59] patch you can create a pretty varying
[01:09:01] scene by just simply copying this patch
[01:09:04] right the more of these different
[01:09:06] patches you have the more complex
[01:09:10] and or or the more requirements that the
[01:09:14] scene will have and the more your
[01:09:16] graphics card will suffer
[01:09:18] while it's doing that thing I'm going to
[01:09:21] also
[01:09:23] actually Mossy Forest ground that's kind
[01:09:25] of no never mind I'm going to download
[01:09:28] this one
[01:09:32] and maybe this one as well
[01:09:35] these three
[01:09:40] okay well while it's doing its thing
[01:09:43] let's go to local
[01:09:46] and let's let's just see if there is any
[01:09:49] kind of uh well that's wall but we might
[01:09:53] be able to use that
[01:09:55] um any kind of materials that we can
[01:09:57] already kind of get up on our geometries
[01:10:01] for instance the roof the slate roof I'm
[01:10:04] going to export by the way the materials
[01:10:06] are in medium quality
[01:10:09] um
[01:10:10] it's just that the the
[01:10:14] difference between medium and high
[01:10:16] material quality is not
[01:10:20] big enough for me to say that the
[01:10:23] graphics card should take the hit
[01:10:26] so same okay so we have our
[01:10:31] tiles here and I'm just going to put up
[01:10:34] the roof
[01:10:36] and voila we have now our slate roof
[01:10:42] as easy as that let's check if the 3D
[01:10:45] model has downloaded
[01:10:48] probably has
[01:10:51] a filter types 3D assets
[01:10:57] do we really need to restart
[01:11:00] for it to register
[01:11:02] okay fine we're gonna go the the long
[01:11:05] way oh never mind they just downloaded
[01:11:10] come on show me yeah there we go Tundra
[01:11:12] Rocky ground export tonight
[01:11:16] it gives us the nanite mesh in here it's
[01:11:20] going to prepare it and once it's done
[01:11:22] we can just slap on oh sorry that's the
[01:11:27] material instance make sure that you're
[01:11:28] not applying the material instance
[01:11:30] instead you're taking the static mesh or
[01:11:33] within your mega scans 3DS tender Rock
[01:11:35] You just drag and drop it in
[01:11:38] something like that
[01:11:42] and shall we take a look at it at its
[01:11:45] quality
[01:11:47] and also add a hit in the in the
[01:11:50] performance that it's going to give us e
[01:11:53] to rotate by the way W to move
[01:11:57] R to scale
[01:12:00] something like that
[01:12:06] one second I'm going to grab my
[01:12:17] and grabbing the headset
[01:12:24] mm-hmm
[01:12:28] okay
[01:12:35] we should be able to to play now
[01:12:39] it's still loading
[01:12:42] um if I just zoom in here you can see
[01:12:44] that the quality of the asset is pretty
[01:12:46] damn good but we need to make sure that
[01:12:50] it does not lag out our VR
[01:12:54] um application so let me press play
[01:12:58] how does this look
[01:13:00] okay looks pretty good
[01:13:03] um let me just do a quick
[01:13:05] um
[01:13:07] that FPS
[01:13:11] and Stat unit
[01:13:16] okay
[01:13:17] so we're at 45 frames per second with
[01:13:20] recording the video meaning without
[01:13:22] recording the video we would be closer
[01:13:24] to 60. and if I'm looking at the ground
[01:13:30] we're maintaining
[01:13:33] we're maintaining the 45 frames per
[01:13:35] second let's look at the the glass if
[01:13:38] that is
[01:13:42] yeah
[01:13:44] that also retains
[01:13:49] nice that also retains the 45 frames per
[01:13:53] second I'm happy with that okay one more
[01:13:56] test and then we will do fast forward
[01:14:01] I'm just going to take this take this
[01:14:03] mesh
[01:14:05] and holding down the ALT key
[01:14:07] I'm going to make a copy of it
[01:14:11] e key I'm going to rotate it
[01:14:16] like that or maybe even like that
[01:14:25] place it right here
[01:14:28] then maybe one more ALT key
[01:14:36] w
[01:14:41] I just want to see if having six of them
[01:14:45] for instance
[01:14:50] if that is going to destroy the
[01:14:52] performance or not
[01:14:54] this will inform me if I
[01:14:58] can use nanite meshes to tile the whole
[01:15:03] environment
[01:15:04] so let's try this again
[01:15:07] we were at 45
[01:15:11] I can't see where am I press play
[01:15:19] come on
[01:15:21] okay that took a while to load in it
[01:15:25] seems like there is a little bit of
[01:15:27] screen tearing in one of the eyes
[01:15:31] that's the wrong arm sorry
[01:15:35] let's see if that is
[01:15:43] seems to be okay except for uh a glitch
[01:15:47] in one eye which I think is due to this
[01:15:52] might not be yeah you don't even see it
[01:15:54] on the screen this might be actually due
[01:15:58] to the recording
[01:16:00] um so I'm going to stop the recording
[01:16:02] right now and I'm going to check just
[01:16:04] simply check if
[01:16:07] um
[01:16:09] if it still messes up and if it does
[01:16:12] then we will need to investigate but if
[01:16:14] it doesn't then it's from now on it's
[01:16:16] going to be a fast forward of me
[01:16:18] applying the materials the the process
[01:16:20] is the same download slap on download
[01:16:23] slap on until the environment is pretty
[01:16:39] foreign
[01:16:39] [Music]
[01:17:34] foreign
[01:17:49] but we do have ourselves a little bit of
[01:17:54] an environment that should be good
[01:17:56] enough for me to kind of show you that
[01:18:00] we indeed can use nanite with
[01:18:03] VR and now before we finish with the on
[01:18:08] the materials and assets side I kind of
[01:18:10] want to just show you the
[01:18:13] the gun part and how you can use that to
[01:18:16] really explore the possibilities of
[01:18:19] lumen so let me press play what we're
[01:18:22] gonna try doing now is create Collision
[01:18:26] for these bowls that it's shooting and
[01:18:30] also
[01:18:33] and also try our best to to create a
[01:18:37] material that shines light so the balls
[01:18:40] would shine light
[01:18:42] so one second
[01:18:46] so in terms of the
[01:18:48] the material first of all I guess all we
[01:18:52] need to do is just go to our materials
[01:18:55] tab create a new or folder create a new
[01:18:57] material call it emissive
[01:19:02] there we go
[01:19:04] go in here change the base color to
[01:19:09] um actually whatever whatever color you
[01:19:11] want and change the emissive color to
[01:19:14] whatever color you want so I'm going to
[01:19:16] use constant
[01:19:19] 3 Vector for
[01:19:22] the base color which actually does not
[01:19:25] really matter so it can just be black
[01:19:27] because black body will shine light
[01:19:30] either way
[01:19:33] like that copy paste plug that one into
[01:19:37] actually we choose a color
[01:19:40] let me explain this better we choose a
[01:19:43] color for the emissive right so that's
[01:19:46] the color that is going to shine this
[01:19:48] Blackboard is going to shine so I'm just
[01:19:50] going to choose whatever color there is
[01:19:51] like that pink sure
[01:19:55] like that
[01:19:56] and also I will apply strength so that's
[01:19:59] how strong the emissive material is
[01:20:01] going to be so I'm going to multiply
[01:20:05] multiply by a constant
[01:20:08] all right so that's again me holding
[01:20:10] down the number one clicking and
[01:20:12] creating a constant node here connect
[01:20:16] there
[01:20:19] we go
[01:20:20] there we go
[01:20:20] and now we apply it or connected to a
[01:20:24] music color since the constant right now
[01:20:25] is set to zero that's not no good so I'm
[01:20:28] just going to change the constant to
[01:20:31] well actually let's make it parameter
[01:20:34] and call it strength or emissive
[01:20:38] strength
[01:20:41] and change the color convert to
[01:20:43] parameter call it color
[01:20:45] here we go
[01:20:47] save that
[01:20:49] close that let me hide the
[01:20:54] nanite all nanite meshes so that's a
[01:20:58] little bit faster
[01:20:59] than for this emissive material I'm just
[01:21:03] going to duplicate it
[01:21:05] or sorry not duplicated my bad my bad we
[01:21:08] don't do that we don't do that I'm going
[01:21:09] to right click create material instance
[01:21:11] and call it
[01:21:13] um
[01:21:14] emissive one
[01:21:17] mr1 just drag it into my instance folder
[01:21:21] like that move there
[01:21:23] double click
[01:21:24] it's now here double click on it and
[01:21:27] let's edit our material instance so I'll
[01:21:29] tick mark the means of strength as well
[01:21:31] as the color and as I'm increasing the
[01:21:33] strength you can see that first it gets
[01:21:35] a color and then
[01:21:37] is going to start Shining Light so I'm
[01:21:41] going to go for something like 20.
[01:21:43] um I have no idea if that is strong
[01:21:45] enough but we will try
[01:21:47] and now I want the bullets that these
[01:21:50] guns are shooting to first of all bounce
[01:21:53] and then to be uh using this emissive
[01:21:56] one material so I'm going to select one
[01:21:59] of the guns
[01:22:00] I'm going to go into its uh blueprint
[01:22:03] edit pistol
[01:22:05] right here and here just by reading the
[01:22:08] blueprint I can see that um
[01:22:12] spawn the projectile there we go spawn
[01:22:15] actor projectile class projectile so
[01:22:17] it's basically every time you press the
[01:22:19] button it spawns this actor of this
[01:22:22] class so I'm going to click on this
[01:22:24] browse icon right here
[01:22:27] and it immediately gives me where that
[01:22:29] actor is located in our content browser
[01:22:32] as per usual I will double click on it
[01:22:35] and here I can change anything I want
[01:22:38] about the projectile right so
[01:22:42] just seeing looking at what we have here
[01:22:45] we have sphere Collision that's perfect
[01:22:47] we have static mesh
[01:22:49] great and we have projectile movement so
[01:22:53] to make it bounce it's actually super
[01:22:55] simple you go to projectile movement and
[01:22:57] here on the right hand side you should
[01:22:59] tick mark should bounce that's it and
[01:23:02] then to change the material you go to
[01:23:04] static mesh and you change element 0
[01:23:06] material to emissive
[01:23:10] one
[01:23:13] like that compile save
[01:23:17] and just in case you have that one as
[01:23:19] well
[01:23:20] press play okay uh fine this works and
[01:23:25] now with this book
[01:23:29] yay well those guys don't have Collision
[01:23:32] or you kind of do don't they a little
[01:23:35] bit but you don't have accurate
[01:23:37] collisions so that won't work but now we
[01:23:40] have ourselves like a gun that can shoot
[01:23:43] stuff that is let's go there
[01:23:47] um
[01:23:48] a gun that can shoot
[01:23:51] uh
[01:23:54] stuff that you should shine light
[01:23:59] how cool is that
[01:24:01] let's go to somewhere dark
[01:24:09] nice huh
[01:24:11] kinda like it
[01:24:13] uh hello where am I oh we're in the
[01:24:16] bathroom
[01:24:22] they do have a like a lifespan course
[01:24:27] it's a nice bathroom isn't it
[01:24:31] oh
[01:24:40] all right so that works
[01:24:43] um but
[01:24:45] put it in there okay now we since we're
[01:24:49] done with this this part next up is
[01:24:52] going to be us creating the
[01:24:55] like a blueprint to open an open source
[01:24:58] which is super
[01:25:00] I have to go for more Dynamic uh more
[01:25:04] Dynamic things yay okay I'll see you in
[01:25:08] the next chapter
[01:25:12] okay actions let's make it possible to
[01:25:16] open up a door with one of these right
[01:25:20] let's say a trigger button like so
[01:25:23] so to do so we need to First be able to
[01:25:27] understand where
[01:25:29] we're pointing for unreal to understand
[01:25:32] where we're pointing when we are
[01:25:35] actually pushing the trigger and and so
[01:25:37] on and with Unreal Engine 5.1 I believe
[01:25:41] or 5.0 uh now we are using enhanced
[01:25:46] action mapping I believe it's called
[01:25:49] which has a little bit different of a
[01:25:52] system for actions and like recording
[01:25:56] keys and and whatnot so
[01:26:00] this one is going to be a little bit
[01:26:02] more of a follow along
[01:26:04] the first thing that we need to do is we
[01:26:06] need to create an action that will be
[01:26:10] mapped to us actually pressing the the
[01:26:14] button right there
[01:26:15] so to do so let's go to our VR template
[01:26:20] let's go to
[01:26:23] it should be under input there we go
[01:26:26] perfect under input we have all of the
[01:26:29] different states in which
[01:26:32] the inputs are registered the default
[01:26:35] state is the one in which we are spawned
[01:26:38] into and weapon state is when we are
[01:26:41] holding a weapon so the different inputs
[01:26:44] change what they do when you're holding
[01:26:46] the weapons in this case we will be
[01:26:48] editing the default state but not just
[01:26:50] yet
[01:26:51] first of all we'll go into actions
[01:26:55] and we will create two actions so I'll
[01:26:59] right click
[01:27:00] I'll choose input
[01:27:03] input action
[01:27:06] and here I will name it r underscore
[01:27:13] interact or sorry let's just do a input
[01:27:18] action I a underscore
[01:27:21] oh you don't see it uh my bad my bad my
[01:27:24] bad there you go I a underscore
[01:27:28] interact
[01:27:31] right
[01:27:34] IA underscore interact underscore right
[01:27:37] hit enter
[01:27:39] double click it
[01:27:40] you will see all of the different
[01:27:42] settings that that action can have we
[01:27:45] don't really need to change anything
[01:27:48] about this at least to let me actually
[01:27:51] double check I don't think we need to
[01:27:54] change consume input yeah all of this is
[01:27:57] fine so we can just close this you don't
[01:27:59] even need to open it up
[01:28:01] okay so we have our indirect right
[01:28:03] action
[01:28:04] and now I'm going to just duplicate it
[01:28:07] like that and call it IA interact left
[01:28:11] you can also just create a new new
[01:28:13] action and name it that way doesn't
[01:28:16] really matter but we have IA interact
[01:28:19] right IA interact left okay great to
[01:28:23] call these two actions we need to go
[01:28:25] back to our input folder and where we
[01:28:28] have input how is it called mapping
[01:28:31] context input mapping context underscore
[01:28:33] default if we double click that
[01:28:37] then we will have all of our
[01:28:40] different mappings right here so I a
[01:28:44] move turn and if I expand that you can
[01:28:46] see that for Oculus touch a thumbstick
[01:28:50] thumbstick y-axis makes us move right so
[01:28:55] here we actually need to add our two new
[01:28:58] mappings to do so I just click this
[01:29:01] little plus button right here
[01:29:03] there we go new app new mapping was
[01:29:06] added I'll expand this and I'll just
[01:29:09] type in IA underscore interact
[01:29:12] and let's start with the left one
[01:29:15] left there we go
[01:29:18] direct left
[01:29:20] okay with this done now I need to
[01:29:23] actually say what triggers the left left
[01:29:28] interaction or or interaction of the
[01:29:30] left arm so I need the correct left
[01:29:34] controller like so
[01:29:37] and basically it's going to be this
[01:29:39] trigger right so expanding this I can go
[01:29:43] to my Oculus touch
[01:29:46] and find a Oculus touch left trigger
[01:29:51] axis
[01:29:53] right here
[01:29:55] there we go
[01:29:57] so once I press this button in the
[01:30:01] default setting the interact left the
[01:30:03] left action will be called forward
[01:30:07] I will repeat this for the right hand
[01:30:10] side
[01:30:11] so for the right hand side we
[01:30:14] one more second
[01:30:16] no nothing else needs to be changed okay
[01:30:18] so for the right hand side I just create
[01:30:20] a new one choose here
[01:30:23] interact right
[01:30:27] and there we go and Oculus touch
[01:30:31] are
[01:30:33] uh where's where's trigger axis there we
[01:30:36] go
[01:30:36] once that is done we just save close now
[01:30:39] we have the two actions uh actually made
[01:30:42] and ready ready to go so how do we call
[01:30:45] them well we should call the actions
[01:30:49] inside of our player character or player
[01:30:52] Pawn the player Pawn is located under VR
[01:30:55] templates
[01:30:57] blueprints VR on right here
[01:31:01] double click that
[01:31:04] and this whole Behavior chain or menu
[01:31:08] will pop pop in and just to kind of
[01:31:11] explain let's see here enhanced input
[01:31:15] action I a turn
[01:31:17] uh if it if you start that action then
[01:31:20] your character will the turn will snap
[01:31:23] to the right so you're you're turning by
[01:31:27] I believe that is going to be 90 degrees
[01:31:30] or maybe it's a smooth turn I'm not sure
[01:31:33] I don't remember sorry uh I believe it's
[01:31:36] it snaps to 90 degrees right
[01:31:39] so stuff like that so we're creating
[01:31:41] these kind of actions to trigger a
[01:31:44] certain event that happens in the
[01:31:46] character so in our case we're going to
[01:31:48] create a new one perhaps right here
[01:31:50] there's plenty of space here and I'm
[01:31:52] just going to right click and type in IA
[01:31:55] underscore uh interact and let's go for
[01:32:00] the left one or let's go for the right
[01:32:01] one actually
[01:32:03] interact right
[01:32:05] that's uh I'm left-handed and all of my
[01:32:08] stuff is on the left hand side so for me
[01:32:11] my right hand is a little bit more free
[01:32:16] so once that is uh set up now we need to
[01:32:19] say okay once the action uh begins once
[01:32:23] uh I trigger the button
[01:32:26] what happens right and what needs to
[01:32:30] happen is we need to shoot out a beam
[01:32:34] from our controller just outwards
[01:32:37] straightforward
[01:32:40] and see if that beam hits anything right
[01:32:44] it like shooting again
[01:32:46] so when we start an action there needs
[01:32:51] to be a line phrase
[01:32:54] by channel line Trace by Channel
[01:32:57] needs to happen
[01:33:00] line Trace by Channel
[01:33:03] there we go
[01:33:06] and basically a line Trace is it has a
[01:33:09] starting point and it has an end point
[01:33:11] so it's it's uh like a line right and
[01:33:14] and whatever the line hits we get it as
[01:33:18] an output here you know whatever object
[01:33:20] is being hit by the line so our start uh
[01:33:24] should be where our controller is
[01:33:27] currently in the world right so to do so
[01:33:31] I need to first get the motion
[01:33:34] controller in here and I will just type
[01:33:37] in get motion
[01:33:40] controller data no uh there should be
[01:33:43] something else
[01:33:45] um
[01:33:46] sorry one second motion controller
[01:33:52] crawler left
[01:33:54] all right right right
[01:33:57] aim oh there we go get motion controller
[01:34:01] right aim this one right here
[01:34:04] that's the one that we want
[01:34:07] bam
[01:34:08] I get it from it I can extract get
[01:34:13] World location
[01:34:16] there we go
[01:34:17] and that is going to be where you know
[01:34:20] the position where the beam should start
[01:34:22] from then the end of the beam should be
[01:34:26] well basically we need a direction and
[01:34:29] we need a length for how long the beam
[01:34:32] is going to be so to do so I'm just
[01:34:34] going to again I'm dragging out from get
[01:34:37] motion controller right aim dragging out
[01:34:40] and I'm going to type in get forward
[01:34:43] vector
[01:34:46] that just simply goes out right so our
[01:34:50] forward Vector actually I'll need like a
[01:34:53] Microsoft Paint
[01:34:56] for this okay so
[01:34:59] let's say we live in 2D world right
[01:35:02] and we have
[01:35:07] two axes actually can I just use
[01:35:09] we have two axes actually can I just use
[01:35:09] a brush please
[01:35:11] there we go beautiful two axes X and Y
[01:35:17] and this is zero zero zero comma zero
[01:35:21] right zero zero coordinates so
[01:35:25] what we get from get World location of
[01:35:27] our controller is the position of let's
[01:35:30] do it in red the position of where our
[01:35:34] hand is in this world right
[01:35:38] so it tracks the position of the hand
[01:35:41] and then get forward Vector is basically
[01:35:45] if uh let's say I'm holding out the
[01:35:48] hands uh or I'm holding the gun or the
[01:35:51] controller
[01:35:52] um
[01:35:53] let me use some sort of other color this
[01:35:56] direction right
[01:35:57] uh the get forward Vector what it gives
[01:36:01] us is a vector
[01:36:03] that
[01:36:06] starts from zero zero always starts from
[01:36:09] zero zero
[01:36:10] right and its length l
[01:36:15] equals one
[01:36:18] the it's unitized Vector right so the
[01:36:21] length of it is one so what we need to
[01:36:23] do for for this to actually work is we
[01:36:27] need this vector
[01:36:30] um this this guy right here to actually
[01:36:32] start from our hand from from this point
[01:36:36] right here we don't want it to start
[01:36:38] from zero zero
[01:36:39] a quick Vector math tells us that if we
[01:36:43] simply
[01:36:45] um
[01:36:46] add these two vectors up together
[01:36:49] like add the coordinates together with
[01:36:51] the vector we will be simply moving the
[01:36:56] vector right so it's going to then be
[01:37:00] placed here
[01:37:01] but the length of it is still going to
[01:37:03] be one like one centimeter that is way
[01:37:06] too too small so before we actually move
[01:37:09] it we need to take this vector and
[01:37:11] multiply
[01:37:13] multiply it by let's say a thousand
[01:37:17] so that it's 10 meters long right so
[01:37:21] that's the first thing I will just take
[01:37:22] it
[01:37:23] multiply
[01:37:27] there we go
[01:37:29] uh here it asks me for like numbers for
[01:37:33] three so if I want to multiply X Y and Z
[01:37:37] separately no I don't so I'm going to
[01:37:39] right click on this input and I'll
[01:37:41] choose to
[01:37:43] two integer right here
[01:37:48] and then I'll just type in a thousand
[01:37:51] so now our Vector the forward Vector
[01:37:54] right here is uh this this guy right
[01:37:58] here
[01:37:59] a thousand units long now all we need to
[01:38:02] do is just place it
[01:38:04] here and as I said the movement the
[01:38:08] placement is just adding the two vectors
[01:38:12] up so from here add
[01:38:16] this one just a plus sign add up and
[01:38:20] then use that as our end
[01:38:23] right
[01:38:25] not necessarily that we are specifying a
[01:38:28] vector anymore we're actually specifying
[01:38:31] apologies we're actually specifying a
[01:38:34] point at that moment right so we're
[01:38:37] actually saying that yeah
[01:38:39] it's it's here uh and and it's going to
[01:38:43] let line Trace is going to create a line
[01:38:45] between the two points but in my opinion
[01:38:49] like explaining it through a vector is
[01:38:51] kind of is a little bit uh clearer
[01:38:55] anyway
[01:38:57] so every time we will press the button
[01:38:59] the trigger it's going to draw a line
[01:39:02] that is 10 meters long away from our
[01:39:05] hand
[01:39:07] um and the line is going to be aimed
[01:39:09] because we're getting the forward Vector
[01:39:12] of our hand
[01:39:13] great we can move on so
[01:39:16] then we can say okay
[01:39:20] if this triggers
[01:39:23] right
[01:39:25] then let's do a branch
[01:39:31] let's create a branch and if this
[01:39:33] triggers right so if return value is
[01:39:36] true
[01:39:38] then this output will trigger if this
[01:39:41] does not trigger so if we're not doing
[01:39:43] anything with this then return value is
[01:39:46] false if it's false we don't do anything
[01:39:49] if it's true we need to do something
[01:39:52] with
[01:39:54] um
[01:39:56] sorry uh one second let me think
[01:40:02] if we
[01:40:05] shoot the line
[01:40:07] uh the true statement should trigger
[01:40:10] some sort of reaction in the world you
[01:40:13] know in in this case in our door
[01:40:17] so now is a good chance to just compile
[01:40:20] this save this for a while
[01:40:22] um go back to our close that or actually
[01:40:25] don't close that sorry let's just dock
[01:40:28] it because we will be revisiting it
[01:40:30] shortly but rather going in here and
[01:40:34] creating
[01:40:35] some sort of a testing object which we
[01:40:39] will be able to
[01:40:41] um to trigger right so I'm just going to
[01:40:44] do something very quick
[01:40:48] um here under context I will create a
[01:40:50] new
[01:40:52] um folder call it
[01:40:54] blueprints
[01:40:56] double click that and in this folder I'm
[01:40:59] going to just create a new blueprint
[01:41:02] class
[01:41:04] which is going to be an actor
[01:41:06] like that I'll call it uh
[01:41:10] interact box
[01:41:12] interact box double click it and here in
[01:41:17] this
[01:41:19] I'll call it
[01:41:21] blueprint viewport let's create actually
[01:41:25] add a box component you can do so in the
[01:41:27] left hand side under add you can choose
[01:41:29] Cube
[01:41:31] simple as that Cube there we go
[01:41:34] I don't need it to be fancy so I'm just
[01:41:36] going to have it the the the way and the
[01:41:39] way it is right now
[01:41:41] that is absolutely absolutely fine we
[01:41:45] will make it rotate around its Z axis
[01:41:49] when we hit it
[01:41:52] right so now let's go into event graph
[01:41:55] and here I'm actually going to delete
[01:41:58] all of the events because the event that
[01:42:02] I want to
[01:42:03] the event that I want to trigger is
[01:42:07] actually going to be
[01:42:09] um
[01:42:10] from a different blueprint right so we
[01:42:14] need to create a new type of
[01:42:18] what's the word apologies uh we need to
[01:42:22] create a blueprint interface which will
[01:42:25] be used to trigger so our line Trace
[01:42:29] will trigger that blueprint interface
[01:42:31] and it's going to transfer into our
[01:42:34] interact box and Trigger here right so
[01:42:37] we're basically going to use this kind
[01:42:39] of a in between blueprint between the
[01:42:43] two uh between our character and our box
[01:42:47] that we're trying to rotate if it's
[01:42:49] confusing hopefully once I start
[01:42:51] building it up it will be a little bit
[01:42:54] less confusing so
[01:42:56] to make this kind of an in-between
[01:43:00] messenger so the same
[01:43:02] let's go to our map and under blueprint
[01:43:07] um
[01:43:08] folder let's create and interact uh
[01:43:12] blueprint interface so under here under
[01:43:17] blueprint there is a option to choose
[01:43:20] blueprint interface right here
[01:43:23] I'll click it
[01:43:24] bam I'll call it interact BP
[01:43:30] let me just double uh double click it to
[01:43:33] uh to check if there's anything that we
[01:43:36] need to do
[01:43:38] wait is that
[01:43:43] um
[01:43:44] seems like
[01:43:46] everything here is fine except that okay
[01:43:48] so when you do interact
[01:43:50] um
[01:43:51] BP when you open up your interact
[01:43:54] blueprint make sure that your function
[01:43:57] is named something that you will
[01:43:59] recognize recognize in this case I'll
[01:44:01] just call it interact
[01:44:04] there we go
[01:44:06] and here there's the description
[01:44:08] category we don't really need to do
[01:44:12] anything else here we just name the
[01:44:16] function
[01:44:17] that's that's about it we compile this
[01:44:20] we save this
[01:44:22] and now we have like an in-between
[01:44:24] messenger that is going to get triggered
[01:44:28] by
[01:44:30] our character and we'll send the
[01:44:33] information to our box so how do you
[01:44:37] first of all how do you trigger it well
[01:44:40] you need to create a
[01:44:42] like the interact
[01:44:48] uh interact message
[01:44:50] right here so you need to message it
[01:44:52] right that you're being interacted with
[01:44:54] like that
[01:44:56] the name interact comes from
[01:45:00] this function right here that we have
[01:45:03] renamed right so whatever function name
[01:45:05] you gave it here that is the name that
[01:45:09] you're going to be writing right here
[01:45:11] right so in my case it's interact
[01:45:15] okay then when this is true we send the
[01:45:20] interaction or we trigger the
[01:45:22] interaction into
[01:45:25] uh what's the word into this interact
[01:45:28] blueprint okay
[01:45:30] now the question is how does it know if
[01:45:35] if we have like five different
[01:45:38] um
[01:45:39] five different doors how does it know
[01:45:42] which door it should send the
[01:45:45] information to do we need to create
[01:45:47] separate interact blueprints for every
[01:45:50] separate door no no we don't because
[01:45:52] there's the Target right the target is
[01:45:55] what object that receives the interact
[01:45:59] message that yo we should trigger Which
[01:46:03] object is it and we can say Which object
[01:46:07] It Is by
[01:46:09] asking the question by okay which object
[01:46:11] is being hit by our line that is shot
[01:46:15] out of our Pawn so output hit
[01:46:19] we drag out of it and we type in break
[01:46:22] break hit result
[01:46:24] and we expand it
[01:46:27] the thing that we want is called Hit
[01:46:31] actor
[01:46:33] I believe hit component no hit actor
[01:46:35] that's that's the thing that we want and
[01:46:37] it basically is going to say that okay
[01:46:39] by shooting the
[01:46:41] pointer the light the line you hit the
[01:46:45] Box uh our interact box
[01:46:49] you hit that and then the interact
[01:46:53] blueprint will transfer that information
[01:46:56] that it's being hit into the interact
[01:46:59] box right so this will just to do send
[01:47:02] it over okay we compile this we save
[01:47:05] this then interact box right here we
[01:47:08] will use interact
[01:47:12] um
[01:47:14] one second
[01:47:19] I need to remember this one
[01:47:24] because it needs to be like um
[01:47:26] like an event I believe
[01:47:35] um let's try this
[01:47:37] event
[01:47:39] interact
[01:47:44] hmm there's no event to interact oh no
[01:47:48] I'm I'm I'm
[01:47:49] forgetting something important
[01:47:52] give me one second I'll I'll figure this
[01:47:55] out if I remember it I remembered what I
[01:47:58] forgot okay so under
[01:48:01] um we we don't have an interface kind of
[01:48:05] connected to our indirect box blueprint
[01:48:09] the the one that we will use
[01:48:12] that will spend right so we need to go
[01:48:16] to our class settings right here
[01:48:19] then under interfaces you can see that
[01:48:23] there's no interfaces at the at the time
[01:48:27] so we need to add implemented interface
[01:48:31] and here we type in interact
[01:48:35] blueprint this one right here interact
[01:48:38] VP
[01:48:39] right now you can see that a new
[01:48:41] interface is created here that can be
[01:48:44] used to trigger an event inside of the
[01:48:47] Box an event of spinning when we shoot
[01:48:50] at it so we compile
[01:48:53] we drag over this function what
[01:49:02] um one second
[01:49:04] maybe it's just interact at this point
[01:49:08] call function yes uh yeah call function
[01:49:11] interact
[01:49:12] nope
[01:49:14] oh my God event interacts there we go
[01:49:18] finally it's event interact
[01:49:21] we just create one here and then we will
[01:49:25] specifically just say okay when
[01:49:29] this triggers the Box should spin so
[01:49:33] let's create a timeline
[01:49:35] or rather yeah let's create a timeline
[01:49:41] add timeline
[01:49:43] like that call it box spin
[01:49:48] doesn't really matter
[01:49:51] right
[01:49:52] uh then let's go for
[01:49:56] f8
[01:49:59] no not if it's sorry sorry uh just
[01:50:01] double click on it yeah double click on
[01:50:03] it because we need to add a track to the
[01:50:05] timeline so click on the TR at track uh
[01:50:08] well before you add it or I guess you
[01:50:11] already did it so let me or no no sorry
[01:50:15] sorry
[01:50:17] again before you add the track
[01:50:21] let's change the length of the track so
[01:50:24] how fast should the door or box in this
[01:50:28] case spin 1.5 seconds should be good
[01:50:31] enough you can adjust this later down
[01:50:33] the line that's that's fine and the
[01:50:35] track that we're going to add is going
[01:50:37] to be add a float track
[01:50:40] like so
[01:50:42] and we can call it
[01:50:45] box
[01:50:46] spin
[01:50:48] box spin
[01:50:50] there we go so
[01:50:53] over the course of 1.5 seconds the
[01:50:56] output at the start should be zero right
[01:51:01] and the output at the end should be uh
[01:51:05] one
[01:51:07] or should be like the amount of degrees
[01:51:10] so let's do 90 degrees so let's right
[01:51:14] click add key right here
[01:51:18] and say that our time is at zero the
[01:51:20] value is at zero that's great and then
[01:51:23] the next one add key
[01:51:25] right here the time is at 1.5 but the
[01:51:30] value is at 90.
[01:51:34] oops
[01:51:35] did I mess up 90.
[01:51:44] I believe there should be
[01:51:48] yeah zooming in Okay so
[01:51:51] I did mess up time 0 or time 1.5 value
[01:51:57] 90 again press the zoom to fit
[01:52:00] horizontal Zoom to fit vertical so now
[01:52:03] you have this kind of a motion going on
[01:52:07] uh from 0 until 1 1.5 the motion is
[01:52:11] going to be linear so it's going to
[01:52:13] start sharp and it's going to end sharp
[01:52:15] right so the animation is going to be a
[01:52:17] little bit jerky so to fix that we will
[01:52:20] just right click on both of these key
[01:52:22] points right here and we will choose
[01:52:25] that it should be Auto
[01:52:28] Auto smoothness here
[01:52:31] Auto smoothness here that will just make
[01:52:34] it kind of make the transition nicer
[01:52:37] okay once that is done we can compile
[01:52:40] save go back to our event graph and we
[01:52:43] have our little animation that is going
[01:52:46] to play well right now it's not even
[01:52:48] animation it's just a number that's
[01:52:51] going to be increasing
[01:52:53] with that number we need to actually
[01:52:55] rotate stop so we will set
[01:52:59] relative rotation
[01:53:02] for what for the cube for now just
[01:53:08] I guess we can rotate the whole scene
[01:53:12] yeah the full scene root for now
[01:53:15] set relative location uh default scene
[01:53:19] root or not location sorry rotation
[01:53:22] default scene root
[01:53:26] like that
[01:53:28] the update goes into the trigger box
[01:53:33] right here and the rotation is going to
[01:53:36] be translated from the box spin output
[01:53:42] here so we're going to make or we can
[01:53:45] drag out from here make rotator
[01:53:49] uh just here make rotator
[01:53:53] and we're rotating around the Z axis so
[01:53:56] we just connect box pin to Z
[01:53:59] like so compile save I believe that is
[01:54:05] it now we can actually try it out
[01:54:10] let's see one one last thing yeah one
[01:54:15] last thing go back to your VR pawn and
[01:54:18] here under draw debug type let's just
[01:54:20] choose to
[01:54:22] um have persistent
[01:54:25] line traces so it's actually going to
[01:54:29] show where the line is being shot
[01:54:33] okay let's compile
[01:54:36] let's go back in here uh probably I'll
[01:54:39] just drop all of the
[01:54:41] like the quality right now to medium
[01:54:44] just so that it it runs a little bit
[01:54:46] smoother
[01:54:48] um and I will take my blueprint and just
[01:54:51] kind of slap it in here
[01:54:53] like that that's the interact box
[01:54:56] blueprint right
[01:54:58] now let me one second
[01:55:10] let me grab the
[01:55:12] headset uh come on hands
[01:55:16] there we go so I'm I'm just using that
[01:55:19] okay fine I'll use the controllers
[01:55:23] come on register controller yes
[01:55:27] another one
[01:55:29] pew
[01:55:33] yeah yeah okay
[01:55:36] so I'm just going to quickly connect my
[01:55:38] headset to the computer
[01:55:40] it's loading in I'll try we'll see if
[01:55:44] that actually
[01:55:45] actually works
[01:55:48] should work though
[01:55:50] don't see why why it shouldn't let's
[01:55:52] let's press play
[01:56:09] I'm just using stat fps to see if
[01:56:13] I can talk because if the frames are too
[01:56:16] low then my microphone does not pick up
[01:56:20] anymore the the audio
[01:56:23] um seems like it's gonna gonna work and
[01:56:26] I believe we use the red uh
[01:56:29] sorry the right arm to do the the test
[01:56:34] so oops
[01:56:35] let's
[01:56:37] let's move back and let's shoot Pew nope
[01:56:41] there we go you can see
[01:56:44] and I actually can only shoot once
[01:56:47] because now it's rotated 90 degrees and
[01:56:50] we can't you know we can't shoot it more
[01:56:52] but that's that's the line Trace you
[01:56:54] know from my arm people
[01:56:57] seems to work and it did root it so it
[01:57:02] we we have a working
[01:57:05] blueprint yay
[01:57:08] now let's make it nice
[01:57:10] now since it works let's make it nice so
[01:57:13] the first thing to do is actually to
[01:57:16] well interact blueprint we don't need it
[01:57:18] anymore we can close that but interact
[01:57:20] box we need to somehow
[01:57:23] um the first time we shoot it it needs
[01:57:24] to rotate 90 degrees forward and next
[01:57:27] time we shoot it it needs to rotate 90
[01:57:29] degrees backwards so to do so we need to
[01:57:32] create a new variable I'm just going to
[01:57:34] clip
[01:57:35] click the plus sign here under variables
[01:57:38] and I'm going to say
[01:57:40] um
[01:57:42] open
[01:57:44] or Box open
[01:57:47] I know it's like not open but let's say
[01:57:49] the trigger is it's either open or
[01:57:52] closed right so it is a Boolean and I'm
[01:57:55] just going to drag it in here get box
[01:57:57] open
[01:58:00] like that
[01:58:03] and by default I believe we should say
[01:58:05] that it's uh
[01:58:09] is it open or is it closed
[01:58:11] um
[01:58:13] doesn't really matter
[01:58:15] so for for now let's just say that by
[01:58:17] default it's it's uh wait let's compile
[01:58:23] let's let's have it closed right so it's
[01:58:26] unticked here
[01:58:28] now with this uh done let's create a
[01:58:32] branch here between interact and box
[01:58:34] spin
[01:58:38] branch and when it is
[01:58:42] uh closed right it should open so we
[01:58:46] should play the animation but when it's
[01:58:49] open when this is true
[01:58:53] sorry uh when open is unticked that
[01:58:56] means it's closed so when it's closed it
[01:58:59] should play from here
[01:59:03] or we can do it this way
[01:59:06] like that and this is Tick marked okay
[01:59:09] that that's gonna work and then when it
[01:59:12] is
[01:59:14] so so I'm tick marking the Box open uh
[01:59:17] click Mark here so when it's true it
[01:59:20] should play forward and when it's false
[01:59:22] it should play reversed
[01:59:25] right so that it closes
[01:59:27] okay that that should work
[01:59:30] um in in terms of opening and closing
[01:59:31] but now as we close it or as we open it
[01:59:35] uh the state of this uh Box open should
[01:59:39] flip from whatever it was before so I'm
[01:59:43] going to
[01:59:44] um
[01:59:45] let's do it this way uh under box spin
[01:59:48] I'm going to ask
[01:59:51] is this number
[01:59:53] larger than greater than
[01:59:57] one so are the degrees greater than one
[02:00:02] and with event tick
[02:00:09] I will set my box open
[02:00:14] ah come on
[02:00:17] set my box open
[02:00:22] so you just drag out your box open into
[02:00:24] here and you choose to set it to be
[02:00:29] uh true because the moment when the door
[02:00:34] or the Box in this case opens up by more
[02:00:36] than one degree this will trigger that
[02:00:39] it's true and it's going to go in here
[02:00:41] and say that this is true
[02:00:45] okay so this should technically work
[02:00:48] let's see let's compile this save this
[02:00:51] and play this
[02:00:54] put on the headset
[02:00:56] real quick
[02:01:00] okay
[02:01:04] and shoot
[02:01:08] well okay
[02:01:10] that didn't work out at all okay let's
[02:01:14] see what we're uh what we're
[02:01:17] dealing with here
[02:01:20] so uh to troubleshoot these kind of
[02:01:23] things what you do is you create a print
[02:01:26] string node print string in this case if
[02:01:30] this event triggers in my interact box
[02:01:33] also I should compile and save this if
[02:01:36] this event triggers in my uh print
[02:01:38] string oh sorry interact
[02:01:43] box blueprint then print string will be
[02:01:46] ran okay let's so let's see
[02:01:50] bam
[02:01:58] foreign
[02:02:06] that I hit the Box a hello appears on
[02:02:11] the screen that means it's triggering
[02:02:13] okay that that's that's a good thing
[02:02:16] then the Box open should run
[02:02:23] this
[02:02:27] oh but the Box open should be unticked
[02:02:31] then
[02:02:32] now it should be ticked right
[02:02:35] uh it's it's always okay so another
[02:02:38] thing that we could do is we could check
[02:02:41] what happens after the animation as the
[02:02:45] animation updates right here so I feed
[02:02:47] the print string in between and I will
[02:02:50] connect the Box pin
[02:02:53] so that those are the
[02:02:55] degrees into the string input right here
[02:03:00] compile save play
[02:03:15] foreign
[02:03:17] for some reason it goes straight to
[02:03:21] straight to zero which is weird uh I
[02:03:26] think I messed up here with a branch
[02:03:28] okay so let's let's think about the
[02:03:31] situation here
[02:03:32] if the door is open
[02:03:39] this should
[02:03:41] true
[02:03:43] should play in Reverse oh okay okay so
[02:03:47] it should be like this crossed right so
[02:03:50] false should play true should be in
[02:03:52] Reverse now this should probably work
[02:03:58] there we go
[02:04:00] forward
[02:04:01] backwards okay so it it was just the
[02:04:07] nice it was just the the the this this
[02:04:11] logic right here that I messed up so I
[02:04:14] had the door already open and I tried
[02:04:16] opening it again so it just didn't work
[02:04:19] or I had the door closed and I tried
[02:04:21] closing it again and it again didn't
[02:04:24] work right so that's uh yeah that that
[02:04:28] ain't good that thing good but now it
[02:04:30] works okay so in terms of the blueprint
[02:04:33] uh here we are kinda done
[02:04:37] right now for our VR Pawn
[02:04:40] I still want to do uh one last thing
[02:04:44] before we before we move on the line
[02:04:48] Trace is quite ugly so instead I have
[02:04:52] prepared let me just open it up to show
[02:04:56] you
[02:04:57] uh
[02:04:59] okay you can't see it in here but you
[02:05:02] can see in this icon right here Paul dot
[02:05:06] PNG
[02:05:07] um this is just a little pod that will
[02:05:10] show us where we're shooting you know
[02:05:13] instead of that ugly line so the way you
[02:05:16] put down the little cat paw at where you
[02:05:20] should you first need to of course
[02:05:22] create
[02:05:24] or not great but import the Paw dot PNG
[02:05:28] into your
[02:05:31] what's the word into your project so I'm
[02:05:34] just going to create a new folder here
[02:05:36] under blueprints folder widgets
[02:05:40] I probably shouldn't be widget uh
[02:05:43] uh should call it something else
[02:05:46] whatever it's going to be widgets under
[02:05:48] widgets I'm just going to drag and drop
[02:05:50] in the or Texture
[02:05:53] as simple as that then in my VR Pawn
[02:05:57] I will say okay every time we hit
[02:06:01] something
[02:06:02] it should
[02:06:04] get a normal Vector of that thing and it
[02:06:08] should place a paw there
[02:06:11] right so we will
[02:06:13] drag off from here and call a spawn deco
[02:06:20] spawn
[02:06:22] [Music]
[02:06:26] like that
[02:06:30] the material that is going to be used is
[02:06:33] going to be a decal decal material that
[02:06:37] we will create from the little paw that
[02:06:41] we have that's in a little bit uh more
[02:06:45] uh a little while but first let's just
[02:06:48] say decal size is five by five by five
[02:06:52] and the location where it's actually
[02:06:54] placed is going to be well you guessed
[02:06:58] it the location of where the beam hits
[02:07:00] the
[02:07:02] building or you know any geometry
[02:07:05] so that's the location rotation though
[02:07:07] is going to be a little bit trickier I'm
[02:07:10] going to
[02:07:12] take the normal but I want every time
[02:07:14] the Paw is placed the rotation to be
[02:07:17] kinda randomized right so that it's not
[02:07:20] always being placed at exactly the same
[02:07:22] angle that would look weird so I'm going
[02:07:24] to take the normal vector and I'm going
[02:07:26] to say okay let's give me the rotation
[02:07:32] from X vector
[02:07:37] rotation from X Vector there we go then
[02:07:41] I'm going to take that rotation and I'm
[02:07:43] going to break it break rotator
[02:07:48] like that
[02:07:49] not into X is just break Rotator X roll
[02:07:53] pitch and yaw so we don't mess with roll
[02:07:57] at all the roll uh or sorry we don't
[02:08:00] mess with pitch and yaw at all but we do
[02:08:03] mess with roll
[02:08:04] so I'm going to make
[02:08:07] rotator
[02:08:10] like that Y and Z just come in straight
[02:08:14] up but the x is going to be randomized
[02:08:17] so I'm going to just say okay give me a
[02:08:20] random float
[02:08:22] random float is a float number is a
[02:08:25] number that has a comma and a bunch of
[02:08:28] numbers after the comma integer is a
[02:08:30] number that does not have a comma and
[02:08:32] it's just a full number right so float
[02:08:34] uh just random number please uh most
[02:08:38] likely in between zero and one yeah
[02:08:40] returns a random float between zero and
[02:08:42] one so we just multiply that
[02:08:46] by 360 degrees so it's gonna be like a
[02:08:50] random power placement at 360 degrees
[02:08:54] and that connects to the Rotator like
[02:08:58] that
[02:08:59] great that's our return value which goes
[02:09:03] straight into rotation and then for how
[02:09:06] long does the pause stay on the surface
[02:09:09] I would say like five seconds something
[02:09:12] like that
[02:09:14] so we can play around with it
[02:09:16] and with that this is almost done the
[02:09:19] only thing that is missing is the
[02:09:21] material okay let me compile this real
[02:09:23] quick and then here let's just create a
[02:09:25] quick material for
[02:09:28] I'm losing my breath for the pawn not
[02:09:33] Pawn or for the cat or so I'm going to
[02:09:38] create a new uh material in my materials
[02:09:41] tab here call it cat or
[02:09:46] like that double click it
[02:09:48] and here I'm just going to add and add
[02:09:52] texture sample
[02:09:55] texture sample perfect
[02:09:58] uh and the texture sample of course will
[02:10:01] had have our paw
[02:10:04] PNG texture
[02:10:07] like that you can't really see it but we
[02:10:11] will
[02:10:12] apologies we will fix that in in just a
[02:10:15] second
[02:10:16] okay I'm back I'm back I just needed to
[02:10:19] double check that I won't won't make
[02:10:22] won't make a mistake so basically for
[02:10:25] the texture sample the texture sample
[02:10:28] settings we don't
[02:10:30] yeah yeah okay we don't
[02:10:32] okay we don't really need to do anything
[02:10:35] with those uh with the settings here but
[02:10:39] four four four four uh the actual
[02:10:42] material so let's select that note here
[02:10:44] we need to change the material to be uh
[02:10:48] translucent because we want the part to
[02:10:51] be cut out right
[02:10:52] translucent
[02:10:54] right here
[02:10:55] and we want the domain to be not surface
[02:10:59] but rather
[02:11:01] the third decal decal I still don't know
[02:11:05] how to call that
[02:11:07] there we go so now uh we will be using
[02:11:11] an opacity map
[02:11:13] and we will also be using a base color
[02:11:15] base color just goes in straight up like
[02:11:18] that RGB straight to base color
[02:11:23] hard to see what the hell is going on
[02:11:25] that's fine not a problem and then for
[02:11:27] the opacity map we will just simply
[02:11:30] connect the alpha but before we do
[02:11:33] connect Alpha I will just well let me
[02:11:36] show you if we connect it like so
[02:11:39] then we get
[02:11:43] um
[02:11:44] we get our little paw material right
[02:11:47] here
[02:11:51] like a decal but maybe it's a little bit
[02:11:55] too too intense
[02:11:57] so what I'm going to see do with this is
[02:12:01] instead of just Alpha straight up going
[02:12:03] into opacity I'm going to say Alpha we
[02:12:06] remove subtract from alpha let's say 0.2
[02:12:12] so that our paw is a little bit
[02:12:15] transparent in itself and also maybe
[02:12:18] roughness is
[02:12:20] a little bit less
[02:12:24] um let's see 0.5
[02:12:27] so it's a little bit shiny
[02:12:29] okay save that
[02:12:32] for this then we are Pawn for decal
[02:12:35] material we will choose paw cat paw
[02:12:39] there we go
[02:12:40] compile save
[02:12:43] time to test it out
[02:12:46] so I'm going to
[02:12:49] put on my trusted goggles connection
[02:12:52] lost great that's what I love to see
[02:12:59] okay
[02:13:01] yeah yeah shut up
[02:13:07] okay we're good press play
[02:13:15] okay it's alive and now if I shoot
[02:13:20] the gun you can see that I'm placing
[02:13:25] cat pause onto
[02:13:31] any object
[02:13:33] how cool is that
[02:13:35] so now we don't need to see the laser
[02:13:37] anymore
[02:13:39] right so under VR Pawn I will adjust for
[02:13:43] persistent I will draw debug type line
[02:13:46] Trace I will choose none compile save
[02:13:50] play
[02:14:08] you can see that it's not that great for
[02:14:11] moving objects it doesn't track moving
[02:14:13] objects that well but I mean for for
[02:14:17] what it is it's I think it's doing just
[02:14:19] fine so let's change the lifespan to
[02:14:22] like one second and let's change the
[02:14:25] size of it to like three
[02:14:28] something like so you know closer to an
[02:14:31] actual cat pole size
[02:14:34] okay
[02:14:35] that's done
[02:14:38] I'm happy
[02:14:39] let's move on so all of this is using
[02:14:44] like this is all we've created and this
[02:14:47] is for the interact right for the
[02:14:50] outright trigger I want my left trigger
[02:14:52] to also do that so how do we make it
[02:14:55] work for the left hand as well well I
[02:14:59] will just drag this over here Ctrl C
[02:15:02] copy Ctrl V paste
[02:15:06] drag it all the way down here
[02:15:10] actually you could technically just
[02:15:12] simply create two of them and feed both
[02:15:14] of them into line Trace but and and then
[02:15:17] or rather use some branching tools but I
[02:15:20] think this is a little bit clearer and
[02:15:22] and you can do separate arms for
[02:15:24] separate functionalities
[02:15:26] um so we're just copying that whole
[02:15:29] thing and here for enhanced input action
[02:15:33] IA interact right instead of that we
[02:15:35] will create uh interact
[02:15:40] um left I a interact left
[02:15:45] that started
[02:15:47] is here
[02:15:49] is it started or is it triggered No it
[02:15:52] started yeah it's here and then for
[02:15:54] motion controller right arm delete that
[02:15:58] and we get one that is uh motion
[02:16:02] controller left
[02:16:06] aim left Aim get motion controller left
[02:16:10] Aim and connect that to World location
[02:16:12] and forward Vector that's it that's all
[02:16:16] you need to do everything else kind of
[02:16:18] stays the same so now we have both hands
[02:16:21] that can open up stuff
[02:16:23] if you're holding a gun the uh
[02:16:27] interaction blueprint will will change
[02:16:29] or not in there how are they called uh
[02:16:31] one second
[02:16:34] poop input
[02:16:36] mapping context the input mapping
[02:16:39] context will change and you you won't be
[02:16:42] able to open doors if you're holding a
[02:16:44] gun but
[02:16:45] that's fine
[02:16:47] okay now back in our interact box we
[02:16:51] most likely want to do something with
[02:16:53] this right actually make it into a door
[02:16:56] or or something
[02:16:59] so to do so we will create a like a copy
[02:17:04] of this blueprint because this as a
[02:17:06] baseline this is absolutely fine but we
[02:17:09] don't need for instance the print string
[02:17:11] and we want the geometry to be that of
[02:17:15] an actual door
[02:17:16] so
[02:17:18] I will go to my blueprints interact box
[02:17:20] I will make a duplicate of it
[02:17:25] like that and I'll call it door or or
[02:17:29] interactor
[02:17:32] interact door
[02:17:34] double click that
[02:17:36] no need to see the interact box anymore
[02:17:38] close that so for interactdor event
[02:17:42] interact is still the same Branch well
[02:17:45] probably we should rename Box open into
[02:17:49] F2 into door open
[02:17:56] then box spin probably F2 gets renamed
[02:18:00] into
[02:18:01] uh door
[02:18:04] uh
[02:18:05] open
[02:18:08] ning
[02:18:09] door opening
[02:18:12] um what else what else what else what
[02:18:14] else or uh let's do a door opening
[02:18:16] timeline that that's that's gonna be
[02:18:18] better
[02:18:20] timeline
[02:18:21] um then here box pin so we need to go in
[02:18:25] here and change our track
[02:18:28] rename to door open
[02:18:35] okay
[02:18:36] and I believe that that's all we need to
[02:18:38] do to kind of reuse this this blueprint
[02:18:42] right back in event graph
[02:18:45] everything else seems good here
[02:18:48] so let's move back to our viewport here
[02:18:52] where we have our Cube and instead of
[02:18:55] the cube we need to actually use a
[02:18:58] static mesh that of a door so how which
[02:19:02] one I guess this one right
[02:19:05] so we're going to select this uh this
[02:19:08] object and it's called B rep 326 so back
[02:19:11] here under indirect door
[02:19:14] um instead of the cube delete that
[02:19:18] also we don't really do we need uh
[02:19:23] one second I'm thinking uh now we just
[02:19:26] add in a static mesh like so
[02:19:30] and I'm just going to call it uh
[02:19:34] door
[02:19:37] you can also drag and drop in if you
[02:19:40] want to uh your your your static objects
[02:19:44] uh that that works just fine as well but
[02:19:47] static Mesh Door
[02:19:49] and here I will just find three two six
[02:19:52] right B rep 326.
[02:19:56] now that's that becomes a door yay
[02:20:01] okay now we need we need we need we need
[02:20:05] a handle so back in here I'm just gonna
[02:20:08] select the handle
[02:20:10] uh huh
[02:20:13] box zero to seven
[02:20:16] so another static mesh
[02:20:20] handle one
[02:20:25] and the one
[02:20:28] there we go
[02:20:30] and that one is going to be
[02:20:33] 297 no
[02:20:35] zero two seven zero to seven uh box
[02:20:40] zero to seven
[02:20:43] there's our handle as you can see the
[02:20:46] handle is wrong
[02:20:48] also we need to be slower with our with
[02:20:53] our camera speed we're way too fast
[02:20:56] and the handle position is like it's
[02:20:59] placed right at zero zero zero uh that
[02:21:02] is incorrect so we need our handle to be
[02:21:05] actually
[02:21:07] something like that
[02:21:11] okay and
[02:21:13] yeah of course I will need a copy of
[02:21:16] this and it will need to be placed on
[02:21:19] the opposite end as well so let's just
[02:21:22] make a let's just duplicate it handle
[02:21:25] two
[02:21:26] like that
[02:21:27] move it over here
[02:21:30] uh so it fits there a little bit better
[02:21:33] but this one needs to be rotated so
[02:21:36] let's go for rotation or is it
[02:21:40] one second thinking
[02:21:42] no it's just rotation right rotation
[02:21:45] around y-axis 180 degrees there we go
[02:21:48] now let's turn off the snapping
[02:21:51] let's move in this one so that it fits
[02:21:55] with the door
[02:21:56] as well as it can
[02:22:02] there we go
[02:22:04] let's select that one
[02:22:06] move it over here F you can use f to uh
[02:22:11] focus and if you
[02:22:13] if the camera is clipping uh your
[02:22:16] geometry too much you can use the
[02:22:18] command uh R uh something with clipping
[02:22:22] clipping
[02:22:33] near clipping
[02:22:36] setting your clip plane r dot set near
[02:22:40] clip plane space bar one
[02:22:44] and that is going to be then clipping
[02:22:46] only one centimeter away from the camera
[02:22:50] quite useful okay so we have our handles
[02:22:53] here those work just fine we have our
[02:22:56] door here let's just check I'm gonna
[02:22:58] select both of the handles see if those
[02:23:00] need to be pushed in I think they do
[02:23:05] foreign
[02:23:11] yeah something like that okay great
[02:23:14] now I will select all of these
[02:23:17] and I will or rather sorry before
[02:23:19] selecting all of this I will create one
[02:23:22] more
[02:23:23] um one more object that is called
[02:23:27] um add it should be called a scene
[02:23:31] like this scene object
[02:23:34] and here and I'll call it Pivot Point
[02:23:40] the pivot point is going to be a point
[02:23:42] around which the door rotates so it's
[02:23:44] going to be think of a pivot point as a
[02:23:47] group that will force the rotation by
[02:23:49] rotating itself it will force the
[02:23:51] rotation of everything that is inside of
[02:23:53] the group so the door and the two
[02:23:55] handles
[02:23:56] Pivot Point well should be placed at the
[02:23:59] pivot of the door
[02:24:01] somewhere here
[02:24:04] F nope not even close
[02:24:07] it's a little bit annoying catching the
[02:24:09] the actual
[02:24:12] pivot but with a little bit of practice
[02:24:16] you will be able to
[02:24:21] I think that is as close as we uh
[02:24:24] actually if we go even slower
[02:24:30] yep
[02:24:33] there we go something like that
[02:24:35] so that's the point around which the
[02:24:37] door will open and close
[02:24:40] okay let's add some materials so
[02:24:44] um if I remember correctly
[02:24:46] uh that is just steel and that is going
[02:24:49] to be Oak veneer
[02:24:52] okay uh materials for the door
[02:24:56] Oak
[02:24:58] veneer
[02:25:00] and materials for the handles
[02:25:03] Steel
[02:25:09] brush Steel
[02:25:12] or just Steel
[02:25:20] for now let's just have it as just Steel
[02:25:25] okay now the only problem is that door
[02:25:28] handle handle and pivot point they are
[02:25:30] disconnected so actually door uh and the
[02:25:34] two handles need to be connected to the
[02:25:36] pivot point so I'm just I just selected
[02:25:39] all three of them and dragged them on
[02:25:41] top of the pivot point so now if let me
[02:25:45] show you if I move the pivot point you
[02:25:47] can see the door and the handles they
[02:25:49] move together right
[02:25:52] so now I reset the Pivot Point position
[02:25:55] to zero zero zero and you can see that
[02:25:58] if my if I rotate my Pivot
[02:26:01] the door opens up and closes
[02:26:06] actually
[02:26:09] is that fine one second
[02:26:12] minus 90.
[02:26:14] okay it might need to become a negative
[02:26:18] opening with this pivot uh so well we'll
[02:26:21] see we'll see should be fine should be
[02:26:23] fine
[02:26:24] okay we compile we save
[02:26:28] go in here
[02:26:29] and for now I'm just going to place the
[02:26:31] door real quickly right here
[02:26:34] there there it is and let's just test
[02:26:37] test play okay okay over here so now now
[02:26:40] it works I just needed to re reset the
[02:26:43] headset so now if I press play
[02:26:50] and I take my one of my hands go next to
[02:26:54] the door
[02:26:56] hit that opens up closes down but now if
[02:27:00] you can see
[02:27:01] um the door opens in the wrong to the
[02:27:05] wrong side right I wanted the door to
[02:27:07] open towards me right just like there
[02:27:11] that that door needs to open towards me
[02:27:15] so I kind of want the rotation to be in
[02:27:17] the negative which is very easy to fix
[02:27:20] so here skip
[02:27:23] Escape Escape I'll go to my interact
[02:27:27] door
[02:27:28] for uh event graph I will just say okay
[02:27:32] the door open should be
[02:27:35] negative right
[02:27:37] so
[02:27:40] negative float
[02:27:42] oh sorry uh we can just multiply it by
[02:27:45] minus well multiply minus one
[02:27:51] like that
[02:27:54] right and that connects to the Z yo and
[02:27:59] the only thing that I need to also fix
[02:28:02] is here with what is considered that the
[02:28:05] door is open the door needs to now be
[02:28:09] smaller
[02:28:11] less
[02:28:12] than
[02:28:14] -1
[02:28:15] right because we're going opposite right
[02:28:19] so if we're multiplying every oh sorry
[02:28:21] and uh needs to connect like that
[02:28:24] because door open you know from 0 to 90
[02:28:27] degrees goes until here becomes from
[02:28:30] zero to minus 90 degrees and then we say
[02:28:32] if it's at least minus two degrees it's
[02:28:34] kind of open right so save that play
[02:28:38] that
[02:28:42] check which arm is this that's the
[02:28:45] incorrect arm
[02:28:47] get there
[02:28:50] yay
[02:28:53] close okay great so the position of the
[02:28:56] door or or the placement of the door
[02:28:59] sorry the rotation of the door is fine
[02:29:03] actually I want to check one thing one
[02:29:05] second
[02:29:08] so if I
[02:29:11] this one also still works that's great
[02:29:13] let's grab
[02:29:15] um
[02:29:17] yeah
[02:29:19] yeah there we go
[02:29:22] all right man
[02:29:25] sorry about that so if I just go
[02:29:30] somewhere here
[02:29:32] rotate
[02:29:34] put down the ball right here carefully
[02:29:40] and open the door
[02:29:44] I just needed to check if the physics
[02:29:46] work as well with the door and they do
[02:29:49] okay
[02:29:50] awesome
[02:29:51] that is kinda done with the door let's
[02:29:55] place it in the correct position
[02:29:58] so I'm just going to move it
[02:30:01] right there
[02:30:08] just like that
[02:30:10] bam
[02:30:13] and
[02:30:16] is that bigger
[02:30:20] 326
[02:30:23] is my door smaller
[02:30:28] wait what
[02:30:30] three two six and this one
[02:30:33] foreign
[02:30:38] okay that's weird
[02:30:40] this one is actually weird because this
[02:30:43] door for some reason
[02:30:46] is larger
[02:30:49] than this one
[02:30:53] oh never mind it was just sunken into
[02:30:55] the ground that that's my bad that's my
[02:30:58] bad
[02:30:59] okay so that's that the I can see that
[02:31:02] the handles are a little bit too high up
[02:31:04] so I'll need to fix that and also this
[02:31:07] is lagging so I'm just going to change
[02:31:09] the the preview of this to be a little
[02:31:12] bit less yeah like like less demanding
[02:31:16] so unlit
[02:31:17] uh let me drag it in here
[02:31:23] this is not gonna be very accurate right
[02:31:26] now usually for it to be accurate you
[02:31:29] kind of need to do some math with the
[02:31:31] existing position of the door uh right
[02:31:35] here
[02:31:36] right so you just select the door you
[02:31:38] get the coordinates and then you kind of
[02:31:41] do some math with uh applying those
[02:31:43] coordinates but in this case eh screw it
[02:31:45] we're just gonna
[02:31:47] gonna wing it
[02:31:50] something something like so I think that
[02:31:53] is actually oh never mind let's move it
[02:31:56] up
[02:31:57] I think if we do zero that's actually
[02:32:00] gonna be correct right
[02:32:02] does it have a gap
[02:32:05] no it doesn't Okay so zero is actually
[02:32:07] correct and now we just need to move uh
[02:32:10] the handles down a little bit
[02:32:13] so back in viewport I'll just select the
[02:32:16] two handles
[02:32:18] that we have
[02:32:22] I will assume that they are at 90
[02:32:25] centimeters in height
[02:32:28] compile save look at the template they
[02:32:32] were not at 90 centimeters they were at
[02:32:35] a meter
[02:32:38] safe
[02:32:41] uh hello
[02:32:47] that's that's weird wait
[02:32:53] am I not oh wait is it just this one yep
[02:32:58] it's just that one um so that one also a
[02:33:02] meter above
[02:33:04] compile save
[02:33:06] yep uh that's good so now I can just
[02:33:09] delete uh the other two handles from
[02:33:12] here
[02:33:14] just get get that one in
[02:33:16] delete yes
[02:33:20] yeah that one and
[02:33:22] delete yes and congratulations you have
[02:33:27] a door maybe also
[02:33:30] minus 64. let's go for minus 60.
[02:33:35] or rather minus 70.
[02:33:39] five centimeters
[02:33:40] deeper in
[02:33:42] does that look better maybe it does
[02:33:46] maybe the Dust
[02:33:48] so minus 17.
[02:33:53] that save
[02:33:55] let's play
[02:33:58] let's take a gander
[02:34:02] so I'm just gonna grab my arms
[02:34:05] you can see them here
[02:34:07] let me move slightly away so that I can
[02:34:10] teleport better easier for instance here
[02:34:14] and then peel
[02:34:21] come on go here peel there we go
[02:34:28] not like that
[02:34:30] but yeah that seems to work just fine
[02:34:35] I'm happy okay so now we're uh looking
[02:34:38] at this in medium preset which of course
[02:34:41] will make it look pretty bad uh let's go
[02:34:45] back to high preset
[02:34:48] uh press play oh it crashed
[02:34:52] of course and now you can replace every
[02:34:54] single door with
[02:34:56] the the nude or that you uh have made
[02:35:00] with that blueprint
[02:35:02] so with this crash I'm going to of
[02:35:05] course rebuild the whole damn thing but
[02:35:07] then we will
[02:35:09] go on to let's try to restore
[02:35:14] go on to the next thing which is the
[02:35:17] sunlight and we will make the sun
[02:35:20] animated that's gonna be nice and it
[02:35:23] failed to rebuild anything so let's see
[02:35:26] how much we lost
[02:35:28] is that a blueprint that is not a
[02:35:31] blueprint but that is so that's good
[02:35:34] okay let me fix that and then we will
[02:35:36] continue with the dynamic Sun
[02:35:43] okay I fixed it I fixed it so now now
[02:35:46] everything works everything is stable
[02:35:48] again
[02:35:49] as I said at the start of this course
[02:35:51] the name of the game is stability and
[02:35:55] making things work
[02:35:57] barely but it does work I promise so now
[02:36:01] Dynamic light how do you make I mean
[02:36:04] we're using Lumen everything is movable
[02:36:07] meaning that would make no sense that
[02:36:10] the light is not movable
[02:36:12] so we need to use that now with Lumen
[02:36:17] let's go in here
[02:36:22] and let's first of all find our our uh
[02:36:27] actually the first thing that I want to
[02:36:29] do is get our player start node right
[02:36:33] here and just kind of move it inside of
[02:36:36] the building
[02:36:37] just there
[02:36:39] because now we're going to be constantly
[02:36:42] looking at things from inside of the
[02:36:46] building
[02:36:47] and also this is very slow let me just
[02:36:50] back to 0.33 that's great
[02:36:54] okay so that's step number one I guess
[02:36:58] the
[02:36:59] you know getting the person in Step
[02:37:01] number two opening up the level
[02:37:04] blueprint so that's the blueprint that
[02:37:06] controls the behavior of the world
[02:37:08] getting a sun that rotates around the
[02:37:13] sky over time in your level is
[02:37:15] definitely like it should be controlled
[02:37:18] through the level blueprint so open it
[02:37:21] there we go and here we have our
[02:37:24] actually let's make it a little bit
[02:37:25] smaller
[02:37:27] because here we have our event begin
[02:37:29] play you know what happens when you
[02:37:31] start the level and event tick what
[02:37:34] happens at every millisecond or every
[02:37:36] tick of the it's 20 minutes of the level
[02:37:40] right
[02:37:42] within the level so this is for
[02:37:44] something that's Dynamic and
[02:37:46] our light is going to be dynamic so the
[02:37:49] first thing that I want to do is I want
[02:37:51] to get my sun in here and my son is a
[02:37:56] directional light which we will fish out
[02:38:00] there we go directional light that is
[02:38:03] the Sun I'll just get it in here
[02:38:07] like that
[02:38:08] you just drag and drop it in from the
[02:38:10] outliner now we have it and I'm going to
[02:38:13] ask what is the current rotation
[02:38:16] get
[02:38:17] actor
[02:38:20] actor
[02:38:21] rotation
[02:38:23] oh thank God I thought that maybe they
[02:38:27] removed it okay get actor rotation so I
[02:38:30] get uh how this
[02:38:33] Sun
[02:38:34] or this directional light you know I get
[02:38:37] these numbers basically minus
[02:38:39] 105 minus 31 minus 14 right the rotation
[02:38:45] then I want to set the like I want a
[02:38:50] variable and I want to set my current
[02:38:55] rotation of the sun to be that of the
[02:38:58] directional light that we have right so
[02:39:00] I'm going to just
[02:39:02] um
[02:39:03] actually we need to create a variable
[02:39:05] first yeah new variable and I'll just
[02:39:08] call it sun
[02:39:10] rotation
[02:39:16] start
[02:39:17] Sun rotation start variable and it's not
[02:39:20] going to be a Boolean so I expand that
[02:39:22] it's instead going to be a rotator like
[02:39:24] that I drag it out here
[02:39:27] set Sun rotation start
[02:39:30] and connect my get actor rotation to Sun
[02:39:33] rotation start and as we begin playing
[02:39:37] it's going to set that
[02:39:40] okay so it's setting it up that's great
[02:39:43] but now how do we keep it make it
[02:39:47] rotating make it rotate so for that we
[02:39:52] need a number that keeps increasing over
[02:39:54] time and the way the best way to do it
[02:39:57] is to create a variable that you call a
[02:40:00] counter
[02:40:01] and that variable should be a float type
[02:40:04] variable and we just get it in here and
[02:40:07] we
[02:40:09] get the counter
[02:40:11] right
[02:40:12] so it starts from zero and we add Delta
[02:40:16] seconds to the counter at every tick of
[02:40:20] the level so
[02:40:23] every tick it keeps adding
[02:40:27] milliseconds to our counter
[02:40:30] right and then
[02:40:33] as it's adding them
[02:40:35] it should set
[02:40:39] counter
[02:40:41] um let's do it this way drag out the
[02:40:43] counter from here set counter to the new
[02:40:46] added value
[02:40:48] so
[02:40:49] first tick let's say this is 0 0.2 is
[02:40:54] added this becomes 0.2 this is now set
[02:40:58] to 0.2 next thick this is 0.2 0.2 more
[02:41:03] is added right so this is now 0.4 next
[02:41:07] stick 0.4 is here 0.2 is added this
[02:41:11] becomes 0.6 and so on right so it keeps
[02:41:14] increasing the counter keeps increasing
[02:41:16] in its
[02:41:18] size right in its number size
[02:41:21] okay now I want to rotate the sun with
[02:41:26] this counter to do so I will just set
[02:41:30] actor rotation
[02:41:34] I believe it's not relative it's just
[02:41:36] rotation set actor rotation
[02:41:39] oh that's cool already chosen
[02:41:43] directional Sun if it doesn't you can
[02:41:45] just drag out directional sun again and
[02:41:47] connect it to the Target that's fine
[02:41:49] and I'm going to say okay after you've
[02:41:52] set the counter you should rotate the
[02:41:55] the sun right so we connect it like so
[02:41:58] let me expand this
[02:42:00] um
[02:42:01] so now it's going to be triggering this
[02:42:05] every time the every tick of our level
[02:42:09] right
[02:42:10] so every zero point or 0.02 seconds I
[02:42:13] believe
[02:42:14] new rotation is going to be a little bit
[02:42:17] of a tricky one
[02:42:19] because we need to understand what role
[02:42:22] pitch and yaw is for the light
[02:42:26] right the rule for the light is nothing
[02:42:28] we don't care about the rule because
[02:42:30] it's if you have a projector the rule is
[02:42:36] this
[02:42:39] if you have a projector the rule is this
[02:42:39] right so if you take a projector
[02:42:44] and you roll it
[02:42:46] the light will not really change much
[02:42:48] right so okay if I take Sun rotation
[02:42:53] start right at the start of the level we
[02:42:55] get those angles
[02:42:58] change it here at the start of the level
[02:43:02] we get those angles for the current Sun
[02:43:05] rotation if I take that and get it get
[02:43:08] sun rotation start I can break it
[02:43:11] brake rotator
[02:43:15] I can break it into roll pitch and yaw
[02:43:17] right
[02:43:18] and this new rotation also needs to be
[02:43:22] broken into roll pitch and yaw so let me
[02:43:25] right click on it and choose split
[02:43:27] structure pen
[02:43:29] bam
[02:43:31] as I said rule doesn't matter so I just
[02:43:33] connect it like that that's fine that's
[02:43:36] whatever
[02:43:36] but pitch and yaw should be controlled
[02:43:41] right and they should probably be
[02:43:42] controlled one should be quite linear
[02:43:44] because it just goes around while the
[02:43:47] other one should be more of a sinus
[02:43:49] curve right it goes up and down and up
[02:43:51] and down right so which one should be a
[02:43:56] sinus curve you know for the up and down
[02:43:58] movement and which one should be just
[02:44:00] linear going around
[02:44:03] uh good question I believe
[02:44:08] the yo the ZET is going to be
[02:44:12] I believe the yo the ZET is going to be
[02:44:12] just around just a constant and Y will
[02:44:16] be a sinus if I yeah I will yeah I think
[02:44:20] that is the case Okay so let's get a
[02:44:23] counter in here get counter
[02:44:26] and let's just say Okay this counter uh
[02:44:29] should go through a sinus in degrees
[02:44:33] like that
[02:44:36] and it should be remapped to a certain
[02:44:41] uh kind of threshold so map range
[02:44:45] clamped
[02:44:47] map range clamped and sinus always goes
[02:44:50] between -1 and 1 so our in range a is -1
[02:44:54] and B range is one so the outputs here
[02:44:57] are kind of sandwiched between a and b
[02:45:01] the output so as the sinus curve is
[02:45:05] lowest what kind of degrees do we want
[02:45:07] for the rotation and why I think let's
[02:45:11] go for like minus five or -10
[02:45:14] current uh actually current angle will
[02:45:17] give us an idea so the current angle is
[02:45:19] minus 31.
[02:45:23] the current angle is -31 so Perhaps
[02:45:27] Perhaps Perhaps
[02:45:34] one second I'm thinking I'm thinking
[02:45:37] I'm gonna figure it out
[02:45:40] um
[02:45:45] yeah that that should be fine so -10 and
[02:45:49] 10.
[02:45:51] something like that all right so 10
[02:45:53] degrees up 10 degrees down and the
[02:45:55] return value gets added it we need to
[02:45:58] add it to the existing pitch right
[02:46:02] Plus
[02:46:04] add
[02:46:06] to the existing pitch so we're kind of
[02:46:08] we'll start from the original position
[02:46:10] and we'll start adding the angle to it
[02:46:14] right new rotation y pitch then for our
[02:46:20] so that's our sinus curve then for our
[02:46:23] yaw
[02:46:25] um that should be also added
[02:46:29] I think we just straight up just kind of
[02:46:32] connect the counter to it like that
[02:46:34] honestly
[02:46:36] I think that's gonna work later I'll
[02:46:38] show you how to speed it up or slow it
[02:46:39] down but for now I think this is going
[02:46:42] to be just fine as a baseline you know
[02:46:44] just to test
[02:46:46] okay let's compile it
[02:46:48] put it on put on the headset
[02:46:52] okay okay okay so this this should work
[02:46:55] I lowered the quality of lumen a little
[02:46:59] bit uh Lumen c c under post process
[02:47:03] volume Lumen scene lighting quality 0.5
[02:47:07] and Lumen Reflections quality 0.25 so
[02:47:11] now you can see that clearly clearly
[02:47:15] the reflections are much more
[02:47:20] shimmery right and also in general
[02:47:23] there's
[02:47:24] much more shimmery stuff going on but if
[02:47:28] I
[02:47:31] think I think it's alive now
[02:47:34] I think I think it's alive now
[02:47:34] so it takes a while for it to kick in
[02:47:36] for it to warm up but once it's done
[02:47:39] then we have everything working quite
[02:47:43] quite nicely
[02:47:46] still a little bit
[02:47:47] jittery that's fine but at least the
[02:47:51] light the light works so let's move
[02:47:54] around and see
[02:47:57] right here we go the light is rotating
[02:48:03] and everything is super dynamic
[02:48:07] let's just quickly go to the
[02:48:10] to here because this is going to be a
[02:48:13] place where the light is gonna start
[02:48:15] start hitting so that should be
[02:48:18] pretty pretty interesting
[02:48:21] the next step of course is going to be
[02:48:22] to balance the whole thing and to make
[02:48:26] it kind of nice neat and tidy
[02:48:30] but slowly
[02:48:32] also Auto exposure is kind of weird like
[02:48:36] the outside is super super dark but yeah
[02:48:39] there we go that's our Sun Ray right
[02:48:42] there
[02:48:44] hitting our our bedroom
[02:48:48] just give it a moment
[02:49:01] yeah that's kind of natural isn't it
[02:49:16] oh what's that oh yeah that's that's
[02:49:18] from the from the little grid here
[02:49:21] okay that's cute
[02:49:23] and also my hand you can see the Shadow
[02:49:26] the shadow of my hand here
[02:49:29] hello that's also pretty pretty cute
[02:49:36] okay let's go back in here
[02:49:40] take a look
[02:49:42] yeah that's nice go back
[02:49:45] go back to the living room close the
[02:49:47] door and see where my where I'm pointing
[02:49:51] at eh there we go
[02:50:08] okay that works enough enough of playing
[02:50:11] around let's make it as
[02:50:18] a microphone catch that I said let's
[02:50:21] make it aesthetic now
[02:50:22] the next step is actually to
[02:50:26] um
[02:50:27] final adjustments color Corrections blah
[02:50:31] blah blah to make it all neat and dandy
[02:50:34] perhaps I want the sun to be slightly
[02:50:37] lower so the range needs to be
[02:50:41] um
[02:50:42] from 20 until
[02:50:46] yeah something like that because 20 like
[02:50:49] that that goes down right it's not like
[02:50:51] it's going up that that that goes down
[02:50:54] um so we'll make final adjustments and
[02:50:56] that's going to be the end of the last
[02:50:59] chapter or rather the last chapter is
[02:51:01] going to be me showing you how to get it
[02:51:04] as a external exe file that you can send
[02:51:08] to your clients for them to run that run
[02:51:10] it on their own headset
[02:51:12] but for now uh let's jump to the next
[02:51:15] chapter
[02:51:19] okay okay okay one thing that I forgot
[02:51:22] to mention is how do you change the
[02:51:25] speed at which the light moves so if you
[02:51:29] open the level blueprint again
[02:51:32] uh the speed is controlled by in in here
[02:51:36] by multiplying the counter to some value
[02:51:39] so if I just multiply
[02:51:42] by
[02:51:45] let's go for a hundred let's see what
[02:51:47] happens this is gonna be a little bit
[02:51:49] disorienting
[02:51:51] and in instead of just the counter I
[02:51:53] plug in uh counter times 100 to my sinus
[02:51:57] for the Y and my Plus for the new
[02:52:01] rotation
[02:52:02] compile that
[02:52:04] play that
[02:52:16] whoa
[02:52:20] well
[02:52:21] it works right and by the way if you
[02:52:24] press tab you can see the that kind of
[02:52:28] Observer camera right there and actually
[02:52:30] let me go and say hi to it
[02:52:38] one second
[02:52:45] hello
[02:52:47] hi
[02:52:50] that's me
[02:52:52] looking around so tab switches between
[02:52:55] what I see
[02:52:57] and what Observer camera sees that's
[02:52:59] that's just a very nice thing to have in
[02:53:02] your scene where you're when you are
[02:53:04] troubleshooting okay now everything
[02:53:06] seems to be working just fine so let's
[02:53:09] save that and one last thing that I want
[02:53:12] to do before I can close this I already
[02:53:15] did it so I'll explain it is I used
[02:53:18] under event begin play execute Console
[02:53:21] Command right here
[02:53:24] I created a new variable by clicking the
[02:53:26] plus sign right here which name that
[02:53:28] scalability made it into string which is
[02:53:32] text dragged it in here get scalability
[02:53:36] so I got this node right here connect it
[02:53:40] to the command and basically we want the
[02:53:43] command to run as we start the level so
[02:53:46] what kind of command is it under
[02:53:47] scalability
[02:53:49] once you compile press compile then you
[02:53:52] will see a value that you can insert
[02:53:55] here and I just inserted in caps lock
[02:53:58] scalability
[02:54:00] two what this means or what this does is
[02:54:04] let me close that
[02:54:07] what this does is it forces the
[02:54:11] High skill ability for your scene when
[02:54:16] you even when you will be publishing
[02:54:19] this project and playing instead of Epic
[02:54:22] skill ability I that that's important so
[02:54:25] basically we're just lowering the
[02:54:27] the the quality right uh for VR you kind
[02:54:31] of need to do that
[02:54:33] all right uh what else so now uh it's
[02:54:36] time to make things a little bit nicer
[02:54:38] uh just just slightly uh oh yeah and
[02:54:42] probably we don't want our sun to move
[02:54:46] 100 times
[02:54:48] um faster than what it used to before so
[02:54:51] I'm gonna switch this back to one
[02:54:54] close that
[02:54:56] now in my environment light mixer I can
[02:54:58] start kinda
[02:55:00] playing around with the different
[02:55:01] settings so first of all
[02:55:04] um kind of want some fog in here that's
[02:55:07] too much
[02:55:09] that's definitely too much fog so 0.2
[02:55:13] Maybe
[02:55:14] something like that
[02:55:19] it's a little bit on the blue side isn't
[02:55:21] it I don't like that
[02:55:25] okay 0.1
[02:55:28] teams like that's gonna be uh yeah a
[02:55:31] good good average Maybe 0.15
[02:55:38] let's see how that looks uh without fog
[02:55:41] yep
[02:55:47] and 0.15
[02:55:50] okay 0.15 indeed is pretty pretty nice
[02:55:54] if you don't want this kind of fog but
[02:55:57] instead you want like a more accurate
[02:55:59] one you can choose volumetric fog
[02:56:02] which of course costs
[02:56:06] a little bit of performance
[02:56:10] stuff needs to calculate it causes a
[02:56:12] little bit of performance and also
[02:56:15] uh you get the god race in in your scene
[02:56:18] which is very nice but in VR they don't
[02:56:21] look as good they are a little bit too
[02:56:23] shimmery a little bit annoying so I will
[02:56:25] not be using volumetric fog instead for
[02:56:30] indirect lighting intensity I will be
[02:56:33] increasing that a little bit that is not
[02:56:37] a little bit I'll be increasing indirect
[02:56:40] lighting index intensity of my
[02:56:42] directional light to three something
[02:56:45] like that and for my Skylight perhaps
[02:56:48] also to
[02:56:49] like three or so maybe two
[02:56:54] um this will just make sure that the
[02:56:56] Shadows are a little bit brighter a
[02:56:58] little bit nicer
[02:57:00] um just a nice thing to have okay now
[02:57:04] everything seems to be a little bit
[02:57:06] Overkill in terms of the brightness so
[02:57:09] I'm going to go to my
[02:57:11] pause process volume right here
[02:57:15] and I will find
[02:57:19] what am I searching for I'm searching
[02:57:21] for two things thing number one is going
[02:57:24] to be lumen
[02:57:28] Global illumination
[02:57:30] I will increase the scene view distance
[02:57:33] to 2000.
[02:57:36] and Max Trace distance also to 2000
[02:57:39] simply because my house is not that
[02:57:43] small so I think if if we have like 2
[02:57:47] 000 that's going to catch the whole
[02:57:49] scene for for Lumen which is nice a nice
[02:57:52] thing to have next up we will go to our
[02:57:58] lens flares
[02:58:01] I'll change the intensity of lens flares
[02:58:03] to something like 0.01
[02:58:06] maybe 0.05
[02:58:08] let's see
[02:58:10] does it catch any flares
[02:58:14] hard to say let's reset it
[02:58:17] definitely a flare there there we go and
[02:58:20] now let's see what we need to drop 0.1
[02:58:24] oh even 0.1 uh no 0.1 is too strong uh
[02:58:30] 0.03 something like that yeah
[02:58:33] that that will work okay then for
[02:58:36] exposure I want my exposure competency
[02:58:38] compensation to be like minus 0.5
[02:58:41] because it's way over bright right now I
[02:58:45] want this to be
[02:58:47] a little bit on the dark side of the
[02:58:49] environment my maybe -1
[02:58:53] yeah one stop one full stop uh less
[02:58:58] that looks much much better okay what
[02:59:02] else uh for Bloom let's use uh let's use
[02:59:06] some bloom
[02:59:08] and I'm not sure if we can use
[02:59:11] convolution blue maybe we can but if
[02:59:15] the the convolution bloom is more
[02:59:17] accurate so
[02:59:19] if
[02:59:21] the bloom
[02:59:23] becomes too much and also let's reduce
[02:59:26] it
[02:59:27] 0.5 if the bloom becomes too expensive
[02:59:31] on your graphics card then make sure to
[02:59:33] reduce it
[02:59:35] um
[02:59:39] I think that's it
[02:59:41] this feels like it's it
[02:59:46] the blue tint is a little bit annoying
[02:59:48] but it is what it is we get our scene
[02:59:51] here
[02:59:54] um
[02:59:56] sorry give me a second I'm just going to
[02:59:58] make sure that every single setting that
[03:00:01] I have is
[03:00:03] okay
[03:00:05] you can change the temperature if you
[03:00:08] want to like the the white balance and
[03:00:10] whatnot
[03:00:17] to warmer or colder but I prefer to just
[03:00:21] keep it the way it is
[03:00:24] at least for this scene right here
[03:00:32] last time last test rider save
[03:00:37] I think we have everything ready to go
[03:00:41] works like a charm
[03:00:45] great
[03:00:53] I think it's time
[03:00:59] also the fog the fog needs to be larger
[03:01:02] the fog needs to be larger uh 0.3 at
[03:01:06] least
[03:01:08] and maybe let's do volumetric fog but
[03:01:11] the scattering the
[03:01:14] light scattering I don't want that so
[03:01:17] volumetric scattering I'll have that
[03:01:19] turned off
[03:01:21] I think this looks better honestly
[03:01:24] there we go audio is back
[03:01:27] I hate this absolutely hate this you
[03:01:30] don't okay
[03:01:32] real talk real talk you have no idea how
[03:01:36] many hours I spent
[03:01:39] re-recording these videos by trying to
[03:01:43] make
[03:01:44] the freaking audio work and by realizing
[03:01:48] that you know I've been talking for like
[03:01:50] half an hour at none of the audio went
[03:01:53] through
[03:01:55] I just needed to put it out there it's
[03:01:57] it's not easy man it's not easy anyway
[03:02:00] let's let's move on
[03:02:02] so with this done I'm kind of happy with
[03:02:05] it so it's time for us to publish it
[03:02:07] that is the last step that we will do
[03:02:12] and the way you publish your
[03:02:15] um
[03:02:16] project is through platforms choosing
[03:02:20] windows in this case
[03:02:23] um
[03:02:23] I will be using the development
[03:02:27] um like the
[03:02:29] I will be publishing it for development
[03:02:31] rather than for shipping
[03:02:33] simply gives me more apologies gives me
[03:02:37] more logs if something goes wrong
[03:02:39] and I will just choose to package the
[03:02:42] project
[03:02:44] asks me where do I want to save it I'll
[03:02:46] just go for
[03:02:49] desktop
[03:02:51] uh VR test
[03:02:54] and here I will just actually I can name
[03:02:57] this one Alt
[03:02:59] there we go and
[03:03:02] just publish it into VR test folder
[03:03:05] select folder that's it it's going
[03:03:09] so now the output log going it's it's
[03:03:11] going to kind of say
[03:03:14] um what it's doing
[03:03:16] uh if you will get an error then make
[03:03:21] sure that you have Visual Studio
[03:03:26] Visual Studio installed uh that is
[03:03:29] probably going to be one of the most
[03:03:33] common issues that you can't get to work
[03:03:36] well honestly I would suggest like since
[03:03:39] you can have so many different errors
[03:03:41] that pop up I would suggest that once
[03:03:43] you get an error if you get an error
[03:03:45] output log
[03:03:46] Ctrl C Ctrl V that error into Google
[03:03:50] there's definitely going to be someone
[03:03:53] out there who has received exactly the
[03:03:56] same errors you have and already has
[03:03:58] received help
[03:03:59] so that is the way you troubleshoot at
[03:04:03] least the compilation errors those get
[03:04:05] annoying but hey it is what it is
[03:04:08] so once this whole thing
[03:04:12] um
[03:04:13] is done once it's packaged then we can
[03:04:17] try uh try seeing what's what's up and
[03:04:20] try seeing how we can
[03:04:22] uh play it on our in in in my living
[03:04:27] room right so how can I play it not in
[03:04:30] Unreal Engine but just you know in
[03:04:33] computer
[03:04:34] let me pause the video here
[03:04:39] hello hello okay so I am kind of ready
[03:04:43] uh we're gonna use the the headset for
[03:04:46] this
[03:04:47] by the headset I mean the microphone on
[03:04:50] the headset and now I will load in
[03:04:54] what am I loading in I'm going to load
[03:04:57] in the exe file that was made for us and
[03:05:00] this is getting dark really quickly so I
[03:05:03] need to step up
[03:05:16] okay let's see
[03:05:19] how is this looking like
[03:05:22] runs like a charm wonderful
[03:05:27] everything seems to be a okay let's go
[03:05:30] get our
[03:05:31] go get our ball
[03:05:34] like that to one hand do we take this
[03:05:38] now we don't need that let's take a gun
[03:05:41] instead let's move in here
[03:05:46] I do need to go through the barrier
[03:05:49] um
[03:05:50] like through the glass to be able to
[03:05:52] teleport back and forward right which is
[03:05:56] uh yeah it is what it is
[03:05:59] besides that seems to be quite stable
[03:06:01] quite nice look at that sunset
[03:06:05] hopefully uh wait what do you see
[03:06:09] one second oh yeah yeah okay you can see
[03:06:12] it all that's fine
[03:06:14] um
[03:06:15] so the light could be for my hard work
[03:06:19] could be a little bit better I could now
[03:06:23] ramp up the
[03:06:25] oh that's nice I could ramp up the
[03:06:30] lumen
[03:06:32] Global illumination and Lumen
[03:06:34] Reflections well besides that look the
[03:06:37] fog and everything that seems to be
[03:06:40] quite nice
[03:06:43] those guys are pretty bright and gonna
[03:06:46] lie
[03:06:48] and it's kind of nice
[03:06:50] oh
[03:06:53] okay enough with the gun let's put it
[03:06:55] down on the table right here
[03:06:59] and oh the ball I still have the ball
[03:07:01] here I wonder if it's going to
[03:07:04] yeah that's nice
[03:07:06] sticks there quite quite well so now uh
[03:07:10] where was the door was it that one uh
[03:07:12] wait
[03:07:13] let's do some art people peel
[03:07:19] okay so that works
[03:07:21] and if I hit the door
[03:07:24] opens up just like that and just in time
[03:07:28] for us to come in here and see the
[03:07:31] Beautiful the beautiful light starting
[03:07:33] to hit
[03:07:35] this this environment of course like
[03:07:38] none of the stuff here is grabbable
[03:07:40] right we didn't didn't solve that but
[03:07:44] with that being said
[03:07:46] um
[03:07:47] I know that it's hard to convey the
[03:07:51] how do you call it
[03:07:53] it's hard to convey the the realism you
[03:07:56] know how how much in this space do I
[03:08:00] feel but this
[03:08:03] I mean
[03:08:05] at this point I would be happy to show
[03:08:08] this to the client and ask them what
[03:08:10] they think because this is close to
[03:08:12] reality honestly let's go out let's go
[03:08:14] out here
[03:08:15] we never looked at this side of the
[03:08:18] that's nice we never looked at this side
[03:08:21] of the
[03:08:22] building
[03:08:25] it's kind of neat
[03:08:27] it's that oh that's that's like a
[03:08:30] bathroom so situation there uh we can't
[03:08:34] get in can we uh
[03:08:37] okay that's a little bit annoying one
[03:08:39] second
[03:08:40] Boop like that whoop
[03:08:43] come on no
[03:08:46] okay it's raised raised floor so we
[03:08:48] can't get there but that looks nice
[03:08:50] anyway
[03:08:51] uh keep moving forward
[03:08:58] that's the child's room
[03:09:01] uh that's a mistake with texturing and
[03:09:04] the not the texturing the UV mapping hey
[03:09:08] it is what it is
[03:09:11] um speaking of which if you want this
[03:09:13] file this whole file right here consider
[03:09:16] wait am I talking where's the camera
[03:09:19] probably here so if you want this file
[03:09:22] right here consider helping out the
[03:09:24] channel by becoming a patreon member you
[03:09:28] will get the Unreal Engine file that I'm
[03:09:32] showcasing right now as well as the
[03:09:36] Rhino file for you know uh playing along
[03:09:40] 444 poop
[03:09:44] uh for following along rather right
[03:09:47] let's go in here
[03:09:51] put the ball there
[03:09:53] nice I'm happy I'm happy with this
[03:09:57] um with that being said
[03:10:01] ah
[03:10:02] that's below ground no no the floor
[03:10:07] that's fine I can work with this
[03:10:10] with that being said we are kinda done
[03:10:13] everything is stable uh the frame rate
[03:10:16] is I would say probably around or
[03:10:19] actually let me give me a second I'll
[03:10:21] type pin we'll see where the frame rate
[03:10:24] is at
[03:10:27] foreign
[03:10:45] the frame rate
[03:10:47] 40 something
[03:10:49] I can only see like with the headset the
[03:10:52] frame rate is a little bit off-center
[03:10:54] for me so I can only see the timings and
[03:10:58] the timings for the frames is 22
[03:11:00] milliseconds which I would guess around
[03:11:04] where am I I would guess that's around
[03:11:08] 45 frames per second the tiling there is
[03:11:12] bad I should fix that
[03:11:15] um besides that we're happy we're we're
[03:11:18] Gucci
[03:11:19] look at that
[03:11:22] look at the dynamic lighting yeah
[03:11:25] wonderful
[03:11:29] all right
[03:11:30] that's it that's it we're done we're
[03:11:33] done I'm happy
[03:11:35] I'm happy hope you've learned
[03:11:38] wait am I talking
[03:11:41] yeah there we go hope you've learned
[03:11:43] something I hope you've learned a lot in
[03:11:46] this course I really had fun doing it
[03:11:49] except for the all instabilities and all
[03:11:52] of the problems with you know this being
[03:11:55] the first iteration of lumen and nanite
[03:11:58] that actually does not crash immediately
[03:12:02] with Unreal Engine VR
[03:12:06] um once there is an even better more
[03:12:09] stable update I will of course update
[03:12:12] this course so
[03:12:14] be subscribed if you don't want to miss
[03:12:16] it and with that this beautiful sunset
[03:12:22] I will say I do
[03:12:24] bye
[03:12:32] [Music]
[03:12:39] thank you
