A few of us are inventive, a few of us are technical. A gifted few are each. However, in the event you’re like me and are extra on the technical facet, then it’s probably you’ve determined to make a sport or mission, after which thought, how am I going to make it look good? The reply to that is inevitably looking out on the likes of Sketchfab or TurboSquid for some free property to deliver your thought to life. At the very least within the idea stage.
However then comes the second downside, importing them to your engine of alternative. When working in Godot, there are a number of nuances you want to concentrate on when importing property, and on this tutorial, you’ll go over them with a view to create a foremost menu scene for a horror sport.
Getting Began
For this, there’s no starter mission, however you may nonetheless obtain the ultimate mission from the hyperlinks on the high or backside of this web page. Go forward and create a brand new mission in Godot utilizing the default settings. In your foremost menu prototype you’re going to wish 4 several types of property imported:
- A static mannequin to make use of because the scene.
- An animated character mannequin.
- A texture to make use of as a title brand.
- Two audio clips.
- Background music.
- An eerie sound impact.
By the tip of the tutorial, you must have one thing that appears slightly like this:
Supported File Varieties
In keeping with the listing of options, Godot solely has a restricted sort of file codecs that it helps with imports. By way of picture codecs, Godot does assist a lot of the commonplace codecs. However for audio, you’re restricted to:
Utilizing Totally different 3D Mannequin Varieties
For 3D mannequin codecs, Godot actually recommends you employ the glTF format. Its full listing of supported codecs are:
- glTF 2.0.
- .mix.
- Nevertheless, that is solely supported by blender calling a glTF formatter at export.
- FBX.
- This file format is supported natively by Godot since model 4.3.
- Collada (.dae).
- OBJ.
You could be acquainted with a few of these codecs, however you may see that Godot actually desires you to be utilizing the glTF format. One other file sort you’ll see across the asset libraries is GLB. GLB format is only a binary illustration of the identical information as glTF format, so on this regard, Godot can work with both format.
Importing 3D Fashions
For this mission, you must open a clean Godot mission. The 3D fashions that you simply’re going to import on this tutorial are included within the mission supplies, or you may merely obtain them immediately from the supply.
3D Surroundings
To try the completely different import sorts, you’ll take a look at each a GLB and a glTF import for this tutorial. You’re in search of a spooky, ‘Stranger Issues’ type atmosphere, so this Deserted Warehouse – Inside Scene by Aurélien Martel on Sketchfab is the best start line. While you click on the obtain it’s out there as each glTF and GLB, however for the needs of the tutorial, obtain the GLB format, or discover the asset within the supplies folder underneath the GLB folder.
Deserted Warehouse – Inside Scene by Aurélien Martel on Sketchfab
Proper-click on the res folder within the File System view, and create a brand new folder in your Godot mission referred to as Fashions, after which one other subfolder referred to as GLB. Proper-click on this new folder and choose Open in File Supervisor. Drag or Copy the abandoned_warehouse_-_interior_scene.glb
file into the GLB folder after which return to the Godot editor.
Godot will begin to import the file:
As soon as the import course of is full, you’ll have lots of texture information within the folder together with the precise .glb file.
Double-click on the .glb file and the imported scene will open up in a brand new window so that you can take a look at.
Modifying Scenes
When working in Godot with a number of property, it’s greatest to set them up as particular person scenes for enhancing later. A sport in Godot is usually composed of a number of scenes, loaded on the identical time. From the highest menu, click on the +
icon to create a brand new scene, and select 3D Scene as the basis node.
With the brand new scene open, drag the imported .glb from the FileSystem window onto the basis node within the Scene window. This may instantiate your mannequin on this scene. Save this scene with the title Surroundings.
Animated 3D Mannequin
Whereas the atmosphere import was good and easy, you’ll strive one thing slightly extra advanced for the subsequent import. What’s a ‘Stranger Issues’ impressed scene with out the introduction of an iconic monster? For this you’ll import the Demogorgon Rig by NO DONT EAT ME CASEOH (Ferris wheel) once more from Sketchfab.
Demogorgon Rig by NO DONT EAT ME CASEOH (Ferris wheel) on Sketchfab
This time, obtain the glTF format mannequin or discover it within the tutorial supplies folder. Create one other subfolder underneath the Fashions folder referred to as GLTF and duplicate the whole folder demogorgon_rig there. Open Godot to permit the asset to import like earlier than.
Open the scene.gltf file that’s now within the Fashions ▸︎ GLTF ▸︎ demogorgon_rig folder.
Right here you’ll see that the mannequin is a bit more advanced, damaged down into varied completely different meshes, together with a skeletal rig. That is important for the mannequin to be animated, however fortunately, it’s all arrange for you already.
Additionally imported on this scene view are a variety of completely different animations included within the asset. You’ll be able to run via all of them to have a look, however for the tutorial you’ll use simply one among these.
Create a brand new scene as you probably did earlier than for the atmosphere, once more with a 3D Scene as the basis node. Rename the node as Demogorgon. This time, drag the Fashions ▸ GLTF ︎▸ demogorgon_rig ︎▸ scene.gltf onto the basis node. This may instantiate the mannequin as Sketchfab_Scene, however solely as a single static mannequin Node3D.
Proper-click on the Sketchfab_Scene node and choose Editable Youngsters. When you do, all of the nodes from the asset will seem within the Godot scene.
With the nodes now editable, choose the AnimationPlayer node and search for the Present Animation discipline within the Inspector panel. Use the dropdown to pick the IdleHunt animation to see the mannequin animating in place.
The animation solely performs as soon as. It’s designed to loop, nevertheless, and that is what you need for the menu scene. Discover the Animation Participant window on the backside of your view, and toggle the Loop button.
Uh oh, did you get the next error dialog?
With the intention to change any properties of the animation in Godot, you first want to vary the import settings for that animation. Save the present scene file as Demo.tscn and as soon as extra open the supply scene.gltf file.
Fold out the AnimationPlayer from the supply scene. Discover the IdleHunt animation within the listing and choose it. Within the right-hand settings panel, set the Loop Mode to Linear. Then, allow the Save to File possibility and click on the folder icon to set a path to avoid wasting to. Create a brand new folder within the root of the mission referred to as Animations and save the file as Idle.res. Click on Reimport on the backside of the window to avoid wasting these import settings.
Return to the Demo.tscn window and choose the right animation from the drop-down once more. Attempt to toggle the loop mode of the animation and this time you gained’t get the error and also you’ll see the animation now performs on repeat.
Save the Demo.tsn file once more.
OK, now that you’ve got a few scenes arrange, it’s time to mix them into the scene that may really be used to comprise the menu scene of the prototype.