下载的 glb 3D 模型切成两半 [英] Downloaded glb 3D model cut in half

查看:26
本文介绍了下载的 glb 3D 模型切成两半的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的任务要求我使用来自 Internet 的一些 3d 模型资产.我对这门课程很陌生.因此,我尝试使用来自 .并导出模型.或者告诉 Blender 在导出时应用修饰符(默认情况下这是关闭的,这就是为什么这个错误很常见).

  • 它在搅拌机中看起来不错,并且没有修饰符.这意味着下载文件是错误的.只需导出模型.
  • 在搅拌机上看起来不对.模型错误.您必须自己添加修饰符.希望不再需要建模.请参阅 Blender 2.9 镜像修改器初学者教程.然后导出模型.
  • 正如我所说,我下载了文件.这是第一种情况.


    从 Blender 导出到 Godot 的注意事项

    • 导出时首选 glft 2.0.这是一个开放的标准.对其他不支持开放技术的引擎感到羞耻. 值得一提的是,Godot 增加了对 fbx(这是一种专有格式,尽管它是某些流行软件的事实上的格式)的支持,但是某些模型会导致问题.
    • 您需要决定是否需要摄像头和灯光.您可以:
      • 告诉 Blender 在导出时不要包含它们.
      • 之后在 Godot 中删除它们
      • 导出选择
      • 添加后缀-noimp";告诉戈多忽略它们,这也适用于排除几何.Godot 还可以识别其他后缀,请参阅下面的链接.
    • 确保原点以模型为中心.使模型偏离中心非常容易.特别是如果您要导出选择.Godot 将使用模型的原点作为物理对象的重心.
    • 导出时,确保选择 Y-Up.Godot 使用 Y-Up 右手坐标.Freya Holmér 的坐标系图.
    • 重申一下,必须应用任何修饰符.

    如果您的模型偏离中心,或者没有定向属性,您始终可以对 Godot 中的网格应用变换.

    另请参阅导入 3D 场景.


    顺便说一下,要导入模型,您只需将它放在 Godot 项目文件夹中即可.但是,我将建议为您的模型制作一个文件夹……并且为每个模型制作一个文件夹.这是因为 Godot 会将材料扩展为多个文件.

    说到材料.只有最简单的 Blender 材料才能以其他格式进行编码.

    正如我所说,我下载了文件.车漆"材料是一种非常反光的浅灰色.您将不得不编辑材料.#384559 的反照率(接近于板岩/学员灰色/蓝色)是一个很好的第一近似值.我从 Blender 获得了价值.

    我还应该提到,默认环境是 Godot 有一个蓝色的天空,这将使所有反射看起来都是蓝色的.

    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:

    While it is supposed to be like this:

    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?

    解决方案

    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.

    这篇关于下载的 glb 3D 模型切成两半的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