Post subject: Perfect Dark in Unreal Engine 4.
OliviaRose
She/Her
Joined: 1/15/2017
Posts: 2
Location: Australia
Hey everyone! My name's Olivia and I'm a big fan of TASvideos (and everything about video games in general). I'm only newly registered here, though I've been following (read: lurking) the tool-assisted superplay community since the first Super Mario 64 runs came out. Anyway, I thought I'd see what you guys think about a new project I'm working on... It's not an original idea by any means, though I thought I'd finally give it a try for myself. The title gives it away, but just to elaborate a little, my goal is to faithfully re-create the original N64 Perfect Dark in Unreal Engine 4. Perfect Dark is one of my all-time favourite games, and while I know that I'm never going to be able to satisfy my end goal to the degree that I can one day call it "complete" (I'm a real perfectionist), it's going to be a lot of fun trying! So far I've spent a total of about 12 hours setting up the tools and seeing what works and what doesn't, but I've made considerable progress in that time. I've uploaded a video of what I've accomplished so far which you can view below. Link to video There are captions on the video that explain certain points of interest, though I thought I'd use this space to elaborate on them slightly. The level geometry Firstly, you'll notice that the geometry is ripped straight out of the original game files. I'm doing this for two reasons at the moment, mainly because of the time saved, but also because I can. I'm not sure if at a later stage I'll decide to "improve" upon (and remove/fully replace) the graphics of the original game past simple geometry and material edits, but who knows what might happen. In it's current state it would be very difficult to do so, for multiple reasons... The gameplay and player character Unreal Engine 4 comes with a few example "games" and tutorials that you can play and/or use to build upon. I decided to use the core game files of the "Shooter Game" demo and simply replace the entire level. This worked out to be quite effective in practice as all the player movement and interaction was already sorted out (which can always be tweaked later). This meant I had a good framework to jump into prototyping almost immediately. The tools The tools that I used to export the level files are quite powerful, though I'm still figuring out how to use them properly... There's more than one way to actually do this, some easier than others, and I'm not sure I'm 100% sold on any particular one of them just yet. One "problem" that this first export suffers from is one-way vertices. Basically, the surface of the polygon is visible from one side, but invisible from the other. You can see this very clearly on the multiple rails found throughout the level. I may have missed an option somewhere to fix this, but that's what trial and error is all about, right? Moving around Collision is detected on a per-vertex basis, meaning that every single polygon in the model is "solid". Even the one-sided ones, so no running backwards through invisible walls. Because the entire level was exported as the one whole model and not multiple rooms (more on this in a moment), all 13,241 triangles and 25,178 vertices must either be solid or not solid. I'm not sure if there's a way to edit this in the engine at this stage, but as long as you physically remove unwanted objects from the level and/or export and re-import them later, it's not really a problem. How the original game handled textures and shadows There's some flickering with textures that I accidentally left in the model. From my limited understanding of how the original game handled shadows, I believe they were rendered as a transparent texture (like a sort of "decal") hovering just over the surface of the wall/floor it's projected onto. When I say "just", I mean so close to the surface that they're basically touching. As far as I'm aware, the flickering in the Unreal Engine is because it can't decide which texture is in front of the other and tries to render them both at the same time. I removed most of these baked-in shadows before export, but clearly missed a few obvious ones. What I removed Here's short and not at all comprehensive list of all the "objects" in the level that aren't considered part of the core geometry that were removed: Enemies Doors Glass panes (destructible) Weapons Ammo boxes Furniture Switches Destructible wall segments Security cameras Elevators Terminals The original game engine and it's quirks You'll notice a big gaping hole in the wall of Cassandras office. This is because the original game engine renders levels as multiple "rooms". A room doesn't necessarily have to be an entire room, or even indoors for that matter, and most actual game rooms above a certain size are made up of multiple "sub-rooms". To save processing power, only the rooms you're currently in and can see are rendered to the screen. There's no point rendering the lobby of the dataDyne building when you're on top of the helipad, for example. So what does this have to do with the hole again? Well, that hole is there because the geometry of the wall there protrudes into the stairwell next door. You don't notice this because by the time you make it into the office (or the stairwell, for that matter) the other room has stopped being rendered completely. This can lead to some interesting non-euclidian-like geometry, and there's not a single level in this game that doesn't use this trick at least once. A visual example can be seen in this image. Partial successes As I mentioned earlier, the Shooter Demo that this level has been imported into (the version from Unreal Engine V4.9 onwards I believe...) already had the flying cars in it, which was also partly what inspired me to start this project! I need to tweak their flight paths to fit better within the level, but it may save a lot of work re-creating them from scratch (until something inevitably happens which forces me to anyway... Sigh). Interesting notes Falling down the elevator shaft was something I ALWAYS wanted to do since day one, and that dream is now (sort-of) a reality! Did you know that the dataDyne building, if it were fully modelled, would have about 27 floors? Apart from the roof, top 3 floors and the lobby, there are 19 fake floors that have been partially modelled (the ones that the elevator zooms past without letting you get off) and other 6 or so that are inaccessible, though the level accommodates where they would be. Anyway, since the whole model now has collision, you're actually able to walk on these fake floors. I don't think it's possible to on the N64, even if you could stop the elevator and walk off. Textures in Unreal Engine 4 Since the majority of the glass on the ground floor is bulletproof, I left it in the model this time. Unfortunately, I hadn't fixed the material for any of it, so it lacks transparency. A simple fix in Unreal Engine 4! Here's how easy it is to do! Also, the dataDyne logo is supposed to look metallic, but appears black. Another easy fix, but this time it even has a real reflection! Something that the N64 could never have done. Other interesting notes Walking out the front doors IS actually possible to do in the original game, though it requires a very specific setup. Without doors, this is made quite easy, but unfortunately there's really nothing special outside. looking up you're able to see the entire building (remember the "room" feature? none of the building is really visible in the original game, and hidden in darkness anyway), though those one-way vertices strike again making it look like some kind of building spine without a body. Also note the doubled-up buildings in the background? When on the top 3 floors, you're able to see the top halves, and on the bottom floor you can see the bottom half. I'm going to say that it was easier for them to do it that way, though I have no real evidence why! ONE of them goes the whole length top to bottom without a break, so I'm not sure why they all couldn't... Anyway! In summary That covers pretty much everything I showed in the video. Since the typing of this I've made all of the rail textures transparent (a quick hack, but looks a lot better already), started working on the lighting and getting it right (a day/night cycle would be pretty cool, right?), and figuring out ways around the "room" issues. Where do we go from here? Well, if we're talking percentages, I'm about 0.05% done, hahaha. The level wasn't cleaned up properly before exporting so I need to re-do the whole thing from scratch, I need to fix the UV errors present in the model so that lighting and materials work properly, I need to find a way of exporting models and their animations to .FBX format so that I can start working on adding enemies and weapons, etc... It really is an endless list. But please, encouragement goes a LONG way, and if seeing this gets you excited or makes you happy let me know! Thanks for your time reading this, I know it's long. -Olivia.
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Hi. Not sure I can read this in one sitting, but I subscribed to the thread. Can you add chapter headers for better digestion?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Dimon12321
He/Him
Editor, Reviewer, Experienced player (596)
Joined: 4/5/2014
Posts: 1223
Location: Romania
I began practicing Autodesk AutoCAD recently, so I have no idea of how difficult is all that... yet. Project is interesting though I've never seen and played Perfect Dark and don't know how much he stays advanced for the present. All I can do is to wish you luck))
TASing is like making a film: only the best takes are shown in the final movie.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3822)
Joined: 11/30/2014
Posts: 2832
Location: US
Pretty cool project, and not bad for only 12 hours of work. Enormous project for a single person to be undertaking, good luck!
OliviaRose
She/Her
Joined: 1/15/2017
Posts: 2
Location: Australia
My apologies for taking so long to reply feos, I've added some headers to hopefully help you (and others) out. I'll try to keep updating regularly, though I'll keep the really minor updates to a minimum. Hi Dimon12321! AutoCAD is great to work with, though I personally wouldn't use it for a project like this... It is, however, one of the most versatile and powerful programs of its kind out there. Keep learning! You'll be glad you did one day. And I would certainly recommend playing Perfect Dark if you're a fan of First Person Shooter games. It's a fantastic game, and was really ahead of its time. Emulating is fun, though it requires a pretty powerful setup to get it running well... If you don't have the original hardware to play on, I would suggest the XBox 360 version as an alternative (the same version that was released on Rare Replay just recently). It has a slightly more modern feel to it if you're looking for that. Thanks Alyosha! Too often I see people burn-out after a few weeks or months when trying something like this. I'm hoping I don't suffer the same fate, though I'm highly motivated when I put my mind to a task. It is rather intimidating to begin with, but once I get some kind of work flow happening it will streamline the majority of the fiddly stuff. Over the next few days I'm hoping to have the "one-way" geometry issues solved without breaking too many other things in the process... I'm also having a lot of trouble with the Lighting UV maps in Unreal Engine. Light leaks through walls like a sieve no matter what I seem to do, and shadows are either crisp but inaccurate, or accurate but blurred to the point of not being able to tell either way. Thank you to everybody who has checked the project out so far! Your support means a lot to me. -Olivia.