Hello Riftbreakers! [url=https://store.steampowered.com/news/app/780310/view/3308478967665583510]In the roadmap that we published last week[/url], we highlighted extended modding support as one of the major milestones that we want to achieve with The Riftbreaker in the nearest future. Today we are taking the first step towards reaching that goal. This article will teach you how to prepare 3D models to be imported into the game. We’ll show you the basic requirements a model needs to comply with and how to use our tailor-made EXOR Mesh Exporter plugin for [url=https://www.blender.org/]Blender[/url]. Please bear in mind that this article is not a modeling tutorial. You won’t learn how to create, sculpt and texture 3D models today. If you want to learn how to do those things, we encourage you to try out some free tutorials on YouTube or other video-sharing sites. It’s not as difficult as it might first seem, and it can be a great pastime activity. Plus, there is no entry barrier - [url=https://www.blender.org/]Blender[/url] is free for home and commercial use. There are also plenty of ready-made models on the web that you can try importing into The Riftbreaker using this tutorial if you’re not into preparing models yourselves. Another thing worth mentioning is that despite its name, the EXOR Mesh Exporter is not a tool used to extract 3D models from within the game. It is used to export models from blender in a format that contains only the information required by the game. Thanks to this software, we can reduce the disk space necessary for the game and the amount of data the engine has to read. [b]With this short introduction out of the way, let’s dive into it![/b] One of the tools that we use for creating 3D models for The Riftbreaker is [url=https://www.blender.org/]Blender[/url]. It’s a great, open-source, and highly expandable tool. Almost all hard-surface models for the game (buildings and weapons, for example) are made using this software. As mighty as the program is, its functionality can be further expanded, making it an excellent platform for developers. Blender can export models to many different formats, but none are quite right for our game. That’s where the program’s open nature truly shines. We have created a custom plugin to export the models in a format optimal for the Schmetterling engine. [b][url=https://github.com/exorstudios/riftbreaker-tools/tree/main/exor_exporters/plugins]You can find the tool right here, on our GitHub[/url].[/b] [b]We can confirm that the plugin works in Blender versions 2.93 and 3.1.2.[/b] It might also work with newer versions of the program, but it is not guaranteed. Follow the instructions in the included readme file to install and enable the plugin in Blender. Then, use the instructions in this article as a reference to avoid some of the most common problems. Let’s kick things off with the simplest model you can encounter in the game - a static, indestructible prop, a rock, for example. [url=https://www.dropbox.com/scl/fo/mzk38l28a6gsei3u3b89g/h?dl=0&rlkey=bc6k8ft1fzqjyz9on83lk757c]You can download a blender file with one of our boulders to follow along right here[/url]. [olist] [*] [b]Create or open your ready-made 3D model. [/b] [*] [b]Set the scale of your model. [/b] By default, the size of the Blender grid is 1x1 meter. However, one building grid in The Riftbreaker has a size of 2x2 meters. This means that if you want your prop to fit within one in-game grid, it needs to be the size of 2x2 meters in Blender. [img]https://clan.cloudflare.steamstatic.com/images//34659267/4ff3999ea42b7de0b0b3bede397d166df026944f.png[/img] [i][b]The bases of these towers are 1x1 grids, which equals to 2x2 meters.[/b][/i] [img]https://clan.cloudflare.steamstatic.com/images//34659267/c3ef6e0d7c794b7da93de87a5c86e07cf4f9d75b.png[/img] [i][b]A 2x2 model in Blender is a perfect match for our 1x1 grid.[/b][/i] [*] [b]Triangulate your meshes.[/b] Follow these steps: [img]https://clan.cloudflare.steamstatic.com/images//34659267/ae192e90514c5e90bfe79d72aa7ee1f1fbe129dc.png[/img] [img]https://clan.cloudflare.steamstatic.com/images//34659267/615a8a3c3052d2bdfa6ac200f359fea9b7d3d2ac.png[/img] [img]https://clan.cloudflare.steamstatic.com/images//34659267/4341b201095221357909e68a2c75a4f9e0955fa3.png[/img] [*] [b]Normalize all transforms.[/b] The scale needs to be set to 1 : 1 : 1, and the rotation to 0 : 0 : 0. The model also needs to be centered on the scene. Set the pivot point to 0.0.0. Then select your mesh, press ctrl + a, and click ‘All Transforms’. [*] [b]Prepare collisions for your model.[/b] Collision models in the Schmetterling Engine are usually convex shapes to simplify physics and make collision calculations easier. [img]https://clan.cloudflare.steamstatic.com/images//34659267/9efb862ce415befcf5b47f7a2306380c6ba619eb.png[/img] [i][b]This video explains the difference between the two [url=https://www.youtube.com/watch?v=NlHqdwTtcCY]https://www.youtube.com/watch?v=NlHqdwTtcCY[/url] [/b][/i] Collision models are prepared in Blender, just like visual models. To create a convex hull in Blender, select your mesh, go to edit mode (tab), select all your faces, and then open your search bar (F3 or space, depending on your settings), then use the search option to find Convex Hull and click it. It doesn’t have to be very precise - some clipping is perfectly fine, and the simpler the shape of your collision, the better. [img]https://clan.cloudflare.steamstatic.com/images//34659267/fb4f0e5e9d3ae5a0487d79e3c60df5d41ac56020.png[/img] [i][b]The model in our example blend file has a concave shape, so it has to be split into two convex collision shapes. Try to limit the number of collisions and their poly counts - the more convex hulls you include, the more performance-heavy your model will be.[/b][/i] [img]https://clan.cloudflare.steamstatic.com/images//34659267/a8ccea4ae339c6ed933e910deb64648d2333f523.png[/img] The exporter will use the names you applied to your models in Blender. Set a name for your model, for example - test_rock_01. The collisions for that model need to be named in a specific manner so that the game knows which collision belongs to any given model. You do that by adding a _cX suffix to the name like this: test_rock_01_cX, where X is the number of the collision convex. The first collision for that object gets the _c1 suffix, the second - _c2, and so on. What is essential - collision naming for each model starts from c1 and goes up! [*] [b]Prepare a UV map for your model.[/b] Here’s an excellent tutorial to get you started on that: [url=https://www.youtube.com/watch?v=XeBUfMKKZDo]https://www.youtube.com/watch?v=XeBUfMKKZDo[/url] [*] [b]Texture your model in any texturing software.[/b] We mainly use Substance Painter. We have a custom texture exporter plugin for this software as well - [url=https://github.com/exorstudios/riftbreaker-tools/tree/main/exor_exporters/plugins][b]you can download it here.[/b][/url] [b]This plugin is confirmed to work with Substance Painter version 2019.3.3.[/b] [img]https://clan.cloudflare.steamstatic.com/images//34659267/6697bab0d4dc537f51668fe65af2cb60e5a8d910.png[/img] [i][b]Here are the Substance Painter export settings.[/b][/i] [b]If you would like to use any other program, here’s how to manually prepare textures to work in The Riftbreaker:[/b] [list] [*] You can download the example set we prepared for you - the steps will be easier to follow. [*] Prepare a set of these textures: albedo, DirectX normal map, roughness, ambient occlusion, metallic, and - optionally - emissive and opacity. (folder 1_SeparateTextures in our example). [*] Combine the textures in graphics editing software that supports channel use, for example, Photoshop, Krita, or Gimp. Here’s the naming convention and the required channels: [list] [*] texturename_albedo : Albedo on RGB channels, Opacity on the alpha channel [*] texturename_packed : AmbientOcclusion on R, Roughness on G, and Metallic on B. [*] You do not need to combine other textures. [/list] [*] At this point we should have 3 or 4 texture files for our model:: texturename_albedo, texturename_packed, texturename_normal, texturename_emissive (optional). You can find the example in the 2_ReadyForDDS folder in our example. [*] Open the combined textures using the NVIDIA Texture Tools Exporter. [*] Change the texture formats using the list at the top of the left panel. Follow these instructions for each texture type (screenshot FormatDDS.png). [list] [*] albedo - BC3 [*] normal - BC5u [*] packed - BC1 [*] emissive - BC1 [/list] [*] Click Save As. Choose the directory and the name for your texture. Remember the naming convention. Click save. Repeat for each of your textures. [/list][*][b]The finished product should look like our example in the 3_FinishedDDS folder.[/b] [*][b]Export the model using the File > Export > EXOR Mesh Exporter option in Blender.[/b] Create the corresponding .ent file to see your model in the game. It’s best to use an existing .ent file from the game to make sure you have all the necessary components in there. If you want to add a new rock - just copy an existing one and change the parameters.[/olist] Naturally, this checklist only covers the necessary steps for static and indestructible props, but those are not the only models used in the game. [url=https://www.dropbox.com/scl/fo/mzk38l28a6gsei3u3b89g/h?dl=0&rlkey=bc6k8ft1fzqjyz9on83lk757c]We have uploaded examples of several other types to our Dropbox - destructible crystals, trees, cacti, a fully animated creature, as well as a tower set.[/url] We will cover how to prepare those models for export in due time. However, if you want to do some tinkering and reverse engineering - feel free to use those files as examples of adapting your models for use in The Riftbreaker mods. If you have any additional questions or suggestions, feel free to let us know here in the comments or on our Discord - www.discord.gg/exorstudios. You can also create requests on our GitHub page. The Riftbreaker World Editor suite and the accompanying tools are going to be expanded over time, which is why your feedback is really valuable to us! EXOR Studios