Main

SciFi Scene Tutorial - Quest 3 & Unreal 5

Verschafft Euren eigenen Räume in der Meta Quest 3 mit Hilfe des Unreal 5 Mixed Reality Utility Kits eine Science Fiction Optik. Jeder virtuelle Raum passt sich dabei den Gegebenheiten des echten Raums an. 0:00 Intro 0:42 Vorraussetzungen 1:24 Projekt erstellen 2:02 Projekteinstellungen 3:46 Levelinhalte 6:22 Daten importieren 8:29 Material erstellen - Boden 10:20 Blueprint erstellen - Boden 11:10 Material erstellen - Decke 11:51 Blueprint erstellen - Decke 12:12 Material erstellen - Wand 12:47 Blueprint erstellen - Wand 13:25 MRUKAnchorActorSpawner zuweisen - Decke / Wand / Boden 15:22 Level Blueprint 16:10 WorldAlignedTexture 17:24 Material erstellen - Möbel 24:03 Material zuweisen - Möbel 29:25 Blueprints erstellen - Möbel 36:48 Blueprints einbauen Tutorial Unreal 5.3.2 & Meat Quest 3: https://www.youtube.com/watch?v=vvrIWj0_7jg&t=1s Meta XR MR Utility Kit: https://developer.oculus.com/downloads/package/meta-xr-mr-utility-kit-unreal/ SciFi Objekte & Texturen: https://drive.google.com/file/d/1WYMaf9zyHrB3wgXM7d5gLHNNNQLGeWD-/view?usp=drive_link

Mixed Reality Dev

2 days ago

