完整版BedrockWiki镜像!
This commit is contained in:
@@ -1,122 +1,112 @@
|
||||
---
|
||||
title: Bedrock Modeling
|
||||
title: 基岩版建模指南
|
||||
nav_order: 2
|
||||
category:
|
||||
- General
|
||||
category: 基础
|
||||
mentions:
|
||||
- SirLich
|
||||
- solvedDev
|
||||
- MedicalJewel105
|
||||
---
|
||||
|
||||
This will guide tips, tricks, and things you should know when modeling for Minecraft Bedrock Edition.
|
||||
# 基岩版建模指南
|
||||
|
||||
## Texture Glitch
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
Sometimes the texture on some (smaller) faces is glitched or invisible. This is because the size of cubes is floored for the UV map calculation. This means that any size smaller than 1 will result in a 0 pixel wide UV map, which will look glitchy. To prevent this, make sure all of your cubes are at least 1 unit long in each direction. To create smaller cubes, use the Inflate slider.
|
||||
Another trick to solve this if you _must_ have smaller textures is by **increasing the element size by 1 in each direction** and then **inflating the element by -1** though note that this will make you have smaller pixels textured incorrectly will lead to mixels.
|
||||
本指南将为您讲解Minecraft基岩版建模时需要掌握的技巧、窍门和注意事项。
|
||||
|
||||
## Vertex Snap
|
||||
## 纹理故障
|
||||
|
||||
Vertex snap is a handy tool in blockbench any modeler should use. It's beneficial when doing rounded things like wheels.
|
||||
You can find this tool right top next to the movement & scale tools. It has 2 modes, Move & Scale. How this tool works can be seen in the following gif.
|
||||
当较小面出现纹理错乱或不可见时,这是由于立方体尺寸在UV映射计算中被向下取整导致的。任何小于1单位的尺寸都会生成0像素宽的UV映射。解决方法:
|
||||
1. 确保所有立方体每个方向至少有1单位长度
|
||||
2. 需要更小立方体时使用膨胀滑块
|
||||
3. 极端情况可尝试将元素尺寸各方向增加1单位,再设置-1的膨胀值(注意可能导致像素错位)
|
||||
|
||||
## 顶点吸附
|
||||
|
||||
Blockbench中的顶点吸附工具是制作圆形部件(如车轮)的利器。该工具位于移动/缩放工具右侧,包含移动和缩放两种模式:
|
||||

|
||||
## Transparency
|
||||
|
||||
If you use semi-transparent textures (like colored glass), you need to move elements with that texture to the bottom of the element list. Otherwise, elements behind these semi-transparent ones won't render in-game.
|
||||
## 透明度处理
|
||||
|
||||
## Texturing
|
||||
使用半透明材质(如彩色玻璃)时,需将该元素移至元素列表底部,否则后方元素将无法正常渲染。
|
||||
|
||||
When learning to texture, your best bet is practicing with references on how others textured similar objects & surfaces. Patterns for wood & metal are different, and you should consider that. Good guides are
|
||||
[Masteriano's Texturing Tips](https://www.blockbench.net/wiki/guides/minecraft-style-guide)
|
||||
and in general, any on pixel art.
|
||||
## 纹理绘制技巧
|
||||
|
||||
## Materials
|
||||
推荐学习方法:
|
||||
- 参考他人同类物体的纹理作品
|
||||
- 区分木质/金属等不同材质的纹理规律
|
||||
- 推荐教程:
|
||||
[Masteriano的纹理技巧](https://www.blockbench.net/wiki/guides/minecraft-style-guide)
|
||||
及像素画通用教程
|
||||
|
||||
Whether or no the transparency or emissive textures in your models work in-game, it's decided by the materials applied to them.
|
||||
## 材质类型对照表
|
||||
|
||||
| Material | Description |
|
||||
| --------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| entity | basic opaque material |
|
||||
| entity_alphatest | supports transparent pixels |
|
||||
| entity_alphablend | supports translucent pixels |
|
||||
| entity_emissive | solid, alpha channel is used as the emissive channel |
|
||||
| entity_emissive_alpha | alpha channel is used for emissiveness, completely black + transparent pixels are rendered transparently |
|
||||
| 材质类型 | 特性描述 |
|
||||
| -------------------- | ------------------------------------------------------------------------ |
|
||||
| entity | 基础不透明材质 |
|
||||
| entity_alphatest | 支持透明像素 |
|
||||
| entity_alphablend | 支持半透明像素 |
|
||||
| entity_emissive | 自发光材质(alpha通道控制发光强度) |
|
||||
| entity_emissive_alpha| 纯黑+透明像素显示为透明,其余根据alpha通道发光 |
|
||||
|
||||
## Z-fighting
|
||||
## Z轴冲突
|
||||
|
||||
Z-fighting is called when you have the face of 2 elements in the same place, and you can see both or half of them at the same time, as seen in the following picture.
|
||||
当两个面片重叠时会出现闪烁现象:
|
||||

|
||||
You can solve this by inflating one of them by `0.01` or `-0.01` depending on which one should prioritize.
|
||||
解决方法:对需要优先显示的面片设置`0.01`或`-0.01`的膨胀值
|
||||
|
||||
## Basics of Animations
|
||||
## 动画基础
|
||||
|
||||
When animating in Blockbench, you can set each keyframe by hand, or you can use variables & functions.
|
||||
Here you will learn the basics.
|
||||
Let's start with this picture.
|
||||
动画命名规范:
|
||||
- 必须以`animation.`开头(如`animation.cuack`)
|
||||
- 禁止使用符号和大写字母
|
||||
|
||||

|
||||
|
||||
the name or `animation.cuack` is essential. You can't have symbols or caps there, and it must start with `animation.` for the animations to work without problems. Now the function we will be using is
|
||||
|
||||
`Base + Math.sin((q.life_time + Offset) * Speed) \_ pitch`
|
||||
|
||||
- Base is the starting rotation/position the bone has
|
||||
- Sin is the math function we all know
|
||||
- `q.life_time` is a variable. Is a number that will be increasing as the animation continues
|
||||
- Offset is a number we use to have the animation start earlier or later than its "original" position
|
||||
- Speed is the time it will take from going from top to down
|
||||
- Pitch is how far it goes from the origin
|
||||
基本函数结构:
|
||||
`基准值 + Math.sin((q.life_time + 偏移量) * 速度) * 幅度`
|
||||
|
||||

|
||||
|
||||
Function used:
|
||||
|
||||
应用实例:
|
||||
`Math.sin((q.life_time+0.5)*150)*15`
|
||||
|
||||
one on position & the other on rotation.
|
||||
|
||||
<MolangGraph code="Math.sin((q.life_time+0.5)*150)*15" :toY="2" :stepSize="0.001"/>
|
||||
|
||||
Don't forget that for the animation to be a perfect loop. It would help if you correlated the sin equation `speed` & the animation `time`.
|
||||
Here's a table with values to get a perfect loop, though there are more you can discover.
|
||||
### 循环动画参数对照表
|
||||
|
||||
| Speed | Time | Group |
|
||||
| ----- | ---- | ----- |
|
||||
| 150 | 2.4 | 1 |
|
||||
| 100 | 3.6 | 2 |
|
||||
| 速度 | 时长 | 组别 |
|
||||
| ---- | ----- | ----- |
|
||||
| 150 | 2.4 | 1 |
|
||||
| 100 | 3.6 | 2 |
|
||||
|
||||
These numbers can be multiplied but not divided, so these will also work
|
||||
But only multiples of the same option
|
||||
扩展参数(仅限同组倍数组合):
|
||||
|
||||
| Speed | Time | Group |
|
||||
| ----- | ---- | ----- |
|
||||
| 150 | 4.8 | 1 |
|
||||
| 200 | 3.6 | 2 |
|
||||
| 300 | 2.4 | 1 |
|
||||
| 300 | 3.6 | 1 & 2 |
|
||||
|
||||
Now not all of these will "loop" together. And that is the Group column. The ones with the same number will work together. Otherwise, they will have a visible "glitch" in the loop.
|
||||
| 速度 | 时长 | 组别 |
|
||||
| ---- | ----- | ------ |
|
||||
| 150 | 4.8 | 1 |
|
||||
| 200 | 3.6 | 2 |
|
||||
| 300 | 2.4 | 1 |
|
||||
| 300 | 3.6 | 1 & 2 |
|
||||
|
||||
:::tip
|
||||
You can have an animation in the loop by clicking on the following setting:
|
||||
启用循环动画设置:
|
||||

|
||||
:::
|
||||
|
||||
With this function & creativity, animals & dinosaurs are animated into walking, running & attacking.
|
||||
You can learn more about queries & functions [here](https://bedrock.dev/docs/stable/Molang).
|
||||
通过组合不同函数参数,可以实现行走、奔跑、攻击等复杂动画效果。更多函数用法请参考[Molang文档](https://bedrock.dev/docs/stable/Molang)。
|
||||
|
||||
## Animation Speed
|
||||
## 动画速度调节
|
||||
|
||||
To easily change the speed of an animation you can simply multiply the default value of `anim_time_update` (defaults to `q.delta_time + q.anim_time`) inside our animation:
|
||||
通过修改`anim_time_update`参数实现:
|
||||
|
||||
<CodeHeader>RP/animations/myentity.animation.json#animations</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/animations/myentity.animation.json#animations]
|
||||
"animation.myentity.myanimation": {
|
||||
"anim_time_update":"2 * q.delta_time + q.anim_time"
|
||||
//Your animation goes here!
|
||||
// 此处放置动画内容
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
This will make the animation run 2 times faster. We can tweak the value to any buoyant float, so we can even slow down animations. With 0.5, for example, the animation will run 2 times slower, etc.
|
||||
- `2 *` 使动画加速2倍
|
||||
- `0.5 *` 使动画减速至原速1/2
|
||||
- 支持任意浮点数调整
|
||||
Reference in New Issue
Block a user