Skip to content

5 ‐ 3D Models

ashtongilbert56 edited this page Nov 4, 2023 · 13 revisions

A. Importing STL Models

Screenshot 2023-11-01 at 2 30 21 PM

  • Extract the downloaded folder to access the STL file

  • In order to use an STLModels need to be converted to a .glb file type. Some programs that can convert 3D models to the .glb file type include:

  • Paint 3D
  • Microsoft Paint 3D
  • Microsoft Remix 3D
  • Blender
  • Trimble 3D Warehouse
  • SketchUp There are also many website that can be used to perform the conversion. For example, https://fabconvert.com/convert/stl/to/glb
  • We will convert an F-16 STL to GLB using Paint 3D as an example.

  • Open the model in Paint3D

Screenshot 2023-11-01 at 2 31 03 PM

  • Then, save the model. ‘Menu’ -> ‘Save as’ -> ‘3D Model’

Screenshot 2023-11-01 at 2 31 43 PM

  • Then, select to save as a .glb file type.

Screenshot 2023-11-01 at 2 32 09 PM

  • Once the file is in .glb format, it can be added to the Unreal Engine project.

  • Open the Content Browser by pushing 'CTRL + Spacebar'

  • Navigate to the All -> Content -> Blueprints Folder

  • Drag the .glb file into this folder.

Screenshot 2023-11-01 at 2 44 22 PM

  • Once it appears in that folder, open your vehicle blueprint and click on the Viewport tab towards the top. Then, drag the model into the blueprint viewport window. You should now see the model.

Screenshot 2023-11-01 at 2 46 15 PM

  • We can change aspects of the model such as scale, rotation, and location from the details menu on the right side after clicking on the model.

B. Scaling and Rotating


C. Model Appearance

  • We can change the appearance of the model by using a material.
  • To create a material. Open the content browser with CTRL + Space bar.
  • Right click in the window and select ‘Material’ under ‘Create Basic Asset’, then rename.

Screenshot 2023-11-01 at 2 47 30 PM

  • Go back to the ‘Materials’ section in our model detail window and select our new material from the drop-down menu.

Screenshot 2023-11-01 at 2 48 02 PM

  • Our model now has the appearance of our new material. To edit our material, open the material by opening the Content browser again and double clicking on the material.

  • This will open a new window for the material. Right click in the grid and search ‘Constant3Vector’ then select.

Screenshot 2023-11-01 at 2 48 34 PM

Screenshot 2023-11-01 at 2 48 55 PM

  • Right click the added node and select ‘Convert to Parameter’. Then connect the node to the skin.

Screenshot 2023-11-01 at 2 49 21 PM

Screenshot 2023-11-01 at 2 49 38 PM

  • You can change the color by double clicking the big square in the node and selecting a color and clicking OK.

Screenshot 2023-11-01 at 2 50 03 PM

  • Press CTRL + S to save the skin. Our model’s color has now been changed.

Screenshot 2023-11-01 at 2 50 29 PM

Click the Compile button in the top left corner in the blueprint if it is yellow to turn it green.


D. Setting a Camera

  • Next, we will setup your camera view for your vehicle. Open your vehicle blueprint, and navigate to the 'Viewport' tab

Screenshot (745)

  • Click on the Add button and add both a 'Spring Arm', then 'Camera'.

Screenshot (746) Screenshot (747)

  • The camera asset needs to be a component of the spring arm, drag the camera onto the spring arm to do this. The spring arm should have a dropdown arrow to its left if done correctly.

Screenshot (748)

  • Next, click on your camera asset, this should display the origin of the camera in the viewport to show where the camera is.

Screenshot (749)

  • Use the transformations in the right-hand window to orient the camera for the desired view.

Screenshot (750)

  • Save and compile your blueprint. Now when the level possesses the model when the simulation is ran (see corresponding section), the view will default to our camera view.

Screenshot (751)

Clone this wiki locally