5

I have this assignment that requires me to use some 3d model assets from the internet. I'm very new to this course. So, I tried to use car asset from https://www.cgtrader.com/items/2518230/download-page and download the glb extension. Once I opened the .glb (both in 3d viewer in windows and godot) this is how it looks like:

It's cut in half:

it's cut into half

While it is supposed to be like this:

A full shape car:

a full shape car

I also tried another car model (still using .glb extension) but it turned out the same.

  1. Did I do something wrong? Or does it just have to be like that when the first time I downloaded the model?

  2. If it is, what can I do to have a full shape car model so I can continue my project?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Lulu
  • 49
  • 1
  • 3

1 Answers1

5

One common mistake when exporting models from Blender for use in games is not applying modifiers.

I downloaded the file, I can tell you that in this case a Mirror Modifier was not properly applied.


Download Blender. And download the .blend file, and open it with Blender.

You will find one of this cases:

  • It looks OK in blender, and has mirror modifiers. Probably multiple. You can either apply the mirror modifier. See How to apply a modifier in V2.9+. And export the model. Or tell Blender to apply modifiers when exporting (this is off by default, which is why this mistake is common).
  • It looks OK in blender, and does not have modifiers. This would mean the download file is wrong. Just export the model.
  • It looks wrong on blender. The model is wrong. You will have to add the modifier yourself. And hopefully no more modeling is required. See Blender 2.9 Mirror Modifier Beginner tutorial. And then export the model.

As I said, I downloaded the file. It is the first case.


Consideration when exporting from Blender to Godot

  • Prefer glft 2.0 when exporting. This is an open standard. And shame on other engines that do not support open technologies. It is worth mentioning that Godot has added support for fbx (which is a proprietary format, despite being the de facto format for some popular software), but some models cause problems.
  • You need to decide if you want cameras and lights. You can either:
    • Tell Blender not to include them when exporting.
    • Remove them afterwards in Godot
    • Export selection
    • Add the suffix "-noimp" to tell Godot to ignore them, which also works to exclude geometry. There are other suffixes that Godot recognizes, see the link below.
  • Make sure the origin is centered to the model. It is very easy to have the model off center. In particular if you are exporting selection. Godot will use the origin of the model as center of gravity for physics objects.
  • When exporting, make sure Y-Up is selected. Godot works with Y-Up right handed coordinates. Freya Holmér's Coordinate Systems Chart.
  • And to reiterate, any modifiers must be applied.

If you got a model that is off center, or is not oriented property, you can always apply a transformation to the meshes in Godot.

See also Importing 3D scenes.


By the way, to import the model, all you have to do is place it inside the Godot project folder. However, I'm going to recommend making a folder for your models… And a folder for each model. This is because Godot will expand the materials into multiple files.

Speaking of materials. Only the simplest Blender materials will survive encoding in other formats.

And as I said, I downloaded the file. The "Car paint" material came as a very reflective light gray. You will have to edit the material. An albedo of #384559 (something close to slate/cadet gray/blue) is a good first approximation. I got the value from Blender.

I should also mention that the default environment is Godot has a blueish sky, which will make everything reflective look blueish.

Theraot
  • 31,890
  • 5
  • 57
  • 86