Have you always wanted to give your rooms a completely different look? Maybe a little science fiction and walk around in it? Thanks to your Meta Quest 3 and the Unreel 5 engine, this is not a problem at all and not that difficult to implement. In this tutorial I will show you how your virtual environment in Quest 3 adapts to your rooms and their furnishings. You can let your lamps shine or have cabinets or pictures created at random and every room that you have previously scanned will automatica
lly adapt to the circumstances and Quest 3 now recognizes different rooms in the apartment. Hi, I'm Christoph from existo anima and we're starting. As a prerequisite for this tutorial, your Meta Quest 3 should be connected to Unreal Engine 5. If you haven't done this yet, please watch the relevant video. I'll put the link to it in the description below and in addition to the Meta XR plugin, you also need the fairly new "Mixed Reality Utility Kit". I'll also put the link to it in the description
below. Download the utility kit and unzip it into your current Unreal folder like the Meta XR plugin. For me it is version 5.3 and there under Engine - Plugins and Marketplace. So we're starting a new project - Games - Blank - Mobile - Scalable and I'm calling the whole thing "MRSciFi". So, first we go to Edit - Plugins and activate the MetaXR plugin and the new "Mixed Reality Utility Kit". We also deactivate everything in OpenXR if it is still activated. Now Unreal needs a restart. So, next we
have to make a few settings in the “Project Settings” so that the Quest 3 and Unreal 5 can interact the way we want. For Input, "Default Touch Interface" should be set to "None". When rendering, we set the "Mobile Ant-Aliasing Method" to MSAA, deactivate "Mobile HDR" and activate "Mobile Multiview". On Android you have to activate the "APK Packaging" up here, it should then turn green, "Minimum SDK" at 29, "Target SDK" at 32. Further down you have to activate "Support Vulkan", deactivate "OpenGL
ES3.2", You can also check “Package for Meta Quest Devices” and check “Remove Oculus Signature Files” . Android SDK: the correct paths should be here and SDK should be set to 32 and NDK to 29. So, now under “Plugins” under “Meta XR Plugin” the API is set to “OculusOVRPlugins”, I set “Color Space” to Quest 1 and under “Supported Meta Quest Devices” I set Meta Quest 3. Then you need three more checkmarks further down: once for “Passthrough enabled”, “Anchor Support” and “Scene Support”. Well, tha
t should have been it. Now a restart is necessary. Now we create a new, empty level in a new folder called “Blueprint” and in this folder we create a new “Pawn Blueprint”. I'll imaginatively call this "BP_Pawn". This is us in the room, so to speak. So and so that we can see something, we need a pair of eyes or a camera through which we can look. To do this, we open the Pawn blueprint and add a camera to it using “add”. Then click “Compile” and we can close this. We drag the "Pawn Blueprint" into
the new, empty level and set it to 0 and set the "Auto Possess Player" to Player 0. Then we open the "Place Actors Panel", look for the "Skylight" and move it in too The level where it goes doesn't really matter. Under the details we select “Source Type” under “Light” and select “SLS Specified Cubemap”. Now we can select the “Daylight Ambient Cubemap” directly under “Cubemap”. We do this to get nice all-round lighting with nice reflective properties . So now all we need is the “MR Utility Kit A
nchor Actor Spawner”. level. Now we already have everything we need as actors in the level and we save everything. We still have to give the level a name. This time I'm calling it "MRSciFi", and we also have to go to the "Project Settings" again and set our "MRSci-Fi Level" here under "Maps and Modes" so that it is also called after starting the program. Now we can assign all specified objects to blueprints in the Actor Spawner under "Spawn Groups" and that is also the big advantage of the new u
tility kit. With the “Oculus XR Scene Actor” we could only assign static meshes, i.e. static objects. Now we can give our objects different properties such as movement or light and adapt them much better. If you want to follow this tutorial closely, feel free to download my own textures and objects, you can find the link below in the description. You can simply unpack the file into any folder that you can easily find under Unreal. Then you create two folders, one “Texture” and one “Static Mesh”
and then import the appropriate content here. When importing the fpx files, you can select “Do Not Create Material” under Material and deactivate “Import Texture” because we will create our materials ourselves. You can ignore the warning after the import. Now you have all the furniture and textures we need for our sci-fi scene. We still have a small task before we can really move on. We open the textures folder, select all textures and go to "Edit". Now we have to select “NoMipMaps” for each tex
ture in “Mip Gen Settings” . Why are we doing this? Mipmaps are, so to speak, the LODs of the textures, which means that if we are further away from a texture, it is replaced by a lower-resolution image to save memory. In VR, however, A: the images are blurry and B: you can see the conversion. Neither is so nice and since we're doing this whole scene for ourselves and can therefore afford to work with full textures all the time, we'll take them rough. Otherwise, feel free to try out what it look
s like with MipMaps. I already mentioned that we no longer use static meshes for the walls, objects, etc. but instead use blueprints. However, we have to create this first. First we take care of the walls, ceilings and floors. You only imported one mesh. This is a flat plate that we can use for all three. Now we still lack the material. To do this, we create a material folder and a new material in it. I give this the name “M_Floor” and open it. The texture I need here is "Floor_diff" and "Floor_
refl", i.e. for reflection and drag these two in. I connect "Floor_diff" to the "Base Color", I give "Floor_refl" a "Multiply" and connect it to an "Emissive Color". The “Multiply” with another “Multiply” and this one with a “Constant 3 Vector”. Here I set a blue color 00 - 0.05 and 0.35 and reinforce this by entering 100 here. Why am I doing this? I would like to have a dark blue tile with light blue lighting around it. The whole thing should also reflect nicely, so I add a “Constant” to “Rough
ness”. This remains at 0. Oh yes and select “M_Floor” again and select “Two Sided” for Material. So it doesn't matter what orientation the plate has. That should be it for now, but we'll come back here soon. Then I will show you why. We still have to assign the texture to the static mesh floor. We can also do this directly in the blueprint . So, for this we create a new blueprint in the blueprint folder, namely an actor and we call it “BP_Floor”. We open this and go to "Add" under "Components" a
nd look for the "Static Mesh" here, then to the right and here under Static Mesh the "SM_Floor" Insert, "Compile" once and now we can select "M_Floor" under Material and then under Transform - Mobility we can set "Static" because the floor will no longer be moved. The next material is for the ceiling. Create new material, name it "M_Ceiling", open. So, I give the “Base Color” a color directly, i.e. a “Constant 3 Vector”. As the color I choose 0.023, 0.026 and 0.038 and I connect "Roughness" agai
n with a "Constant" 0 - 0. Here too we give the material "Two Sided", close and save. To save time, I duplicate the floor blueprint and name it "BP_Ceiling", open it and change the material to the "M_Ceiling" I just created. Now comes the material for the wall. Here we can make use of the floor material, duplicate it and give it the name “M_Wall”. Here we're just swapping out two textures. Once you select the one that is connected to the "Base Color" and select "Ceiling_diff" under Texture and o
n the other instead of "Floor_refl" - "Ceiling_refl". The difference between this material and the floor material is that the glowing edge is slightly smaller. So, we duplicate our floor blueprint again and call it “BP_Wall”. Here you first go to the viewport and select the “Static Mesh”. Since we want to have a wall we have to raise the plate. To do this, we enter 90 - 0 - 90 for Rotation in the transform field and select "Static" for Mobility and then "M_Wall" for Materials. Now we have our th
ree required blueprints and can assign them under the “Utility Kit Anchor Actor Spawner”. Here you go to the "Spawn Groups", once in "Ceiling", open the index and select "BP_Ceiling" under Actor, we leave the rest like that. "Stretch" in Scaling means that the ceiling is adapted to the entire scanned ceiling. We do the same thing with "Floor", only we select "BP_Floor" for the actor and the same thing again with "Wallface". Here we take “BP_Wall” and also select “Matech Aspect Ratio”. Here the a
ctor then tries to rotate so that it best fits the scanned template. That 's exactly what we want. So now we have our room, even though it is still empty . Now we have to define the procedural material, which is the material that will be applied to our spawn groups, i.e. our walls and furniture, if we haven't defined anything here. Accordingly, the empty room would now be shown with blocks of our furniture. Here we can either deactivate “Fallback to Procedural” or we can look for the “MI_Highlig
hts_Translution” material. That's what I'm doing in this case. Now there is still a little thing missing so that we can look at the scene in the glasses, because they don't yet know that they should use the scanned space. This requires another command in the “Level Blueprint”, so let’s open that. Here, we connect the "Event BeginPlay" with "Load Scene from Device Async" and "Compile". Now we can put our room on the glasses for the first time and then start it in them, not directly from Unreal, b
ut directly in the glasses. And we are in our SciFi room. If you only see a black screen after starting it, simply close the app and start it a second time, then it should definitely work. Now we'll take another look at the floor. I would like a tile pattern here. Accordingly, we open the material "M_Floor". What we need now is a "WorldAlignedTexture". With this we can give a texture a fixed tile size, no matter how this texture was enlarged and we don't know that because every floor in a room i
s different in size. We connect “XYZ Texture” to an “Emissive Color” and on the other side to the texture. However, we still have to include this here Convert it into a “Texture Object” with the right mouse button, and we also have to choose a size for “Texture Size”. We do this with the “Constant”. For me, 32 fits quite well here. Remember, if you choose larger or smaller, this must be done in powers of two, i.e. 8 - 32 - 64 etc. We also change the texture in the ceiling for the "Base Color". I
f we now upload the room in the glasses and look at it there, we have a beautiful tiled floor. Then let's take care of the furniture now. Before we can place them in the individual spawn groups, we have to create their blueprints and assign materials. So let's create a few more materials. To create a bit of a colorful atmosphere we need a few bright colors, for example green. So we create a new material in the material folder and call it "M_Green", open it, create a "Constant 3 vector" with the
values ​​0 - 0.3 - 0, connect this with a "Multiply", the whole times 100 and connect it with an “Emissive Color” - done. Then I would like a red color. To do this, I simply duplicate the green one, name it "M_Red" - open it again and change the color to 1 - 0 - 0.02 and in the "Multiply" to 6. So, that's it. Then blue. Duplicate the green material again - open "M_Blue" - change color to 0 - 0.05 - 0.35. Done and I would also like a pink one, so duplicate - "M_Pink" - open - I take the values ​​
0.32 - 0.005 and 0.22 and set the "Multiply" to 10. Also done. So and as the last bright color I would like to have a yellow, so duplicate again - "M_Yellow" - open - change color to 0.28 - 0.23 - 0. That's it. Now we need a few non-luminous materials. Once for the door frame, a new material "M_Door" - open - click on "Two Sided" - "Constant 3 Vector" and as the color I choose 0.023 - 0.026 and 0.038 and a reflection would also be nice, so a "Constant " for "Roughness" with the value 0.1. Apply
and close. For the screens we also need a black, so duplicate "M_Door", I call this "M_Monitor_black" - open and I almost never like to use completely black as the color, so I make it 0.005. I do this three times and set “Roughness” to 0.2. So we have pictures hanging on the wall, so a new material. I call this "M_Image_1" - open - so we go to our textures and drag in Image 1, connect it with the "Emissive Color", then the whole image looks a bit backlit. We now do the same with the other two im
ages, so duplicate "M_ Image_1", call it 2, open textures, select "Image_2" - done and do the same again for "Image_3". Then duplicate the whole thing again, call it "M_ Window" and then add the window texture here. So, then we have a nice view out of the window and now do the whole thing three more times for the monitor images. I call these "Monitor_1" and "2" and "3". I'll explain to you later why I'm using three. So, I know the whole thing is a bit annoying, but two more textures and we have
it. You're probably wondering what's next, but we also have plants and they need some green and brown soil. But it goes quickly. New material, I call it "M_Ground" put a tick in "Two Sided" - Constant 3 Vector" and as color I take 0.15 - 0.05 and 0.023. And another new material and I call it "M_Plant" - open - "Two Sided" - "Constant 3 Vector" and as color I use 0.03 - 0.24 - 0.028 and for "Roughness" a "Constant" 0 - 0, it should be a futuristic plant that is allowed also reflect a bit. Done, t
hat's it with the textures. So, we now have to assign these textures to the objects. You can of course do this very easily according to your wishes, I'm just showing you my ideas here. Let's just start with the beds. So, the large bed "M_Ceiling" and the light strips turn green. I do the same with the small bed and also with the two chairs, large and small. Now come the three cabinets. Here I use “M_Yellow” for the first element, then “M_Blue” and “M_Door” for the third. Then for the door, eleme
nts 1 and 4 will be “M_Door”, element 2 will be “M_Red” and element 3 will be “M_Blue”. The large lamp elements 1 and 3 "M_Ceiling" and element 2 "M_Green". The small lamp Element 1 Ceiling, Element 2 4 and 6 "M_Blue" and Element 3 and 5 "M_Green". Let's move on to the monitor. Element 1: "Monitor_black", Element 2 "M_Green" and Element 3 "M_Monitor 1". Now we come to the three images: Element 1 “M_Door”, Element 2 “M_Blue” and Element 3, where we put the image “M_Image_1”. By the way, the image
s were all created with Adobe Firefly to avoid any copyright problems. So I'll do the same thing I did with "Image_1" with the other two images. Now we come to the plant and from top to bottom we take “M_Door”, “M_Ground”, “M_Plant” and for the fruits “M_Pink”. Now the table. This gets "M_Green" and "M_Blue" and last but not least the window, here we take "M_Door", "M_Window" and "M_blue" - done. Let's move on to creating the blueprints, which means that compared to the previous " Oculus So let'
s start with the beds. Beds? Why several? Well, a single bed and a double bed, depending on what is available. So a new Blueprint - Actor and we call it "BP_Bed_Small", open it - now we have to set a "Static Mesh" again under "Components" and assign the small bed to it - Compile - done. Simply open “BP_Bed_Big” and replace the bed with “Static Mesh”. The assigned textures remain - Compile - ready. Then we have the images, so new blueprint - Actor "BP_Image_1" - open - "add" "Static Mesh" - selec
t "Image_1", here we now have to change the orientation, otherwise the image will be at a 90° angle wall hanging. So enter -90 in the “Z rotation”. Here you have to try a little to see which alignment is correct - compile - done. Here we can simply duplicate the Image Actor twice and replace the respective image in the “Static Mesh”. Now let's take a look at the chairs. Here we can grab a bed and duplicate it twice and then rename it - open it and switch to the chairs in the "Static Mesh". I do
the same with the door and window. Here I take the "Image_1", duplicate it twice, rename it, then open it and swap it. The advantage that I have taken the actor from the image is that it is already aligned correctly. If you have taken another actor, make sure that the "Z rotation" is set to -90 again and change the "X rotation". Location" to +10, otherwise the picture may disappear into the wall. Now let's take a look at the lamps. Here we can duplicate a chair, rename it and open it again, repl
ace the whole thing again with the "Static Mesh" and now there's something new. It's a lamp and it's supposed to light up, so in "Components" you go to "Static Mesh", then to "Add" and look for the "Spotlight". We now have to adjust this a little so that it also shines upwards. My "Z value" is at 28, my "Y rotation" at 90. I also set my light color a little warmer to 1 - 0.98 and 7.3. So, "Compile" - done. Then duplicate the lamp, change the name to "BP_Lam_Big" - open it - to "Static Mesh" and
swap the lamp to the big one. As you can see in the viewport, our light is now too far down, so select 140 for Location Z and I also make it a little brighter than the small lamp and increase the intensity to 8000 - "Compile" and done. Now let's take care of the monitors, there are three of them. Here we duplicate our "BP_Image_1" and name it "Monitor_1", open "Static Mesh" - change to Monitor - "Compile" and done. Now we need two more blueprints as monitors and duplicate the first one twice, op
en them one after the other, go to "Static Mesh" and only change the last monitor texture here, since with the monitors only the image should change, but not the object itself , we can use the same “Static Mesh” on all three monitors. So, for the plant we duplicate a chair again, call it "BP_Plant" and select it in the static mesh - "Compile" and that's it. Now we have three more cabinets here. Duplicate the chair again, change the name "BP_Cupboard_1" - open it - select it in the "Static Mesh"
and now we see in the viewport that it also needs to be rotated. So "Z-Rotation" 90° - "Compile" and close. Duplicate this cabinet two more times. We'll simply rename it "Cupboard_2" and "3" and change the "Static Mesh" here accordingly. So, the last thing we need is our table. Here we duplicate our cabinet, name it "BP_Table" - open it again - replace the "Static Mesh" - "Compile" and close. So we've done it, now we have all the blueprints we need and can install them in the "MR Utility Kit". W
e click on this and now go through the individual spawn groups below. Let's start with the bed. Here we click on “Add Element” twice because we have two different sized beds. Under index 0 we select the actor "Bed_small" and the actor "Bad_big" at index 1. We also select the "Match Aspect Ratio" for both indexes in order to rotate the beds so that their aspect ratio best matches the default and We choose “Closest Size” for “Selection Mode”. So Unreal tries to use the most likely bed in terms of
size and so the probability is greatest that a single bed will be used with a single bed and a double bed with a double bed. We already had the ceiling, so let's get to the couch. Here too we take two indexes - one the small and one the large chair. In the "Selection Mode" we set it back to "Closest Size" and the "Scaling Mode" we set both to "No Scaling" because I used the chairs or seat boxes so that the average seat height corresponds to a normal one. It's best to try out for yourself what ha
ppens if you use "Stratch" or another option instead and sometimes another option may even make more sense for your setup. So "Door_Frame ": Here we only have one and so we can leave the rest. We already have the floor, so let's move on to the lamps: Here we need two, large and small, and for me I decided on "No Scaling" for both of them. “Selection Mode” back to “Closest Size”. Let's go to the plant: Here too we only have one "BP_Plant" and here I use "Uniform Scaling", the plant should adapt a
little to the size of the original plant, but not be strongly distorted in any direction. So now we come to “Screen”: We have three screens, so “add Element” three times and select them for the actor. Then I also select “Uniform Scaling” here and I also select “Match Aspect Ratio” and “Calculate Facing Direction” for all three. So the monitor should then look at us with the image, and we also leave "Random" in "Selection Mode" because all three monitors are the same size and should only differ
in the image on the screen to be chosen. So, "Storage": Here we add our three cabinets, so "add element" three times and add the cabinets to the actor. "Selection Mode" "Close Size" so that the best possible size is taken. We also leave the "Scaling Mode" on "Stretch" so that the cabinets adapt exactly to the specifications and select "Match Aspect Ratio" and "Calculate" for all Facing Direction". Then our table arrives: Actor "BP_Table" - "Match Aspect Ratio" on - "Calculate Facing Direction" o
n and we leave the "Scaling Mode" on "Stretch". "Wall_Art": now we add our three images - three times "add element" - for the actor "BP_Image_1" - "2" and "3" - "Scaling Mode" - "Uniform" - "Selection Mode" we leave it on " Random" and "Aspect Ratio" and "Facing Direction" - here we tick the box again. We already have "Wall_Face" and all that's left is "Window_Frame": We only have one window, the "BP_Window" and the rest can stay like that. I ignored “Other”. If you have stored something here wh
en preparing the room, it will not be displayed. But if you would like to have something here, just build a cupboard or a chair here. Well, that should have been it. Now you can upload everything and start the whole thing in your Quest 3 and try it out in your own rooms. Yes, I hope you enjoy it and see you next time.

Comments

@FramePR0

Hi Christoph, Coole Inspiration, Danke :) Aber die Anwendung auf der Brille wäre noch ccol gewesen. Werden für den Spawn der entsprechenden Actors, die bestehenden Scanndaten Verwendet? Wenn Ja erkennt er das aufgrund der Lidar gescannten Einrichtung oder muss der Raum bereits virtuell eingerichtet sein beim Start der App?