Perfect Heist 2

Perfect Heist 2

Not enough ratings
HOW-TO Custom Objects
By spanni
In this guide, I will try to explain how to add custom objects to your own Perfect Heist 2 maps. For that I'll use blender and my own custom map as an example.
   
Award
Favorite
Favorited
Unfavorite
Basics
Hey there,
good to have you here. In this guide I will try to explain how to add custom objects to your own custom Perfect Heist 2 maps. For that I'll be using Blender (3.1 but any version should work) as well as my own custom map, McBurgerbank.

To add a custom object to a map you have to consider a few things.
First of all, custom objects have to be of the FBX format, which is some sort of file format for models, owned by Autodesk. Secondly, your object should be as simple as possible. Not only do complex models look odd in a more lowpoly game like PH2, it would also make things way more complicated. Third and last, your custom object can only have one texture. This is because your used texture file has to have the same filename as your model and because Windows limits you to only have one file of a name in one folder, there is no way to add more than one texture anyways - or at least none to my knowledge right now. Most of the time more complex objects have more than one texture, so don't even bother to try.
How to add a new model?
To add a new model to your map, you have to find your local map folder. For that, you have to create a map first via the level editor. Just name it and save it. After that, the easiest way to find your map folder is by typing %localappdata% in your windows search bar. An explorer window should open, then look for your Perfect Heist 2 folder. In there, go to Saved, then LevelEditor. There you should find a folder named after your map. Go in there.
So in short you're looking for:
%localappdata%\PerfectHeist2\Saved\LevelEditor\NameOfYourMap

What I did as an example for this guide was to create a simple round table for my McBurgerbank map. Basically it's just three differently sized and shaped cylinders that I joint together. After that I added a new material and selected "image texture" for the base color property. In paint, I just created a brown square, which I then saved as a PNG file, naming it just like the FBX I want to create, so in my case "roundTable.png".

After creating my model and setting the material, I then exported the model just somewhere on my pc. You can find many guides on how to create a model and adding materials on the internet, so I won't go into much more detail on that. But basically, you just click file->export->*fbx and then set a name. But remember: it has to be the same name as your texture! So you either first create your FBX and name your texture after it or, as I did in this example, the other way around.
One important note is that in order to fix some shading issues you need to export the model with the following settings (thanks to Brick for mentioning it):
So my FBX file is named "roundTable.fbx". It should look something like this:

After that, you just copy both files into your map folder and then you're done with this part.
How to add a downloaded model?
FBX as a format is widely used, so ofcourse there are many websites providing models. Most models, however, do cost a few bucks. I recommend looking for free and free usable models, but keep in mind: complex models probably won't work.

For my McBurgerbank map I was looking for, you guessd it, a burger model. Believe it or not, it's not that easy to find. What I then found was a free burger menu model, so like a whole tablet with a burger, fries and all that.
But ofcourse it had some issues when I first tried to load it into the level editor - the texture was not loading. Even after adding the texture and renaming it to the same name as the FBX file (which was "burger_menu.fbx" by default), it was still not loading. So what went wrong?

Basically, the file itself also knows which texture it should load, but as you can see in the picture below, the name is quite different.

Now there are two ways to fix this. You can either re-export the model and name it after the texture file, so in that case the FBX file would be called "burger menu_DefaultMaterial_BaseColor.fbx" but seriously, that's a way too long name. I even had trouble copying it into this guide!

So what you can do is renaming the texture instead to the name of the FBX file. Just rename the PNG file and then, on the same material, open this renamed PNG file as the new image texture. It should look something like that:

After that, you can just copy both files into your map folder. I explained how to do that in the previous section, so... I'm not going to repeat myself here!
How to find custom objects of other maps?
First of all, if you want to use custom objects of other maps, at least be so kind to either ask for permission or credit the original creator by mentioning him in your workshop description or something. Most of the time you can't tell if someone just downloaded the model you're about to use or created it by himself. Either way there is some work involved, as you saw in the previous sections, so be a good noodle!

If you found an object on a workshop map and you think it's a custom object, which must not always be the case by the way, you first have to find your steamapps folder. I'm not going into detail on how to find it because it depends on where your steam games are saved and there are alot of guides on that topic already.

In your steamapps folder however, you go to workshop, then in content you'll find some folders with different numbers as names. One of them is the Perfect Heist 2 folder. I'm not sure if it's always the same number, but for me it's 1521580, so.. do what you will with that information.
Inside that folder you'll find more folders with numbers. These are your downloaded workshop maps. You can find the according workshop IDs in the links of those workshop maps, so for example my McBurgerbank map would be 2810562092. Now open that folder.
If there are any custom objects used on that particular map, you should find some FBX files inside the folder. For example, my workshop folder for my own map looks something like this:

Now you can just copy the models you want to your own map folder and use them. I explained that part in the second section.
In the level editor...
After adding any custom objects, either via creating, downloading or copying some, you can start up the game and open up the level editor. The game is very forgiving if it comes to loading these models, so you can basically run the game and change things on the fly, as soon as you either reload the map and/or the model, it should load the newest version of it.

As an exmaple I'll again use my own map, McBurgerbank, where I wanted to add some round tables anyways as a replacement for this part of the map:


I used foundations and pillars for the shown tables, so let's replace them with my new round tables I created in the second section of this guide. For this I'll switch to the Misc tab and select Custom object. Important: don't get confused as to why you don't see any model while placing the custom object. It'll always try to place it at your mouse cursor, so just point in the general direction of the spot you want to put the object and hit Q:


