三维 - 一个旋转的地球(难度:1)
-
覆盖的关键课题
介绍
在这个教程中,你将会学习如何创建一个旋转的地球:
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/8a804582-0aae-4bd4-a03f-5532e7b73367.gif" width="460" style="border-radius: 5px; border: 1px solid #29622d;">
步骤 1 - 创建一个空白场景
首先,创建一个新的项目,然后使用"创建三维场景"编程积木来加载一个空白场景。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/6485d248-bd7b-43cd-b30e-8c419d563bd0.png" width="500" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">
默认情况下,这回创建一个没有东西但是蓝色背景的空白场景:
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/5df77016-09b3-4647-a8ad-62c8f4181b55.png" width="500" style="border-radius: 5px; border: 1px solid #29622d;">
步骤 2 - 设置星空背景
接下来,使用“指定天空”编程积木来创建更好看的背景:
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/b79b982e-24da-46b7-8aa6-0dd78f16f456.png" width="300" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">
你应该会得到一个太阳处在右边的星空:
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/4ee62001-0f6c-4250-91ba-9f34a92a042e.gif" width="500" style="border-radius: 5px; border: 1px solid #29622d;">
步骤 3 - 添加一个大的球体
接下来,在场景中添加一个球体,它的直径需要有10000。我们先不需要担心它的颜色。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/421eb240-fdc6-40b5-b1c1-04b638b3d5dd.png" width="600" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">
被添加的球体面向太阳的那一面会看起来更明亮。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/1c210aed-d493-46a2-ad4a-03b7fc3c3933.gif" width="480" style="border-radius: 5px; border: 1px solid #29622d;">
步骤 4 - 添加地球纹理
现在我们需要使用地球纹理来更新球体的纹理。我们先添加"更新纹理"编程积木,点击“请选择”输入框,并在图书馆窗口中搜索“地球”。

注意,这里的地球的纹理是上下反过来的。这个问题在使用纹理的时候偶尔会出现。为了让它上下翻转过来,我们可以把纹理的垂直方向的重复次数从1改为-1:

步骤 5 - 让地球旋转
要让地球物体旋转,我们可以使用"设置速度"编程积木。需要注意的是,地球需要从“左”旋转向“右”,所以“Z轴旋转”速度需要为负数。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/0d2017d4-6217-41f1-8d14-f7e32851e39c.png" width="300" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">
现在你的地球物体应该可以缓慢地旋转了。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/e0a49304-199f-4a08-85d3-031fb7e0c504.gif" width="480" style="border-radius: 5px; border: 1px solid #29622d;">
步骤 6 - 围绕着地球的高光
最后,要让地球物体散发出蓝光,我们可以创建一个新的高亮层,并把球体添加到那个层次。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/9ac28158-f571-4e5f-bb43-4a3877732e9b.png" width="350" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">
现在你的地球物体周围应该带有一圈蓝光。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/8a804582-0aae-4bd4-a03f-5532e7b73367.gif" width="460" style="border-radius: 5px; border: 1px solid #29622d;">
下一步
你可以尝试使用相似的方法来创建其他项目。这里有一些点子的例子:
- 不一样的星球: 你可以把地球换成其他星球,比如火星;
- 旋转的皇冠: 你可以尝试让一个皇冠物体 旋转并发光。
-
I CreatiCode pinned this topic on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login