Upon reading back the events of last night, I realised that the quality of my writing is actually pretty terrible. I hope that in time the quality of these blogs will increase ten fold as I once again learn to write constructively. Much like with anything, practice makes perfect. So, onwards to practice development with Unreal Engine.
Yesterday’s progress went pretty well. I determine the success of that progress by running through the events in my head and seeing if there was any paticular area that I had forgotten. It seemed like it had sunk in, which is great! I know all I did was muck around with the viewport, but I can’t rush this and must take on as much as I can.
This is the first video!
The vdeo starts with showing my how to make a folder to store content in an easily accessable way. It then seems like the whole system is made up of levels which can be loaded and unloaded. I really like the thought of stating something with a level based system which allows me to show a sense of progress so I suspect a series of levels may be the first thing I make as a game.
When creating a new default level it appears to come with a few core elements which include a light source (Which is the sun) some atmospheric fog, a sky sphere and the player.
When selecting the starter set, there are some architecture types. The filenames of these are actually named in a certain convention that gives you the size of this piece from a glance. Placing these objects is as simple as dragging and dropping!
Placing an item seemed to have come up with an error message telling me “LIGHTING NEEDS TO BE REBUILT”. As you can see in the image below, the lighting is pretty poor, despite there being a light source. I’m hoping that the tutorial soon goes into lighting mechanics as it seems like the default area has changed in the latest version.
The next section discusses the Gizmo tool which controls the X Y and Z axis. I have seen this in a lot of programmes so understand its meaning. The fact that this video is explaining what they do, leaves me some hope that this essentially for someone really fresh. I was hoping that it wasn’t going to go over my head once it reached the fifth video!
So what is interesting is how the next section discussed how movement is based upon a grid system. The default grid is 10. So one of the points that was raised but glossed over quickly is how because the wall we had input into the scene was created with Units of ten, it means that they can snap together without any hassle.
Once you have objects in your world, be it a floor or a wall, other objects that you add tend to try to snap to other objects in the world. this is probably very helpful for designing level layouts.
Some time is spent showing the duplicate option, it behaves very similar to Adobe photoshop. The more comparisions I can make between this and other programs is probably best so I have a base understanding.
The video then goes into ways to duplicate, includign using Ctrl to select multiple objects or selecting them in the world outliner at the top right. What is really cool however is the way that if you hold Alt, you can actually duplicate an item straight away. I predict this would be very useful in creating symetrical room types!
The first use of Wirefrime top down mode is displayed! It allows for a easier view which allows me to see if objects have snapped together
First sign of progress in level making… I have made a claustrophobic box!
A little while later I start duplicating the floor in order to make a ceiling. There are a few isues in doing this directly because of the shadows. but a few tips on how to get this done is by changing the perspective to a side view
Or something pretty damn clever which i need to remember… While in perspective mode and selecting an object, tapping the ‘End’ key will tell that object to go down until it hits something! That is really useful! So now I have a room, completely sealed off to the outside world.
Some quick advice is discussed to create folders in the world outline viewer to stop everything being clutterd. in this instance we create a Room1Geometry folder and moved all of our walls into that folder.
Some work is done fixing the scale of the ceiling and the floor. It was wise to actually delete the ceiling and then fix the floor then duplicate it to decrease the workload. Created and duplicated some more walls and got this so far:
It then discusses the use of certain views. the top view wireframe mode for example means you can actually hold left click and select multiple items. but because the Skysphere is inside this invironment, it means that you can alter and duplicate that without knowing. It’s probably why I had two sky spheres when he brought it up!
We got rid of the floor and celing because they were overlapping due to conflicts with the sizing requirements. I’m quite pleaed by this as I actually spent more time trying to line it up and the scale options were not working properly. You can see in the image above it over spills!… Then, there’s an interesting addition which shows how to replace objects in the game with something else. If you select an item from the list at the bottom of the screen, then right click an object inside the view port, you can replace that with the item you have selected. Very useful!
This does cause another issue, any object that is replaced does not replace the file inside the folders we set. so the Room1 geometry folder will be missing a piece and the new piece is going to default into the standard folder. We simply just need to move the new piece into the correct folder.
I went on and started replacing a few more walls with doors and windows and eventually got to this:
The next video up is this:
This puts in some details about building with Geometry, which I suspect is the way we should be able to build better ceilings and floors. Using this system is not intended for super fancy stuff but they are building blocks. intended for blocking out the level and temporary position of things. One of the thigns that could be done is edit it inside the Unreal Editor, bring it into a modeling software, edit it some more and bring it back in. Proibably very useful for prototyping and would allow for multiple users to polish the game further while one works on the code.
First things up, the modes area on the left has a Geometry option. I dragged one of the boxes into the viewport and plan to make a celing out of it. Renamed it CelingRoom1 and this is how it looks so far, an odd box balancing on a wall:
I adjusted the size of the box within the top view perspective and adjusted the scale of the box on the far right settings in the details area. It was interesting to note that these geometry pieces could be changed at any time to another Geometry piece like a set of stairs. The problem I had here was scaling. So if I adjusted the scale of the X, it would mean that both sides would increase relevent to the centre of the item. So if I completely flushed an entire corner, then tried to drag, it would then no longer be flushed with the corner. This is a bit of an irritance but there must be a reason why this happens. Anyway, thick ceiling is placed!
Once set, I had to change the snapping grid to mke some subtle adjustments as it did leave a seam that was not connected…. I spent some time actually trying to predict what the videow as goign tot ell me because the seam was not perfct and actually ended up overlapping. So I tinkered witht he brushes scale option and the grid to try and get the celing to look as best as it could.
I even skipped ahead and fixed the floors. Feelign a little more comfortable with creating basic rooms.
Came across some Z fighting where two visual elements are battling to become the visible object. this was caused by the floor being placed inside parts of the wall from the other room. I know a way to fix this, but I will choose to wait and see what the tutorial offers as I do not want to fight against self created issues.
I decided instead actually against my better judgement to try and fix this Z fighting. I reduced the Scale of the floors X so that it fit smugly into the room… it has created a line where you can see the top of the wall from the next room, but I may be able to adjust this soon. The picture may look completely diffeent because I chose to unlit the scene due to shadows causing a bit of a pain to see anything. (I remember asking why would you turn off lighting… Now I know why!)
Now to palce down some stairs! Clicking and dragging them from the Geometry menu brings them in, i had to actually rotate them round. What was important is that once you clicl, if you double click you enter a mode which lets you edit the properties of this object. On the far right you can also select details like thehieght of each step and the number of steps.
I changed the perspective so i could get a decent side on view in wireframe mode. from here I can make sure that everything is where it should be and that I’m not leavign any gaps
So the beginning of a small house. Next up looks like we’re going to be talking about the actual player. Really excited! by default because we are using a template thee is already a player built.
There is a tiny blue arrow that can’t be edited directly. However rotating the player character does rotate this arrow. This arrow represents the position the player will face when spawing. its wise to remember that you should hit ‘End’ to make sure the charcater snaps fully to the floor… I’ve played so many games where the character does an odd drop when loading into an environment. I hope that this simple fix isn;t that reason, because thats kind of awful!
One of the issues I had found which was not visible int he tutorial videow as “LIGHTING NEEDS TO BE REBUILT” I ignored this as I wasn’t sure what this means. But it looks like the changes in the version that i am using compared to the tutorial means that this message displays at all times even while in editing mode. Previously, this message only appears when playing the game… I don’t know why that was the original default choice, but I’m pleased that this message is part of the editor.
I hit play, and now I’m a robot…
There’s nothign to do in this world, being a robot is not all it is cracked up to be! Time to leave the play option and start working on the other parts.
The video discusses that the brush options so that we can aparently fix our ceiling. He states that Brushes have two modes, additive and subtractive. Additive adds to the world, subtractive will remove from the world from other geometry
Here is a box that is additive, it’s actually merged through the environment. So it kind of adds to it. Although it looks ridiculous
and here si the same box with subtractive set in the details menu. This means that you take away from what is currently there. In this case, I’ve created a lovely celing window…
It also seems to remove the collissions from the object too so this little robot fellow can jump
Things get a little tricky here. The person who makes these traielrs uses MODO, which is a graphcis engine which from what I can tell is paid for. I am poor! So I decided to try and use the alternative.
We’ll soon see if I get stuck!
The guy in the tutorial tell me that the brushes are not really reccomended. you want to convert them to meshes because it has less of a hit on performance. In the details section there is an option to convert into a Static Mesh.
I put it into the content and call it SM_Room2Celing… The SM stands for Static mesh and the CeilingRoom2 indicates which room it belongs to. Once created it appears in the My content section in the content browser with some new properties
Right clicking allows me to select to export it… I’m not exactly sure how important it is, but the guy in the tutorial says that he plans to use an FBX file. He also seems to place it in a temp folder, of which I don’t know the importance of yet.
Ok looks like its time to boot up Blender that i downloaded…
Well, I don’t even have the faintest idea where to start! Am i going to need to take another course on Blender?
So far so good, it looks like the FBX file is not recognised by Blender? Google is your friend though!
So I now have a giant square in the middle of the scene. Onwards to the video tutorial
I managed to add a Square as instructed… But god knows how I manipulate the camera so I can look around the environment. It controls differently than the Unreal Engine so I probably need to take on a seperate lesson for Basic Blender use!
Oh, its middle mouse button to orbit camera
Exported this out as an FBX file again with “modified” attatched to the file name. I imported it in with a bunch of options. But looks like i leave them as default for now because it does not have a skeleton for animations.
On the import I got a few issues, I think these are pretty unavoidable without any direct understanding of the 3D moddeling program. so for now, going to leave this be!
So instantly, I made a mistake somewhee, despite importing a single file with the cube and the flat surface, it actually split them into two objects… I don’t know why… But it did.
I managed to fix the error code which relates to an object not havign smoothing (It was the cube)… But they are still importing as two individual objects.
So onwards to another tutorial… this time it was this one:
So this is the scene, it’s a default scene…
the three objects here are the cube, which is selected (we know that because of an orange outline… there’s also a camera which is used to render a scene and there’s actually a lamp object, which if I’m being honest i didn;t even see the first time I booted this up!
I skipped through a few tutorials because I wanted to see if there was a quick guide to export… Alas, it requires a subscription… So Onwards to find another tutorial!
How about this video: https://www.youtube.com/watch?v=iO5QHmBv4BU
Ok, that was not helpful either. Exporting out the Mesh seems to imply that the Mesh is actually not really there. I’m struggling to find any reason why this is happening so I’ve given up on this for now and will continue with the tutorial.
So in order to make a static mesh which has a subtractive box attacthed to it you need to create a Static Mesh directly from Both. Meaning that you need to select both at the same time and then click the “Create Static Mesh”… Then had to create Static Mesh’s from the other rooms too.
After this was done I hit the Play button and…. Oh dear
I fell through the floor, looks like none of the meshes have collision… I wonder if the tutorial is going to fix that or if maybe I did something terribly wrong here!
Turns out nope, It looks like we’re moving on to lighting… However because i really don’t want to go too far into this video knowing if I messed something up, I decided to revert the Static Meshes that i created and hit Play… It turned out that converting the Brush into a Static mesh had removed its collision. Reverting them back into a Brush fixed this and i wouldn’t launch through the floor.
Ok, So It seems like the collision from the Box brush item (Which I think is called a BSP) does not maintain the collision. So I Will need to enable the collision on the Static mesh that I had created. This means right clicking and selecting “Edit”… I’m going off track from the tutorial here!
Once I’ve opened the Static Mesh in the Edit tool, I can change the properties with the selection window at the top which is titled Collision. I can from here choose to Add box simplified collision which sould hopefully give the floor some collision!
So the problem I faced here was that clicking that option actually ended up not really changing anything visually within the editor. I really struggled to find out how to view colision. I did also click on the giant Colision widget at the top of the screen. And sure, it showed some lines, but those lines were around whether I enabled Collision or even removed it. I need to probably spend a lot longer on collisions but at the very least I managed to stop my robot from falling into the Abyss… Now to change all of the other BSP’s into Static Meshes.
However, with the celing that had a whole in the middle of it, it would seem that the same method of adding collisions caused the hole to maintain its collision
It seems like I need to find another soloution to this
After bout half an hour of mucking around with the edit option I decided it was probably best to actually boot up one of the starter kit pieces, Specifically the door, and see how they handled collision for that object.
I discovered that what they had done was change the collision options… It was just a single drop down option and it worked perfectly… I almost feel stupid but at least I’m learning… Now the Robot has his fancy celing window
I was dreading the Stairs, wondering if it would cause any isues. however with the newly discovered skills of selecting a freaking option from a drop down menu. I was able to add the collission to the stairs in seconds
Now it was time to move onto the next video, lighting. Finally!
The lights are found in the far left mode section, of which there are four types
Directional light = Basically the sun/ universal light source that is normally far away
Point Light = A light which makes a radious in a certain area.
Spot Light = A cone
Sky Light = basically gives an overal lighting effect… From first glance looks more like a filter. But sure there is more to it than that. Oh It looks like if you change the colour, it changes the colour to quite a great deal of areas. including through walls… So if you wanted to make the Ipod Advert with sillohuettes and a Red background, this is probably what you use.
So ocne the Spot light was revealed in the tutorial, spent some time muckign around with it to create a pretty horrifying image… OoooOOooooOoooo…
I love playing with lighting effects. I was so enthralled by the lighting I made a quick video of it.
Back to business after that mucking around…
I hit the “build button at the top which then builds the light within the environment including any brush geometry shapes. It turned everything black! And the reason for this according to the video is because there is not a big enough window in the environment to help light the scene. So time to palce down some point lighting!
After building the lighting, it then shows that we don;t have any lighting on the floor or the celing, the reason for this is because we do not have any materials assigned to them
The tutorial finaly hits play and the narrator realises that they fall through the ground! I could have waited to have fixed this because he’s going to show me, but man. I kind of felt good that I managed to fix it myself earlier with common sense!
So after placing four lights together. only three of them work very closely with dynamic lighting? I had a bit of dificulty following this, but there is definitely something happening with the four lights as one of them has a giant X on it:
The recomendation is “Fo the most part you’re going to want to use static lighting and Moveable seperatly…
the problem we have with Static lighting is that the lighting can highlight the hard edges of a mesh. In this image you can clearly make out when the end of the mesh stops for the window piece with a vertical line
In order to fix this we need to make sure that our UV maps (UV mapping is the 3D modeling process of projecting a 2D image to a 3D model’s surface for texture mapping.) are as clean as possible along the pixel edges. There are ways to hide this by creating pillars.
However it is recomended to build your mesh properly by building walls as one continous unit so there’s no chance of having an edge issue… I can already predict a way to fix this… And that might be to combine three wall pieces as a single static Mesh… I’m gonna try it actually! Time to experiment…. However looks like you can’t turn three objects into a single object… So Back to listening to the tutorial to see how they fix the issue
Ah it looks like I was right! Here’s what it shuld look like and how to find the selection to merge the objects (or actors as they are called)
However I did I mistake when trying to replace the current wall…
I fixed it, replaced it with a single wall, but it seems like despite it being a single mesh, there is still a Seam for some reason
I attempted it with the rest of the walls and it brought with it more issues. Clearly I am doing something wrong.
I repeated the tutorial several tiems, unchecked boxes that I thought was problematic but unfrotunately the issue remained. Changing the lighting type to Movable fixes these seams. But I had some trouble combining actors as they seemed to show the seam anyway!
But I figured out what the issue was and managed to fix it. Aparently what is happening is that the tutorial was using Stationary lighting which is a mixture between static and Dynamic lighting. I was however only using Static lighting and it was causing these inconsistencies. Changing the lighting effect to Stationary or Dynamic helped remove the lighting issue that I had
So the movable lighting (Dynamic lighting) offers smooth edges but at the loss of some performance. The static lighting seems to take up less resources, but a lower quality, while the stationary lighting is the hybrid of the two.
So after a while I begin lighting the second room. not looking too shabby eh?
I also adjusted the first room to have a yellowish colour to it. Not satisfied with the lighting here but the ceilings and floors have no texture material attatched so it might look improved soon
So looks like that’s the end for the lighting! Whew! A lot of the groundwork has been done. And man this is a long blog post! For those of you who stuck with it to the end. Congratulations, here is a robot booty
See you in the next one guys!