And again: don't get confused as to why you won't see anything even after placing it! The thing about custom objects in the level editor is that even after placing it, just like any other object, it won't be selected automatically for you. More importantly: you can't even select it via clicking because it basically has no hitbox yet. In the screenshot above you can see that I used the search function in the upper right corner by entering "custom". Then you just have to search for the one you just placed. Most of the time it's the one with the highest number count in the name but in my experience it's more easy to just look for when the funny colorful arrows appear:


Now after selecting your just placed custom object, you'll find in the top left area the Variations
options. There you should see all the FBX files the game did find in your map folder. In case of my map it's three files, the burger menu I mentioned in the third section, a single burger and my newly created round table. If I now select my round table this happens:

The level editor seems to always load custom models kinda upside down. I don't know why but you can just ignore it and rotate it in the editor. You can also take it into account in blender, but then you have to change your export settings. I prefer to just rotate it in the level editor - so by just rotating it, little bit of scaling and moving it around, it looks like this:

Ofcourse now you can also copy the object by holding the ALT-key while moving it around. But what'll happen is that you, again, won't see the object:

That's because the level editor won't load the object directly, even though, as we can see in the top left area, the variation is selected. I don't know why, but it's not a big problem. As long as the variation is selected the map will load the object correctly. So what you can do to fix this is just to save the map and then quickly reload it. Easy as that.


Something something good noodles
As I mentioned in the section on how to find workshop maps, please be a good noodle and credit those who created the objects you use - at least if they are from another workshop map.

If this guide helped you in any way, you can leave a comment or recommend the guide. I'm grateful for any good noodle stars I get on this guide.
If I got anything wrong or if you have any suggestions or questions, again, leave a comment or something or message me and I'll look into it.

Have a good one.
11 Comments
Majus 27 Jul, 2022 @ 9:48am 
There are a few little bits of information that are missing from this guide and the FBX export settings were actually wrong for me. I'm using Blender 3.1.2 and this is what I use to export my models:

In the FBX export dialog, I always check "Limit to Selected Objects" to make sure that I only ever export one thing at a time.

Under Transform, I select "X Forward" and "-Z Up". That way, the object orientation in the game is the same as in Blender and even the axis colors match (i.e. X is red, Y is green, Z is blue).

Still under Transform, checking "Apply Transform" is *very* important. If unchecked, the shading will be absolute crap. I don't understand why this is, but I experimented until I found a solution and this was it.
♥ akira-matsu 30 Jun, 2022 @ 12:19pm 
Thanks to @spanni I found out what my mistake was:
I had several 3D-Objects in a "Collection" in Blender - After I took them out of the Collection and joined them together "as one Object" (Blender: Ctrl + J) the Game could find and assign the Textures to the Object again - Conclusion: Make sure your exported FBX contains only one joined Object :Neko:
♥ akira-matsu 30 Jun, 2022 @ 11:40am 
Kind of my process was like:
1. Make a Burger in Blender
2. Make a small Palette/Texture in Photoshop and Export as PNG
3. UV Mapping in Blender / Adding the Textures
4. Export Model as FBX with same Filename as the Texture
5. Import into Game Folder
Result: Working (With a little Texture Bleed due to low Texture Resolution)
6. Renamed my Texture File (Since I added more than a Burger to that Model) and made it bigger due to the Texture-Bleed
7. Modelled a Drink and Fries
8. Removed old Material/Texture from Blender completely and imported new Texture File with the new correct Name
9. Added Texture to all Models again
10. Exported as FBX with same Filename as the new Texture File
11. Imported new Texture File and FBX into Game Folder
Result: Object renders, but with Black-Brick-Texture (I guess the default missing textures texture)
spanni  [author] 30 Jun, 2022 @ 10:32am 
Hey there, do you mean the game did not find the burger texture aswell after adding several more? So it broke your first object aswell?
♥ akira-matsu 30 Jun, 2022 @ 8:50am 
Hey there,
I just started using Blender and tried modelling a lowpoly Burger which worked fine in-game, but after I added several Objects like some Fries and a Drink the Game stopped finding my Texture. I also tried deleting all old Materials and using only one Material for all colors, but I still get the Dark-Brick-Texture all around my Menu. I also double checked the Texture-File-Name and the FBX-File-Name and its both "mFastfood" + ".png"/".fbx". Has anyone else experienced such Problems?
Brick 23 Jun, 2022 @ 1:54pm 
The -Z Up is applicable when you dont want the model to be upside down in the editor and rotate it beforehand in Blender. So I guess it's preference yeah. Thanks for updating your guide and I appreciate the shoutout!
spanni  [author] 23 Jun, 2022 @ 10:32am 
Hey there, thank you for helping with that. I tried it and it seems to work either way with Z Up or -Z Up - that just kinda changes the way the model has to be in blender then and how it'll appear in the level editor. I prefer to have it right side up in blender for working and then rotating it in the editor, so that's what I put in the guide now.
New screenshots with it coming aswell.
Brick 22 Jun, 2022 @ 5:55am 
Hey Spanni, I ran into a shading issue with my models (which your table also seems to have). In order to export correctly from Blender, you need to have:
- Have your model on it's head (e.g. x:180)
- Export with -Y Forward and -Z Up settings.

I think more people will run into this issue, so could you please add it to your guide? As your guide is comprehensive, and don't want to write one myself when a simple edit will include more and complete info to yours!
Twenty Percent Skill 24 May, 2022 @ 9:03am 
Very gud guide. Very gud. :balloonicorn:
Jonathan Fakes 24 May, 2022 @ 9:02am 
I like this guide very much. Unlike other guides, i was not payed to give this one a good review.
:hunterprofile: