libgdx 3d_使用Java和libgdx进行3D游戏编程,使用Blender建立模型

libgdx 3d

Or… the journey through the x, y, and z axes through the lens of a computer screen.

或 …通过x,y和z轴穿过计算机屏幕镜头的旅程。

TL; DR (TL;DR)

Using Blender to get your Model UV unwrapped with an image texture, 100% correct, so that it can be easily imported into your libGDX project.

使用Blender使您的Model UV展开并具有100%正确的图像纹理,以便可以轻松将其导入到libGDX项目中。

Note: this is part of a series of articles: See 3d Game Programming with Java and libGDX — Overview of Articles

注意 :这是系列文章的一部分:请参阅 使用Java和libGDX进行3d游戏编程—文章概述

您将需要什么 (What You Will Need)

  • Download blender if you don’t have it yet — at the time of writing it is version v2.90.0

    如果还没有的话,请下载 Blender-在撰写本文时,它是v2.90.0版

  • fbx-conv to convert from .fbx file formats to .g3db file formats (.g3db is the native file format for libGDX) — pre-compiled packages can be downloaded from here.

    fbx-conv可以将.fbx文件格式转换为.g3db文件格式(.g3db是libGDX的本机文件格式)—可以从此处下载预编译的软件包。

A screenshot of the startup screen of a newly installed Blender programme version 2.90.0
A screenshot of the startup screen of a newly installed Blender programme version 2.90.0
新安装的Blender程序2.90.0版的启动屏幕的屏幕截图

Things to note:

注意事项:

  • There was a major UI overhaul with the version 2.80+ series, so, in order to follow the instructions you will need to be on at least version 2.80.

    2.80+系列版本对UI进行了大修,因此,为了遵循说明,您至少需要安装2.80版。
  • There are lots of good tutorials around using the blender programme — if you are new to the programme, the ‘Learn the basics’ videos on the thank-you page is a great way to start. However — make sure that you search for tutorials about blender 2.8 which will show the new interface.

    关于使用Blender程序,有很多不错的教程-如果您是该程序的新手,那么感谢页面上的“学习基础知识”视频是一个很好的起点。 但是 -确保您搜索有关Blender 2.8的教程,该教程将显示新界面。

步骤 (The Steps)

  1. Delete the un-necessary components

    删除不必要的组件
  2. Find (or create) a model

    查找(或创建)模型
  3. Convert the model (if required)

    转换模型( 如果需要 )

  4. Import the model

    导入模型
  5. Update the scale units (if required)

    更新比例单位( 如果需要 )

  6. UV unwrapping

    紫外线展开
  7. Check the stretching

    检查拉伸
  8. Creating seams (if required)

    创建接缝( 如果需要 )

  9. Adding an image material to the model

    向模型添加图像材料
  10. Converting the model

    转换模型

起始模型 (The Starting Model)

When you start up blender, it automatically creates a scene for you, with a cube (centred at 0,0,0), a camera, and a light, as shown below.

启动Blender时,它将自动为您创建一个场景,其中包含一个立方体(以0,0,0为中心),一个摄像头和一个灯光,如下所示。

Image for post
The default model and screen when blender is started
启动Blender时的默认型号和屏幕

步骤1-删除不必要的组件 (Step 1 —Delete the un-necessary components)

Which is to say pretty much everything :). On the top right of the window, you will see the objects within the ‘Collection’.

这就是说几乎所有的内容:)。 在窗口的右上方,您将看到“ 集合 ”中的对象。

Image for post

From this area, delete the ‘Camera’, the ‘Cube’, and the ‘Light’, as they will not be used, and do not need to be exported. To do this, either:

在此区域中,删除“ 相机 ”,“ 立方体 ”和“ 灯光 ”,因为它们将不使用,也不需要导出。 为此,可以:

  • Right click on each item to get the contextual menu up and select the ‘Delete’ option, or,

    右键单击每个项目以打开上下文菜单,然后选择“ 删除 ”选项,或者,

  • Just left click and press the ‘X’ key to delete.

    只需单击鼠标左键,然后按“ X ”键即可删除。

Image for post

第2步-查找(或创建)模型 (

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值