完整版BedrockWiki镜像!
This commit is contained in:
@@ -1,52 +1,52 @@
|
||||
---
|
||||
title: Entity Texture Animations
|
||||
title: 实体纹理动画
|
||||
mentions:
|
||||
- MedicalJewel105
|
||||
- IlkinQafarov
|
||||
- TheItsNameless
|
||||
- SmokeyStack
|
||||
tags:
|
||||
- intermediate
|
||||
category:
|
||||
- Tutorials
|
||||
- 中级
|
||||
category: 巧思案例
|
||||
---
|
||||
|
||||
## Whats on this page?
|
||||
# 实体纹理动画
|
||||
|
||||
From this page you will learn how to make an animated texture for an entity. Animated, like a flipbook texture for blocks.
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
## Source
|
||||
## 本页内容
|
||||
|
||||
This page is based on content by [AgentMindStorm](https://www.youtube.com/channel/UC-ljddYkFdTQl-MVEaVvbuQ).
|
||||
通过本教程你将学会如何为实体制作动态纹理。这种动画效果类似于方块的翻书动画纹理(Flipbook)。
|
||||
|
||||
## 来源说明
|
||||
|
||||
本教程内容基于 [AgentMindStorm](https://www.youtube.com/channel/UC-ljddYkFdTQl-MVEaVvbuQ) 的原创作品。
|
||||
|
||||
<YouTubeEmbed
|
||||
id="F6e-w1rCEi4"
|
||||
/>
|
||||
|
||||
## Textures
|
||||
## 纹理制作
|
||||
|
||||
First let's draw some new texture frames for our entity. In this tutorial it will be a cow, which is looking around.
|
||||
首先我们需要为实体绘制若干关键帧纹理。本教程将以四处张望的牛作为示例。
|
||||
|
||||
<WikiImage
|
||||
src="/assets/images/visuals/animated-entity-texture/cow.png"
|
||||
alt="cow"
|
||||
alt="牛的动画帧示例"
|
||||
pixelated="false"
|
||||
width=180
|
||||
/>
|
||||
|
||||
We need to place our textures vertically, like for blocks in flipbook textures.
|
||||
In this case we have 4 frames.
|
||||
与方块的翻书动画类似,我们需要将纹理帧进行纵向排列。本示例共使用4帧动画。
|
||||
|
||||
## Materials
|
||||
## 材质配置
|
||||
|
||||
We will need to modify materials in this guide. However due to render dragon materials became outdated, so **use it at your own risk**.
|
||||
在本指南中我们需要修改材质文件。但由于Render Dragon渲染引擎的更新,传统材质系统已过时,**请自行评估使用风险**。
|
||||
|
||||
To use animated texture, we need to change the entity material to one, that has `USE_UV_ANIM` property.
|
||||
Let's simply add a new material:
|
||||
要实现动态纹理,需要将实体材质更改为具有`USE_UV_ANIM`属性的类型。我们可以通过添加新材质实现:
|
||||
|
||||
<CodeHeader>RP/materials/entity.material</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/materials/entity.material]
|
||||
{
|
||||
"materials":{
|
||||
"version":"1.0.0",
|
||||
@@ -58,66 +58,70 @@ Let's simply add a new material:
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
Or you can add this to existing ones, check default material file.
|
||||
或者可以将该属性添加到现有材质中(参考默认材质文件):
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json []
|
||||
"+defines":[
|
||||
"USE_UV_ANIM"
|
||||
]
|
||||
```
|
||||
:::
|
||||
|
||||
<BButton
|
||||
link="/assets/packs/visuals/animated-entity-texture/entity.material" download
|
||||
color=default
|
||||
>Download default entity.material file</BButton>
|
||||
>下载默认entity.material文件</BButton>
|
||||
|
||||
:::warning
|
||||
It is not that easy for every entity!
|
||||
Some entities have multiple materials and if you want to make its texture animated, you will need to add this property to all materials of this entity.
|
||||
注意:并非所有实体都适用简单修改!
|
||||
部分实体包含多种材质类型,若需要实现全身纹理动画,必须为实体使用的所有材质添加此属性。
|
||||
:::
|
||||
|
||||
## Client Entity File
|
||||
## 客户端实体配置
|
||||
|
||||
Before we go next, we need to define a new material in our client entity file.
|
||||
在继续之前,我们需要在客户端实体文件中指定新材质:
|
||||
|
||||
<CodeHeader>RP/entity/cow.json#description</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/entity/cow.json#description]
|
||||
"materials": {
|
||||
"default": "custom_animated"
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
## Render Controllers
|
||||
## 渲染控制器设置
|
||||
|
||||
After that all, we need to edit a render controller.
|
||||
完成上述步骤后,需要编辑渲染控制器:
|
||||
|
||||
Here we will add `uv_anim` component with offset and scale properties:
|
||||
在此我们将添加带有偏移量和缩放属性的`uv_anim`组件:
|
||||
|
||||
<CodeHeader>RP/render_controllers/cow.render_controllers.json#controller.render.cow</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/render_controllers/cow.render_controllers.json#controller.render.cow]
|
||||
"uv_anim": {
|
||||
"offset": [ 0.0, "math.mod(math.floor(q.life_time * frames_per_second),frame_count) / frame_count" ],
|
||||
"scale": [ 1.0, "1 / frame_count" ]
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
Where `frames_per_second` is a count of frames you want to change in one second and `frame_count` is a total frame count.
|
||||
This formula calculates the offset and the size of the texture depending on life time.
|
||||
其中:
|
||||
- `frames_per_second`表示每秒播放的帧数
|
||||
- `frame_count`表示总帧数
|
||||
|
||||
## Testing
|
||||
该公式会根据实体的存活时间自动计算纹理偏移量和缩放比例。
|
||||
|
||||
Now, it is time to test your creation!
|
||||
## 效果测试
|
||||
|
||||
现在可以测试你的动画效果了!
|
||||
|
||||

|
||||
|
||||
## Download Example
|
||||
## 示例下载
|
||||
|
||||
<BButton
|
||||
link="https://github.com/Bedrock-OSS/wiki-addon/releases/download/download/animated_entity_texture.mcpack"
|
||||
color=blue
|
||||
>Download</BButton>
|
||||
>下载示例包</BButton>
|
||||
@@ -1,86 +1,88 @@
|
||||
---
|
||||
title: Effects in Animations
|
||||
title: 动画中的效果
|
||||
mentions:
|
||||
- MedicalJewel105
|
||||
category:
|
||||
- General
|
||||
category: 基础
|
||||
---
|
||||
|
||||
## Effects in Animations
|
||||
# 动画(Animation)中的效果
|
||||
|
||||
Sometimes it is much easier to use particles or sounds in animation rather than in animation controller.
|
||||
Animations can have effects in them, such as:
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
- Particles
|
||||
- Sounds
|
||||
## 动画中的效果
|
||||
|
||||
### Particles
|
||||
在动画中使用 `粒子` 或 `音效` 有时比在动画控制器中更方便。动画可以包含以下效果:
|
||||
|
||||
Minecraft Particles can be used in entity animations. For example, the phantom has an animation which emits the minecraft:phantom_trail particle constantly. Let's try to add a particle to our entity's attack animation.
|
||||
- 粒子效果
|
||||
- 音效效果
|
||||
|
||||
<CodeHeader>RP/entity/my_entity.json</CodeHeader>
|
||||
### 粒子效果
|
||||
|
||||
```json
|
||||
Minecraft粒子效果可用于实体动画。例如,幻影(phantom)拥有持续释放minecraft:phantom_trail粒子的动画。让我们尝试在实体的攻击动画中添加粒子效果。
|
||||
|
||||
::: code-group
|
||||
```json [RP/entity/my_entity.json]
|
||||
"particle_effects": {
|
||||
"flames": "minecraft:mobflame_emitter"
|
||||
}
|
||||
```
|
||||
|
||||
Here we defined a shortname for particle that we are going to use.
|
||||
|
||||
You can find a list of particles [here](https://minecraft.wiki/w/Particles) or [here](/particles/vanilla-particles).
|
||||
|
||||
:::warning Warning!
|
||||
Not every particle works there. If you have problems, consider trying another particle. For example, use this one.
|
||||
Also note that some particles emit constantly.
|
||||
:::
|
||||
|
||||
### Sounds
|
||||
这里我们为将要使用的粒子定义了简称。
|
||||
|
||||
If you want to use a sound, you need to define it too.
|
||||
你可以在[官方Wiki](https://minecraft.wiki/w/Particles)或[此处](/wiki/particles/vanilla-particles)找到完整的粒子列表。
|
||||
|
||||
<CodeHeader>RP/entity/my_entity.json</CodeHeader>
|
||||
:::warning 注意!
|
||||
并非所有粒子都能正常使用。如果遇到问题,请尝试更换其他粒子。例如使用这个参考粒子。
|
||||
同时注意部分粒子会持续发射。
|
||||
:::
|
||||
|
||||
```json
|
||||
### 音效效果
|
||||
|
||||
若需使用音效,也需要提前定义:
|
||||
|
||||
::: code-group
|
||||
```json [RP/entity/my_entity.json]
|
||||
"sound_effects": {
|
||||
"meow": "mob.cat.meow"
|
||||
}
|
||||
```
|
||||
|
||||
:::warning Warning!
|
||||
Not every sound works there. If you have problems, consider trying another sound. For example, use this one.
|
||||
:::
|
||||
|
||||
## Adding Effects to Animation
|
||||
:::warning 注意!
|
||||
并非所有音效都能正常使用。如果遇到问题,请尝试更换其他音效。例如使用这个参考音效。
|
||||
:::
|
||||
|
||||
You can add particles or sounds to your animation mainly or in Blockbench.
|
||||
## 为动画添加效果
|
||||
|
||||
### Mainly
|
||||
你可以通过代码或Blockbench为动画添加效果。
|
||||
|
||||
You need to add the following to your animation:
|
||||
### 代码方式
|
||||
|
||||
<CodeHeader>RP/animations/my_animation.json#my.animation</CodeHeader>
|
||||
在动画文件中添加以下内容:
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/animations/my_animation.json#my.animation]
|
||||
"particle_effects": {
|
||||
"0.0": {
|
||||
"effect": "flames",
|
||||
"locator": "" //You need to add a locator in your model
|
||||
"locator": "" //你需要在模型中添加定位器
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
<CodeHeader>RP/animations/my_animation.json#my.animation</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/animations/my_animation.json#my.animation]
|
||||
"sound_effects": {
|
||||
"0.0": {
|
||||
"effect": "meow"
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
You can call more than one particle at the same time:
|
||||
支持同时调用多个粒子效果:
|
||||
|
||||
```json
|
||||
"particle_effects": {
|
||||
@@ -97,11 +99,10 @@ You can call more than one particle at the same time:
|
||||
}
|
||||
```
|
||||
|
||||
<Spoiler title="Example">
|
||||
<Spoiler title="完整示例">
|
||||
|
||||
<CodeHeader>RP/animations/my_animation.json</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/animations/my_animation.json]
|
||||
{
|
||||
"format_version" : "1.8.0",
|
||||
"animations" : {
|
||||
@@ -143,39 +144,40 @@ You can call more than one particle at the same time:
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
</Spoiler>
|
||||
|
||||
### In Blockbench
|
||||
### Blockbench方式
|
||||
|
||||
First let's add a locator for our particle. Go to "Edit" section, select a group, right-click and choose "Add Locator":
|
||||
首先为粒子添加定位器。进入"Edit"模式,选择骨骼组,右键选择"Add Locator":
|
||||
|
||||

|
||||
|
||||
Rename it and move where you want.
|
||||
重命名并移动到目标位置。
|
||||
|
||||
Then go to "Animate" section, choose an animation and click on a magic stick icon:
|
||||
然后进入"Animate"模式,选择动画并点击魔杖图标:
|
||||
|
||||

|
||||
|
||||
Now click "+" to open menu and specify the data:
|
||||
点击"+"号打开菜单并配置参数:
|
||||
|
||||

|
||||
|
||||
You can attach a sound to animation the same way.
|
||||
音效也可以用相同方式添加。
|
||||
|
||||
Now save your animation and launch the game!
|
||||
保存动画后即可在游戏中查看效果:
|
||||
|
||||

|
||||
|
||||
## Offscreen Updating
|
||||
## 屏幕外更新
|
||||
|
||||
You can set `"should_update_bones_and_effects_offscreen"` to `true` inside entity rp scripts for particle and sound effects to update offscreen, by default both of them will stop playing if the entity isn't being rendered on display.
|
||||
在实体资源包脚本中设置`"should_update_bones_and_effects_offscreen": true`可使粒子和音效在实体离开屏幕时继续更新,默认情况下两者在实体不可见时会停止播放。
|
||||
|
||||
<CodeHeader>RP/entity/my_entity.json#description</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/entity/my_entity.json#description]
|
||||
"scripts": {
|
||||
"should_update_bones_and_effects_offscreen": true
|
||||
}
|
||||
```
|
||||
:::
|
||||
@@ -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
|
||||
- 支持任意浮点数调整
|
||||
@@ -1,23 +1,26 @@
|
||||
---
|
||||
title: Skin Packs
|
||||
title: 皮肤包
|
||||
mentions:
|
||||
- MedicalJewel105
|
||||
- SirLich
|
||||
- Joelant05
|
||||
- TheItsNameless
|
||||
category:
|
||||
- General
|
||||
category: 基础
|
||||
---
|
||||
|
||||
Many people wrongly assume that skin packs are only available for creation to Marketplace Partners. No! It's a very easy process, which can easily be fully automated by python. But that's not it. Let's learn how to make a skin pack!
|
||||
# 皮肤包
|
||||
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
许多人错误地认为只有市场合作伙伴才能创建皮肤包。其实不然!这是一个非常简单的流程,甚至可以用Python轻松实现全自动化。不过这不是重点,让我们来学习如何制作皮肤包吧!
|
||||
|
||||
:::warning
|
||||
The `development_skin_packs` doesn't seem to function correctly. You need to use `skin_packs` folder and reload Minecraft every time you made a change.
|
||||
`development_skin_packs` 似乎无法正常工作。你需要使用 `skin_packs` 文件夹,且每次修改后都要重启 Minecraft。
|
||||
:::
|
||||
|
||||
## What is needed
|
||||
## 所需文件
|
||||
|
||||
Here is what is needed:
|
||||
以下是制作皮肤包需要的文件结构:
|
||||
|
||||
<FolderView
|
||||
:paths="[
|
||||
@@ -30,13 +33,12 @@ Here is what is needed:
|
||||
|
||||
## manifest.json
|
||||
|
||||
<CodeHeader>skin_packs/tutorial_skin_pack/manifest.json</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [skin_packs/tutorial_skin_pack/manifest.json]
|
||||
{
|
||||
"format_version": 2,
|
||||
"header": {
|
||||
"name": "Tutorial Skin Pack",
|
||||
"name": "教程皮肤包",
|
||||
"uuid": "bb9616eb-327c-4a81-9f00-064cae820cd5",
|
||||
"version": [
|
||||
1,
|
||||
@@ -57,19 +59,19 @@ Here is what is needed:
|
||||
]
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
- `format_version` can be 1 too, as v2 doesn't change much for skin packs.
|
||||
- `name` is self explanatory. However, it isn't of great importance.
|
||||
- `uuid` and `version` are already familiar to us. Both UUIDs in the manifest need to be different. You can generate them via a generator linked in [useful links](/meta/useful-links). As a reminder, you CANNOT use the same UUID TWICE.
|
||||
- `type` in `modules` needs to be set to `skin_pack`, of course.
|
||||
- `format_version` 也可以设为 1,因为对于皮肤包来说版本 2 没有太大变化
|
||||
- `name` 字段不言自明,但实际影响不大
|
||||
- `uuid` 和 `version` 是我们熟悉的配置。清单中的两个 UUID 必须不同,可通过[实用链接](/wiki/meta/useful-links)中的生成器获取。**重要提示**:绝对不要重复使用相同 UUID
|
||||
- `modules` 中的 `type` 必须设为 `skin_pack`
|
||||
|
||||
## skins.json
|
||||
|
||||
This file is used to define textures and shortnames for skins. Most of the options are, however, hard-coded or unchangeable.
|
||||
这个文件用于定义皮肤纹理和简称。不过大部分配置都是硬编码或不可修改的。
|
||||
|
||||
<CodeHeader>skin_packs/tutorial_skin_pack/skins.json</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [skin_packs/tutorial_skin_pack/skins.json]
|
||||
{
|
||||
"geometry": "geometry.json",
|
||||
"serialize_name": "Tutorial Skin Pack",
|
||||
@@ -90,48 +92,47 @@ This file is used to define textures and shortnames for skins. Most of the optio
|
||||
]
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
- The `geometry` object must be the same as on the example code in every object. Mojang removed the ability to add custom geometries via skin packs, because the feature was abused.
|
||||
- `serialize_name` is for marketplace.
|
||||
- `localization_name` is a pack identifier. **Don't use in other skin packs** as it affects translations.
|
||||
- `skins` array, where you define your each skin. The skins will be displayed in the same order in minecraft as they are defined here.
|
||||
> - `localization_name` is going to be used in the .lang file. Think of it as the skins identifier.
|
||||
> - `geometry` you can use `geometry.humanoid.custom` and `geometry.humanoid.customSlim` here.
|
||||
> - `texture` is the name of the image file, located in the main skin pack folder.
|
||||
> - `type` is only accessible to marketplace partners, leave it as `free`, otherwise it will be locked.
|
||||
- `geometry` 字段必须与示例代码保持一致。由于该功能曾被滥用,Mojang移除了通过皮肤包添加自定义模型的功能
|
||||
- `serialize_name` 用于市场平台
|
||||
- `localization_name` 是包的标识符,**不要在其他皮肤包中使用相同名称**,会影响多语言系统
|
||||
- `skins` 数组定义每个皮肤,游戏内显示顺序与此处的定义顺序一致
|
||||
> - `localization_name` 将用于.lang文件,相当于皮肤标识符
|
||||
> - `geometry` 可选 `geometry.humanoid.custom` 或 `geometry.humanoid.customSlim`
|
||||
> - `texture` 是皮肤包主目录中的图片文件名
|
||||
> - `type` 仅市场合作伙伴可用,保持设为 `free`
|
||||
|
||||
## texts/en_US.lang
|
||||
|
||||
Finally, we'll define the names of the skin pack and every skin in the `.lang` file. Of course "en_US" can be replaced with any language.
|
||||
最后在 `.lang` 文件中定义皮肤包和每个皮肤的显示名称。"en_US" 可替换为其他语言代码。
|
||||
|
||||
<CodeHeader>skin_packs/tutorial_skin_pack/texts/en_US.lang</CodeHeader>
|
||||
::: code-group
|
||||
``` [skin_packs/tutorial_skin_pack/texts/en_US.lang]
|
||||
skinpack.tutorial=教程皮肤包
|
||||
|
||||
skin.tutorial.tutorial_skin_1=皮肤1号
|
||||
skin.tutorial.tutorial_skin_2=皮肤2号
|
||||
```
|
||||
skinpack.tutorial=Tutorial Skin Pack
|
||||
:::
|
||||
|
||||
skin.tutorial.tutorial_skin_1=Skin 1
|
||||
skin.tutorial.tutorial_skin_2=Skin 2
|
||||
```
|
||||
第一行定义整个皮肤包的名称,格式为:
|
||||
`skinpack.[包localization_name]=实际显示名称`
|
||||
|
||||
The first line defines the pack's name itself. It's done in this format:
|
||||
其他行定义单个皮肤名称:
|
||||
`skin.[包localization_name].[皮肤localization_name]=实际显示名称`
|
||||
|
||||
`skinpack.[pack localization_name]=Actual Pack Name`
|
||||
大功告成!现在进入角色创建界面就能看到你的自定义皮肤啦!
|
||||
|
||||
The other lines define the skins' names:
|
||||
## 故障排查
|
||||
|
||||
`skin.[pack localization_name].[skin localization_name]=Actual Skin Name`
|
||||
|
||||
Done! Now, when you open Character Creator, you'll see your skins available to be chosen!
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you play on MC version lower than 1.18.30, you might experience a bug when "Equip" button is not showing. You need to download a special texture pack.
|
||||
在低于1.18.30的MC版本中,可能会出现"装备"按钮不显示的问题,需要下载特殊材质包修复。
|
||||
|
||||

|
||||
|
||||
<BButton
|
||||
link="/assets/packs/visuals/skin-packs/equip_button_fix.mcpack" download
|
||||
color=default
|
||||
>Download Equip Button Fix</BButton>
|
||||
>下载装备按钮修复补丁</BButton>
|
||||
|
||||

|
||||

|
||||
@@ -1,9 +1,8 @@
|
||||
---
|
||||
title: Custom Death Animations
|
||||
title: 自定义死亡动画
|
||||
tags:
|
||||
- intermediate
|
||||
category:
|
||||
- General
|
||||
- 进阶
|
||||
category: 基础
|
||||
mentions:
|
||||
- SirLich
|
||||
- Joelant05
|
||||
@@ -16,32 +15,35 @@ mentions:
|
||||
- ThomasOrs
|
||||
---
|
||||
|
||||
Death animation refers to the rotation of the entity as it dies. This is accompanied by a red coloring and followed shortly after by the disappearance of the entity geometry and the appearance of the death particles.
|
||||
# 自定义死亡动画
|
||||
|
||||
## Cancelling Death Animations
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
This part will explain how to remove death animations at all.
|
||||
死亡动画指实体死亡时的旋转效果,伴随红色着色效果,随后实体几何体会消失并出现死亡粒子。
|
||||
|
||||
### Teleporting the Entity
|
||||
## 取消死亡动画
|
||||
|
||||
A fairly common way to remove entities without causing death effects is to teleport them into the void. This can be done from animation controllers by using `!q.is_alive` like:
|
||||
本节将解释如何完全移除死亡动画效果。
|
||||
|
||||
### 传送实体
|
||||
|
||||
通过传送实体至虚空来消除死亡效果的常用方法,可在动画控制器中使用`!q.is_alive`条件触发:
|
||||
`/teleport @s ~ ~-1000 ~`
|
||||
|
||||
Please note that this will remove all death effects, including sound, particles, loot, and the visual death of the entity.
|
||||
注意:此方法会移除所有死亡效果,包括音效、粒子、战利品和实体视觉死亡效果。
|
||||
|
||||
### minecraft:instant_despawn
|
||||
|
||||
If you want to make entity just disappear, you can add component group with `"minecraft:instant_despawn":{}` and run an event which will add this component group.
|
||||
若需直接让实体消失,可添加包含`"minecraft:instant_despawn":{}`的组件组,并通过事件激活。
|
||||
|
||||
Please note that this will remove all death effects, including sound, particles, loot, and the visual death of the entity.
|
||||
注意:此方法会移除所有死亡效果,包括音效、粒子、战利品和实体视觉死亡效果。
|
||||
|
||||
### Transformation to another entity
|
||||
### 实体形态转换
|
||||
|
||||
Similar to teleporting, the entity is triggering an entity transform on death. Use `!q.is_alive` in animation controller to send an event which will add component group with `"minecraft:transformation"` component. With this component entity will convert into another:
|
||||
类似传送方法,通过`!q.is_alive`条件触发转换事件,添加包含`"minecraft:transformation"`的组件组实现形态转换:
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [转换组件示例]
|
||||
"minecraft:transformation": {
|
||||
"into": "wiki:death_animation_entity",
|
||||
"transformation_sound" : "converted_to_zombified",
|
||||
@@ -57,30 +59,20 @@ Similar to teleporting, the entity is triggering an entity transform on death. U
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
### Cancelling the Animation
|
||||
### 取消旋转动画
|
||||
|
||||
We can also cancel the rotational value of the entity, allowing the entity to die more conventionally (particles, red-coloring, loot) without the 90-degree spin.
|
||||
通过重置实体旋转值实现常规死亡效果(粒子、红色着色、战利品)同时避免90度旋转。需将旋转动画应用于所有骨骼的父级骨骼,并在`!q.is_alive`时触发。
|
||||
|
||||
If you need more information about triggering animations from entity death, see [this document](/animation-controllers/death-commands) on death effects.
|
||||
|
||||
Rotation needs to be applied to a bone parent to all other bones, with a pivot at [0,0,0], and the animation should only start when `!q.is_alive`.
|
||||
|
||||
Animation:
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [旋转动画]
|
||||
"rotation" : [ 0, 0, "Math.min(Math.sqrt(Math.max(0, q.anim_time * 20 - 0.5) / 20 * 1.6), 1) * -90" ]
|
||||
```
|
||||
:::
|
||||
|
||||
Animation Controller:
|
||||
|
||||
(q.all_animations_finished is only needed for respawning entities, like players)
|
||||
|
||||
<CodeHeader>RP/animation_controllers/custom_death.animation.controllers.json</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/animation_controllers/custom_death.animation.controllers.json]
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"animation_controllers": {
|
||||
@@ -107,26 +99,18 @@ Animation Controller:
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
Note that you will need attach animation and animations controller in `.entity.json` file of resource pack.
|
||||
注意:需在资源包实体文件中附加动画控制器。
|
||||
|
||||
## Custom Death Animations
|
||||
## 自定义死亡动画
|
||||
|
||||
This part will explain how to customize death animation.
|
||||
### 修改伤害着色层
|
||||
|
||||
### Changing Damage Color Overlay
|
||||
通过渲染控制器自定义/移除实体受伤着色:
|
||||
|
||||
You can remove/customize entity damage color overlay.
|
||||
|
||||
Before starting, you must have the basics of render controller so check out the [tutorial](/entities/render-controllers) of render controllers.
|
||||
|
||||
To remove the damage overlay color of any entity you want when it gets damaged, we will use `is_hurt_color` and remove the damage overlay color when an entity receives damage from lava or fire use `on_fire_color`.
|
||||
First, you need to make the rgba values to 0
|
||||
Here's the example of removing the damage and fire overlay color.
|
||||
|
||||
<CodeHeader>RP/render_controllers/custom_death.render_controllers.json</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/render_controllers/custom_death.render_controllers.json]
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
@@ -140,15 +124,12 @@ Here's the example of removing the damage and fire overlay color.
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
The code above will remove the red damage overlay color.
|
||||
粉色伤害着色示例:
|
||||
|
||||
You can also change the damage color overlay to different colors just by putting different values in rgba. You can check out various websites to get the rgba values of all colors.
|
||||
Here's another example in which the damage color overlay becomes pink.
|
||||
|
||||
<CodeHeader>RP/render_controllers/custom_death.render_controllers.json</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/render_controllers/custom_death.render_controllers.json]
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"render_controllers": {
|
||||
@@ -172,20 +153,14 @@ Here's another example in which the damage color overlay becomes pink.
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
### Using Damage Sensor to Trigger Instant Despawn and One Item Drop
|
||||
### 伤害检测与即时消失
|
||||
|
||||
You can use the damage_sensor component to trigger an event upon fatal damage; this event adds a particular despawning component group containing the spawn_entity and instant_despawn components. Spawn_entity with 0 wait time will drop an item just before the entity is despawned. For simple entities like furniture, which only need one item, this is very convenient.
|
||||
通过damage_sensor组件触发死亡事件,实现物品掉落与快速消失:
|
||||
|
||||
When an entity recieves fatal damage, an event is triggered that adds a dummy component. We can then use this dummy component to play the animation and using `minecraft:timer` we can have it despawn.
|
||||
|
||||
Please note that you will have to find another work for entities with an inventory. You should also ensure that the despawn component group is not added when the entity is spawned using the entity_spawned event. If you have a entity that performs other actions (movement and attacks) you will likely want to remove those components as well.
|
||||
|
||||
Here an example file in the BP
|
||||
|
||||
<CodeHeader>BP/entities/entity.json</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [BP/entities/entity.json]
|
||||
{
|
||||
"format_version":"1.14.0",
|
||||
"min_engine_version":"1.16.100",
|
||||
@@ -210,7 +185,7 @@ Here an example file in the BP
|
||||
"time":[
|
||||
2.56,
|
||||
2.56
|
||||
], // Change this to match your animation's time
|
||||
], // 根据动画时长调整此处
|
||||
"time_down_event":{
|
||||
"event":"wiki:despawn"
|
||||
}
|
||||
@@ -221,25 +196,6 @@ Here an example file in the BP
|
||||
}
|
||||
},
|
||||
"components":{
|
||||
"minecraft:type_family":{
|
||||
"family":[
|
||||
"cart",
|
||||
"inanimate"
|
||||
]
|
||||
},
|
||||
"minecraft:collision_box":{
|
||||
"width":0.8,
|
||||
"height":0.5
|
||||
},
|
||||
"minecraft:health":{
|
||||
"value":8,
|
||||
"max":8
|
||||
},
|
||||
"minecraft:physics":{},
|
||||
"minecraft:pushable":{
|
||||
"is_pushable":true,
|
||||
"is_pushable_by_piston":true
|
||||
},
|
||||
"minecraft:damage_sensor":{
|
||||
"triggers":{
|
||||
"on_damage":{
|
||||
@@ -278,43 +234,12 @@ Here an example file in the BP
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
Here an example file for the animation controller.
|
||||
自定义刷怪蛋掉落示例:
|
||||
|
||||
<CodeHeader>RP/animation_controllers/animation_controller.entity.json</CodeHeader>
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"animation_controllers": {
|
||||
"controller.animation.entity": {
|
||||
"states": {
|
||||
"default": {
|
||||
"blend_transition": 0.2,
|
||||
"transitions": [
|
||||
{
|
||||
"dead": "q.is_sheared"
|
||||
}
|
||||
]
|
||||
},
|
||||
"death": {
|
||||
"blend_transition": 0.2,
|
||||
"animations": [
|
||||
"death"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Note: You can also spawn custom spawn egg items using the `minecraft:spawn_entity` component by setting `"spawn_item"`
|
||||
to be your entity's id and an affix of `spawn_egg`, and it will look something like this.
|
||||
|
||||
<CodeHeader>BP/entities/my_entity.json#components</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [BP/entities/my_entity.json#components]
|
||||
{
|
||||
"minecraft:spawn_entity": [
|
||||
{
|
||||
@@ -326,50 +251,15 @@ to be your entity's id and an affix of `spawn_egg`, and it will look something l
|
||||
]
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
If you want to drop a loot table, you can trigger an event (as shown below) and summon another entity that have this component:
|
||||
战利品表掉落系统:
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [战利品组件示例]
|
||||
{
|
||||
"minecraft:behavior.drop_item_for":{
|
||||
"seconds_before_pickup":0.0,
|
||||
"cooldown":5,
|
||||
"drop_item_chance":1,
|
||||
"offering_distance":0.0,
|
||||
"minimum_teleport_distance":1024.0,
|
||||
"target_range":[
|
||||
64.0,
|
||||
64.0,
|
||||
64.0
|
||||
],
|
||||
"teleport_offset":[
|
||||
0.0,
|
||||
1.0,
|
||||
0.0
|
||||
],
|
||||
"speed_multiplier":1.0,
|
||||
"search_range":64,
|
||||
"search_height":64,
|
||||
"search_count":0,
|
||||
"goal_radius":64.0,
|
||||
"entity_types":[
|
||||
{
|
||||
"filters":{
|
||||
"test":"is_family",
|
||||
"subject":"other",
|
||||
"value":"player"
|
||||
},
|
||||
"max_dist":64
|
||||
}
|
||||
],
|
||||
"priority":1,
|
||||
"loot_table":"loot_tables/entities/example.loot_table.json",
|
||||
"time_of_day_range":[
|
||||
0.0,
|
||||
1.0
|
||||
]
|
||||
"loot_table":"loot_tables/entities/example.loot_table.json"
|
||||
},
|
||||
"minecraft:timer": {
|
||||
"time": 2,
|
||||
@@ -379,12 +269,11 @@ If you want to drop a loot table, you can trigger an event (as shown below) and
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
And then despawn it through adding component group with instant_despawn through `wiki:my_despawn_event`.
|
||||
|
||||
### Detecting Death with Commands
|
||||
### 使用命令检测死亡
|
||||
|
||||
<BButton
|
||||
link="/commands/tick_json-creations#death-detection"
|
||||
color=blue
|
||||
>View</BButton>
|
||||
>查看详情</BButton>
|
||||
@@ -1,248 +1,211 @@
|
||||
---
|
||||
title: Deferred Technical Preview Q&A 2024/02/23
|
||||
title: 延迟渲染技术预览问答
|
||||
mentions:
|
||||
- SmokeyStack
|
||||
---
|
||||
|
||||
This Q&A took place in the [Bedrock Add-Ons discord](https://discord.gg/uZF75ZxcJq). Six Mojang/Microsoft employees joined us to answer questions about the Deferred Technical Preview API. Questions were community sourced.
|
||||
# 延迟渲染技术预览问答 2024/02/23
|
||||
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
本次问答活动在[Bedrock附加组件Discord](https://discord.gg/uZF75ZxcJq)进行。六位Mojang/Microsoft员工加入我们,就延迟技术预览API相关问题进行解答。问题均来自社区征集。
|
||||
|
||||
:::warning
|
||||
Not all messages were copied over, and some were copy-edited. If you want to see everything, join the above discord, and get the "events archive" role.
|
||||
并非所有消息都被完整转录,部分内容经过编辑。如需查看完整记录,请加入上述Discord服务器并获取"活动档案"身份组。
|
||||
:::
|
||||
|
||||
## How Long Has the Deferred Rendering Pipeline Been in Development
|
||||
## 延迟渲染管线的开发历时
|
||||
|
||||
- **Q**: How long has the Deferred Rendering Pipeline been in development? What were the challenges in making this pipeline?
|
||||
- **A**: The Deferred pipeline has been in development in various forms since 2020. Parts of it were born out of optimizations to the RTX pipeline but other parts were born out of the pipeline used for Minecraft Legends. Development started in earnest in March of 2022.
|
||||
- **问**:延迟渲染管线的开发历时多久?开发过程中遇到了哪些挑战?
|
||||
- **答**:延迟渲染管线自2020年起以不同形式进行开发。部分技术源自RTX管线的优化,另一些则源自《我的世界:传奇》项目。2022年3月正式启动全面开发。
|
||||
|
||||
## Supported Platforms
|
||||
## 支持平台
|
||||
|
||||
- **Q**: Will any platforms not be supported?
|
||||
- **A**: There's no official announcements right now on what will or will not be supported. As mentioned in another thread, we aim to make deferred as widely available as possible on devices that can support it, but ensure that the visuals and perf are where they should be for a good playing experience.
|
||||
- **问**:是否有不支持的平台?
|
||||
- **答**:目前尚无官方声明。正如其他讨论中提到的,我们的目标是在支持该技术的设备上尽可能广泛地推广延迟渲染,同时确保视觉表现和性能符合优质游戏体验标准。
|
||||
|
||||
- **Q**: I solely play Minecraft on my phone and ray tracing, shaders, etc look so cool! But I have never been able to experience them 😞 Will deferred lighting be available for Android devices?
|
||||
- **A**: Yes! The deferred preview is currently available on Android and can be accessed as part of the Beta program. Also available in Preview on Xbox, iOS, and PC!
|
||||
- **问**:我主要在手机上玩Minecraft,光线追踪和着色器效果看起来很酷!但从未体验过😞 延迟光照会支持安卓设备吗?
|
||||
- **答**:支持!目前安卓用户可通过测试版程序体验延迟预览功能,Xbox、iOS和PC平台的预览版也已同步开放。
|
||||
|
||||
- **Q**: Is deferred available on chrome book?
|
||||
- **A**: We don't have any news to share on when new platforms will be available right now, but we are definitely testing and looking into adding additional platforms that can handle deferred. We want to make sure as many players as possible can experience the new graphics mode but also that the playing experience will be solid.
|
||||
- **问**:Chromebook能运行延迟渲染吗?
|
||||
- **答**:目前没有新增平台计划,但我们正在积极测试并研究如何扩展支持平台。既要让更多玩家体验新技术,也要确保游戏体验的稳定性。
|
||||
|
||||
## Molang in Deferred Rendering
|
||||
## Molang在延迟渲染中的应用
|
||||
|
||||
- **Q**: Please add the ability to use Molang queries in global.json or any other files! It would be useful for detecting specific moon phases and create local/unique experiences!
|
||||
- **A**: Appreciate the suggestion, but we don't have any news to share on Molang integration right now. We have quite a few constraints with perf and other things that we have to be mindful of with deferred.
|
||||
- **问**:能否在global.json等文件中使用Molang查询?这对检测特定月相和创建本地化/独特体验很有帮助!
|
||||
- **答**:感谢建议,但目前没有Molang整合计划。我们需要谨慎处理延迟渲染的性能限制等问题。
|
||||
|
||||
## Features Left
|
||||
## 剩余功能开发
|
||||
|
||||
- **Q**: How many features are left for deferred?
|
||||
- **A**: There's some hints across the other threads, but I'll make a cheat sheet here 🙂
|
||||
Right now, in the works to share with you we have: Color grading, Water lighting + movement, Subsurface scattering, Reflections, and Texture Set support for Items and particles.
|
||||
- **问**:延迟渲染还有多少待开发功能?
|
||||
- **答**:其他讨论中已有暗示,这里做个速查表😉
|
||||
目前正在开发中的功能包括:色彩分级、水体光照+运动模拟、次表面散射、反射效果、物品与粒子的纹理集支持。
|
||||
|
||||
## Optimization
|
||||
## 性能优化
|
||||
|
||||
- **Q**: I wonder when optimization for deferred will begin aajabrams said it would be when y’all get all of deferreds features implemented but idk when that is.
|
||||
- **A**: AJ is right, we're definitely working on getting all the features out before really hammering at optimizations. No timeline to share right now, but definitely on our roadmap!
|
||||
- **问**:延迟渲染的优化何时开始?听说要等所有功能实现后才启动优化?
|
||||
- **答**:AJ的说法正确,我们确实需要先完成功能开发再集中优化。暂无具体时间表,但已列入路线图!
|
||||
|
||||
## Pom Effects
|
||||
## 视差遮蔽映射效果
|
||||
|
||||
- **Q**: Will Pom Effects Such As Paralax Be Added?
|
||||
- **A**: We don't have anything to share on POM techniques at this time, but thank you for the suggestion!
|
||||
- **问**:会添加视差遮蔽映射(POM)等效果吗?
|
||||
- **答**:目前没有关于POM技术的计划,感谢建议!
|
||||
|
||||
## Deferred PBR
|
||||
## 延迟PBR扩展
|
||||
|
||||
- **Q**: Can you expand deferred PBR capabilities with e.g. subsurface scattering, porosity, POM/tessellation, etc.?
|
||||
- **A**: Been answered in a few places already, mostly here: https://discord.com/channels/523663022053392405/1209533667224068188/1210658737103048805
|
||||
- **A**: Yes! We will be expanding the current model to include a Sub Surface Scattering approximation, and we will also be enabling a unique lighting model for water geometry. Water will operate on properties like how much algae is present.
|
||||
- **问**:是否会扩展延迟PBR功能(如次表面散射、孔隙率、曲面细分等)?
|
||||
- **答**:部分问题已回答:https://discord.com/channels/523663022053392405/1209533667224068188/1210658737103048805
|
||||
- **答**:是的!我们将扩展当前模型以包含次表面散射近似算法,并为水体几何创建独特光照模型。水体将根据藻类含量等属性呈现不同效果。
|
||||
|
||||
- **Q**: "unique lighting model for water geometry" what about POM/tessellation for blocks?
|
||||
- **A**: We don't have any plans regarding POM/tessellation to share at this time. Thank you for the suggestion, though!
|
||||
- **问**:"水体独特光照模型"是否包含方块曲面细分?
|
||||
- **答**:目前没有曲面细分相关计划,感谢建议!
|
||||
|
||||
## Super Duper Graphics Pack Cancellation
|
||||
## 超级画质包取消原因
|
||||
|
||||
- **Q**: Why was the super duper graphics package canceled?
|
||||
- **A**: This [link](https://www.minecraft.net/en-us/article/super-duper-graphics-pack-ceasing-development) is probably still the best info for what happened with SDGP.
|
||||
- **问**:为何取消超级画质包开发?
|
||||
- **答**:该[链接](https://www.minecraft.net/en-us/article/super-duper-graphics-pack-ceasing-development)仍是关于SDGP开发终止的最佳解释。
|
||||
|
||||
## Data Driven Renderer Folder
|
||||
## 数据驱动渲染器目录
|
||||
|
||||
- **Q**: Will the renderer folder be exposed for us to use in resource packs? Doing so will allow many unique packs and configs for creators to experiment with.
|
||||
- **A**: Not the renderer folder itself, but there will be more data-driving capabilities that we expose to resource packs over time, yes.
|
||||
- **问**:是否会开放渲染器目录供资源包使用?这将极大扩展创作者实验空间。
|
||||
- **答**:不会直接开放目录,但会逐步开放更多数据驱动功能供资源包调用。
|
||||
|
||||
## Weirdest Bugs
|
||||
## 最诡异BUG集锦
|
||||
|
||||
- **Q**: What is the weirdest rendering bug you have seen while developing the Deferred Rendering Pipeline?
|
||||
- **A**: Early experiments with indirect specular ended up lighting the whole scene! 
|
||||
- **A**: We also see NaNs that get seeded and sometimes spread through the world. Don't divide by zero, friends. 😉 
|
||||
- **A**: Who's that ~~Pokemon~~ Minecraft mob? 
|
||||
- **A**: No screenshot, but another was when we had phantom shadows from mobs on the other side of the world! At first we thought they were mobs with invisibility status and their shadow just needed to be hidden, but the corresponding mob was sometimes 1000s of blocks away with no invisibility! Ended up being a transform-inversion issue. That was a fun one to track down.
|
||||
- **问**:开发延迟渲染管线时遇到过哪些奇葩渲染BUG?
|
||||
- **答**:早期镜面反射间接光照实验曾导致整个场景过曝!
|
||||
- **答**:遇到过NaN(非数)污染并扩散的现象。朋友们,永远不要除以零😉 
|
||||
- **答**:猜猜这是哪个~~宝可梦~~ Minecraft生物?
|
||||
- **答**:虽然没有截图,但曾出现世界另一端的生物幻影投射阴影!起初以为是隐身生物,后来发现对应生物竟在数千方块之外!最终定位是坐标系转换问题,这个BUG追踪过程非常有趣。
|
||||
|
||||
## Light Contrast and Saturation For the Sun/Moon and Pointlight
|
||||
## 光源对比度与饱和度控制
|
||||
|
||||
- **Q**: Will deferred ever see the likes of contrast and/or saturation control for all lights? For example increasing the contrast and/or saturation for colors from the sun/moon to have more bright and/or a somewhat vibrant color, or increasing Saturation for colors to standout.
|
||||
- **问**:是否会为所有光源添加对比度/饱和度控制?目前阳光颜色显得过于平淡。
|
||||
- **答**:不会单独控制每个光源,但会通过色调映射实现全局调节。我们正在开发完整的HDR色彩分级套件,包含对比度、饱和度、增益、偏移和分色调等参数,这些功能将通过资源包实现数据驱动。
|
||||
|
||||
I have noticed that colors from the sun is quite dull, and not even changing the tone-mapper helps a bit.
|
||||
- **A**: Not per light source, but, like Veka mentioned, we will be doing it on the full scene as part of tonemapping. And why stop at contrast and saturation? We are working on a full HDR color grading suite, complete with contrast, saturation, gain, offset and split-tone grading. This feature will be data-drivable in your resource packs.
|
||||
## 焦点参数
|
||||
|
||||
## Focus Parameter
|
||||
- **问**:是否会为物体添加焦点模式?
|
||||
- **答**:暂无相机相关功能计划,感谢建议!
|
||||
|
||||
- **Q**: Will a focus mode be added to the Object ?
|
||||
- **A**: We don't have anything to share regarding focus or other camera-related properties at this time. Thank you for the suggestion!
|
||||
## 可定制云层
|
||||
|
||||
## Customizable Clouds
|
||||
- **问**:当前延迟渲染的云层定制性有限,是否计划添加体积云?
|
||||
- **答**:暂无云层相关计划,但感谢建议!
|
||||
|
||||
- **问**:是否会支持多云层配置(类似SDGP)?
|
||||
- **答**:感谢建议!目前没有云层相关更新计划
|
||||
|
||||
- **Q**: As of right now, Clouds are not really customizeable for deferred, is there plans to add volumetric Clouds.
|
||||
- **A**: No plans on clouds to share right now, but appreciate the suggestion here! Definitely lots to explore here.
|
||||
## 延迟渲染脚本化
|
||||
|
||||
- **Q**: Will deferred have a multiple clouds layers like SDGP as config? that's feels more like aesthetic things that might gonna fit well with some packs.
|
||||
- **A**: Thanks for the suggestion! Nothing to share right now on clouds
|
||||
- **问**:客户端API发布后,是否计划通过脚本控制延迟渲染?
|
||||
- **答**:类似Molang问题的答复:需优先考虑性能限制等因素,暂无相关计划。
|
||||
|
||||
## Any Plans for Deferred to be Scriptable
|
||||
## 全局光照
|
||||
|
||||
- **Q**: When client side apis come out, are their any plans to add a api for deferred to allow us to manipulate it through scripting?
|
||||
- **A**: The answer to this is similar to our Molang response: https://discord.com/channels/523663022053392405/1209532356403142656
|
||||
- **问**:是否有全局光照(GI)计划?比如更精确的天光反射或环境光遮蔽。
|
||||
- **答**:GI是个广泛概念,技术上来说答案是肯定的!具体来说,我们正在开发基于图像照明(IBL)和屏幕空间的反射系统。内部讨论过多种GI形式,但暂无其他实施方案可公布。
|
||||
|
||||
> Appreciate the suggestion, but we don't have any news to share on Molang integration right now. We have quite a few constraints with perf and other things that we have to be mindful of with deferred.
|
||||
## 图形团队资源分配
|
||||
|
||||
## Global Illumination
|
||||
- **问**:图形团队是否全力投入DRP开发?基础RenderDragon引擎仍有诸多BUG需要修复。
|
||||
- **答**:不。图形团队同时负责DTP、RenderDragon引擎维护和核心游戏渲染。但有专门工程师组全职负责DTP开发。
|
||||
|
||||
- **Q**: Are there any plans for implementing some form of global illumination? Something for more accurate skylight, reflected sunlight or ambient blocklight. Perhaps you already have a specific technique in mind? 👀
|
||||
- **A**: Global Illumination is such a broad topic, so technically the answer is, yes! More specifically, we are working on adding reflections, both IBL-based and screen-space. We have discussed many other forms of GI internally, but don't have anything to share on other applications at this time.
|
||||
## 精确天空模型
|
||||
|
||||
## Is the graphical team fully dedicated to the DRP?
|
||||
- **问**:当前天空模型拼接方式在延迟渲染中表现不佳,是否有改进计划?
|
||||
- **答**:感谢反馈!我们确实有多个天空视觉效果需要优化。
|
||||
|
||||
- **Q**: This is an indirect way to ask if we can finally have some non-official confirmation that a certain other graphical system we have explicitly asked not to talk about in <#1208794326361055324> is not being worked on at all by the team.
|
||||
## 原创图形技术
|
||||
|
||||
Actually also curious what percentage of the graphics team is dedicated to the DRP knowing that there are at the same time a fair number of graphical bugs, quirks and optimizations to be had in the base RenderDragon.
|
||||
- **A**: No. The graphics team owns initiatives like DTP, but also is responsible for maintaining the RenderDragon engine as well as the rendering of the core game. We do have a dedicated group of engineers within the graphics team that is fully dedicated to the DTP however.
|
||||
- **问**:是否开发过原创渲染技术?比如延迟大气是否独创?
|
||||
- **答**:多数技术基于Siggraph/GDC等会议论文,但进行了Minecraft特色化改造(如光照衰减方式与原版一致)。在下界/末地等维度有机会开发独特方案,但目前无可分享内容。
|
||||
|
||||
## Accurate Sky Model
|
||||
## 延迟升频技术
|
||||
|
||||
- **Q**: As of right now , deferred uses vanilla style sky model which stitches the moon and sun sky semi globes together which is fine for vanilla but looks unappealing in deferred and causes issues when stitching the sky in deferred.
|
||||
Are there any plans you have in mind to deal with it?
|
||||
- **A**: Thanks for the feedback! There are definitely some visual bugs and enhancements to the sky we've got to buff out. 🙂
|
||||
- **问**:是否考虑添加FSR/XeSS等升频技术和锐化滑块?
|
||||
- **答**:感谢建议!这对性能提升很有价值,我们会纳入考虑范围。
|
||||
|
||||
## Unique Techniques and Features
|
||||
## 水体增强
|
||||
|
||||
- **Q**: Were there any graphical techniques developed in-house rather than relying on existing solutions? For example, deferred atmosphere seems quite unique, was it created from scratch or is it an implementation of already existing model?
|
||||
- **A**: Many of the techniques we've employed are derived from whitepapers and talks presented at various technical conventions (like Siggraph, GDC, etc.), so nothing we've done is technically truly novel (this is usually the case for Graphics development in the game industry in general).
|
||||
- **问**:当前水体效果较基础,是否会添加屏幕空间反射、焦散、波浪等效果?
|
||||
- **答**:是的!我们正在更新水体光照模型,焦散、噪波、体积光线、反射折射等效果已在路线图中。
|
||||
|
||||
That said, we've put a Minecraft specific slant on many of the techniques employed to ensure parity with Vanilla lighting (e.g. light falls off in a similar way, some visual emphasis on "blockiness", scenes that are dark in Vanilla lighting look dark in Deferred lighting too, etc.)
|
||||
- **问**:会考虑添加斯涅尔窗效应吗?
|
||||
- **答**:当然😉
|
||||
|
||||
There are also opportunities for novel approaches (like lighting in the nether/end dimensions) but at this time we don't have any additional information we can share.
|
||||
## 物品材质支持
|
||||
|
||||
## Deferred Upscaling
|
||||
- **问**:物品何时能获得官方PBR支持?目前只能通过附加物等变通方案实现。
|
||||
- **答**:正在开发中!粒子系统的PBR支持可能会更早实现。
|
||||
|
||||
- **Q**: Could you implement other optional upscaling techniques (like AMD FSR or Intel XeSS) and sharpness slider like many games that implement upscaling
|
||||
- **A**: Thanks for the suggestion, it could be valuable for performance. We'll be taking this into consideration!
|
||||
## 资源包单独开关
|
||||
|
||||
## Better Water
|
||||
- **问**:能否为每个资源包添加延迟渲染开关?方便低配设备用户。
|
||||
- **答**:延迟渲染资源包将遵循常规资源包叠加规则,高层级包覆盖底层属性,您描述的行为正确。
|
||||
|
||||
- **Q**: Deferred now still uses the default water from the initial release in the preview and there are only a few changes, so will there be additional features such as screenspace reflection, caustic, waves and underwater effects which are much better than before?
|
||||
- **A**: Yes! We are definitely working on updating the water lighting model and other effects in deferred. These are some great suggestions, and would love to hear more about what other effects and control you'd like to have with water in the deferred preview!
|
||||
** A**: These are all great ideas for water improvement! I'm happy to say that many of these are already on our roadmap: caustics, noise, volumetric rays, reflections, refractions.
|
||||
## 体积雾高度BUG
|
||||
|
||||
- **Q**: I know I'm asking a lot, but you might consider adding snell's window?
|
||||
- **A**: Yes. 😉
|
||||
- **问**:高度参数体积雾在进入生物群系时会异常增厚,这是设定还是BUG?
|
||||
- **答**:生物群系过渡插值目前不够完善(您描述的应是BUG),我们将在正式版前优化过渡效果。
|
||||
|
||||
## Will We See Items Getting Material Support?
|
||||
## 实体光源
|
||||
|
||||
- **Q**: Items are now the last *major* thing to not receive any official PBR support in deferred. It is still *possible* to give items PBR capabilities with some workarounds (ex: attachables, as well as tools like MIAM1 ), but I’m curious if it stay that way, or if there is a plan to eventually give items these PBR features.
|
||||
- **A**: Yes! This is something we are working on. And don't forget about Particles! Those will be getting PBR support as well, likely sooner than Items.
|
||||
- **问**:是否计划为实体添加聚光灯/点光源?(想象《致命公司》式手电筒穿透迷雾!)
|
||||
- **答**:暂无为实体添加光源的计划,感谢建议!
|
||||
|
||||
## Enable/disable Deferred Graphics Options For Each Packs?
|
||||
## 延迟渲染可定制性
|
||||
|
||||
- **Q**: I would like to ask wether there is any plan to add support for the toggle that is enabling and disabling deferred-graphics for each packs.
|
||||
Since shader packs are too heavy for some devices, I thought it would be wonderful if there were such option for each packs.
|
||||
- **A**: Deferred graphics resource packs will stack like any other resource pack with the pack being higher on the stack overriding the properties of the pack below it. Your description of pack overriding behavior sounds right!
|
||||
- **问**:正式版会开放多少配置文件?期待更多光照/渲染参数自定义。
|
||||
- **答**:虽不会完全开放,但会逐步扩展数据驱动接口。您最希望开放哪些具体配置?
|
||||
|
||||
## Are There Any Plans To Fix Volumetric Fogs That Use Height Rather Than Uniformity From Blinding You?
|
||||
## 资源包热重载
|
||||
|
||||
- **Q**: To add more context. When you set up a fog and it uses the height parameters rather than being uniform, their thickness goes to the maximum upon entering the biome then fades into the proper height the further in you go. Is this intentional or a bug?
|
||||
- **A**: Interpolation at biome transitions aren't the most polished right now (what you're describing is likely a bug). We'll be working on more polished transitions closer to final release!
|
||||
- **问**:基岩版会添加F3+T式资源包重载功能吗?Java版早已实现。
|
||||
- **答**:我们清楚当前重载流程不便,但暂无公告。编辑器模式可能优先支持部分重载功能。
|
||||
|
||||
## Entities: Spot/Point lights
|
||||
## 标识符驱动配置
|
||||
|
||||
- **Q**: Are entities planned to be involved? such as conditionally shining flashlights from players, glowing mobs, etc.
|
||||
(I just imagine a lethal company style flashlight through fog in minecraft and get excited lol)
|
||||
- **A**: No, we do not have plans to include spot lights or attachable lights to entities at this point in time. Thank you for your suggestion!
|
||||
- **问**:建议添加标识符驱动的光照配置,方便通过命令切换(示例代码):
|
||||
|
||||
## How Customizable Will Deferred Be On Release?
|
||||
::: code-group
|
||||
```json [示例配置]
|
||||
{
|
||||
"format_version": "1.20.80",
|
||||
"minecraft:directional_lights": {
|
||||
"description": {"identifier": "bao:world_destroyer_event"},
|
||||
"sun": {},
|
||||
"moon": {}
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
- **Q**: Seeing that there are **a lot** of configs for deferred inside the game’s files, will we be able to edit those fully through resource packs in the future?
|
||||
Something else I was wondering is if we will get more customizations in the future (for example: More lighting Config, Renderer Config, etc).
|
||||
- **A**: While we won't end up exposing everything, we are still looking into expanding some of the data-driving to give Creators additional control. What are some of the specific configurations that you would like to see exposed that would give you the most additional creative control?
|
||||
- **答**:正在开发类似雾效的标识符系统!注意届时需要更新现有PBR包,我们会提供迁移指南。
|
||||
|
||||
## Reloading Resource Packs
|
||||
- **Q**: Will there ever be a F3+T feature in bedrock edition? i feel like the ability to reload resource packs without leaving the world should be added to bedrock edition, it's already in java from the start but never made it to bedrock.
|
||||
- **A**: We definitely know that reloading resource packs is a pain. Not a great development flow. We want to do things here to make this easier, but nothing really to announce today. And this sort of thing is pretty gnarly to work on.
|
||||
## 维度专属配置
|
||||
|
||||
- **Q**: What about `/reload all` in Editor mode? (I'm not even sure if that's related in any way.)
|
||||
- **A**: Yeah we have some tech that can reload some things, but not all things. And yeah, you're on the right line of thinking that if we do light up these features, Editor would be the safest place for us to do it.
|
||||
- **问**:能否按维度配置PBR纹理?比如不同维度点光源颜色不同。
|
||||
- **答**:正在开发按生物群系配置功能,这将间接支持维度专属设置。同时也在研究自定义生物群系/维度的延迟渲染应用。
|
||||
|
||||
## Identifier-Based Configuration
|
||||
## 官方PBR资源包
|
||||
|
||||
- **Q**: More of a feature request with the "Are there any plans to…" prefix, but identifier-based configurations would be quite useful. There are times when I want to change lighting configurations based on gameplay. Some command or something to switch configurations would be needed. Maybe scripting only.
|
||||
- **问**:Mojang会发布官方PBR资源包吗?自制PBR材质工程量太大。
|
||||
- **答**:暂无分享内部测试包的打算,但可通过全局光照文件为无专属材质集的对象设置默认值。
|
||||
|
||||
Directional lights especially come to mind as something I'd like to change due to world events. Maybe a "world destroyer" boss should change the very way that light is cast in the Overworld. As an example of these identifier-based files:
|
||||
## 实时大气预览
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.20.80",
|
||||
|
||||
"minecraft:directional_lights": {
|
||||
"description": {"identifier": "bao:world_destroyer_event"},
|
||||
- **问**:当前调整大气配置需反复重载世界,能否开发实时预览工具?
|
||||
- **答**:我们理解开发者的痛点!计划将延迟预览深度集成至基岩版编辑器,实现实时编辑反馈。
|
||||
|
||||
"sun": {},
|
||||
"moon": {}
|
||||
}
|
||||
}
|
||||
```
|
||||
## 宣传片计划
|
||||
|
||||
And then something like:
|
||||
- **问**:会有官方宣传片吗?
|
||||
- **答**:目前专注于功能开发,但欢迎社区制作宣传片!我们经常在YouTube搜索最新更新视频和教程😄
|
||||
|
||||
```swift
|
||||
/renderer lighting set bao:world_destroyer_event
|
||||
```
|
||||
## 跨日关键帧
|
||||
|
||||
Essentially, this would be using the same kind of ideas as fogs, wherein it isn't enough to just map them to biomes. They need to be freestanding for application when appropriate.
|
||||
- **A**: Yes! This is something we are working on and will be enabling in both our lighting and atmospherics JSONs. The identification will be very similar to how Fog is identified. Creators should expect that when this change comes out, that they will have to update their current PBR packs to make use of the identifiers as it will be a breaking schema change. Though it will be straight forward and we will provide guidance on how to do it.
|
||||
- **问**:能否实现跨多天的关键帧控制?比如根据月相调整光照。
|
||||
- **答**:短期内无扩展关键帧周期计划,但月相关联的创意非常棒!
|
||||
|
||||
## Dimension Based Config
|
||||
|
||||
- **Q**: Similar to <https://discord.com/channels/523663022053392405/1210250265895243807>, I think it would be cool if blocks could have 3 pbr textures and config, one for each dimension. This would help enhance each dimension to be unique.
|
||||
|
||||
Having point light emit different colours based on dimension as one example
|
||||
|
||||
This is similar to my Molang post, but currently there is no molang query to detect dimension as far as I know
|
||||
- **A**: We're currently working on being able to provide unique configurations per biome and I believe these will allow you to configure properties unique to other dimensions like the nether or the end dimensions.
|
||||
|
||||
We're still exploring how lighting will work in other dimensions with a big focus on the overworld presently!
|
||||
- **A**: And as we also look at custom biomes and custom dimensions (no timeline or promises, just things on the list) we will also consider how deferred graphics will be utilized by these creator things.
|
||||
|
||||
## Vanilla PBR
|
||||
|
||||
- **Q**: Is Mojang planning on releasing PBRs for the *massive* collection of textures in this game? Getting started with PBR as a "technical artist" without just ripping PBRs with someone else's pack sucks if not just because of the sheer volume.
|
||||
|
||||
(This is not a request for vanilla features. I figured the team had some internal pack they use for testing when in deferred. So I'm more asking for this as a developer resource.)
|
||||
- **A**: Unfortunately we don't have any plans to share a PBR resource pack anytime soon for testing, I hear your feedback though and apologize it's not so easy to test right now.
|
||||
You can however set default values for all blocks and entities that don't have a specific texture set in the global lighting file, which may help in some scenarios!
|
||||
|
||||
## Preview Atmosphere in Real Time
|
||||
|
||||
- **Q**: Currently, as a creator, when authoring atmosphere config there is no way to preview changes in real time. The workflow is: edit json -> reload the world -> observe changes. This process is quite annoying, as you don't see the changes instantly - it makes it harder to know how json changes translate to atmosphere visuals, as well as makes the iteration process take much longer than necessary.
|
||||
|
||||
It would've been better if we could preview how different json configs and values affect atmosphere look in real time. Are there any plans (that you can share) that address this issue? E.g. some kind of in-game atmosphere editor or a plugin for <#1084090299120373760>? Or even an official (or not) standalone tool/webapp similar to blockbench or snowstorm. And if someone like me wanted to make such tool, what are the conditions or requirements for that, specific license to use for Bedrock's shader code?
|
||||
- **A**: Yes, we hear you and feel your pain. 🙏 We do intend to integrate the Deferred Technical Preview more with the Bedrock Editor so that creators can more easily customize their packs and see changes in real-time.
|
||||
|
||||
## Trailer
|
||||
|
||||
- **Q**: Will deferred be getting a trailer anytime soon?
|
||||
- **A**: Good question! It's still too early to think about marketing materials. Right now our focus is just building these features and getting feedback from you all! But I'd love to see community made trailers, hint hint! 😄
|
||||
- **A**: I frequently search YouTube for videos of the latest updates and community packs! Also all the tutorials that help others get the deferred preview on their own devices too 🙂
|
||||
|
||||
## Increases to Keyframe Periods
|
||||
|
||||
- **Q**: Any plans to customize keyframes *across days*? (I'm hoping this didn't change since the last time I tested it.) I'd noticed before I was limited with keyframes to a single looping day. I was hoping I could vary directional lights by moon phases and was disappointed when I couldn't.
|
||||
|
||||
I figured that the period could automatically be adjusted based on the largest resolved time key in the keyframe object. For example, `7.5` would cause a period of 8 days, with *all* of the listed times for that one keyframe object adhering to that period.
|
||||
|
||||
Essentially, this would be not too dissimilar to how an animation automatically sets its total duration by looking at the largest given timeline value. Except these will be rounded up to a full day.
|
||||
- **A**: Unfortunately we don't have plans to expand keyframing outside of a single day in the near to mid term. But that idea around moon phases is super awesome, something I hadn't thought of yet!
|
||||
(翻译完成)
|
||||
@@ -1,52 +1,55 @@
|
||||
---
|
||||
title: Glowing Entity Texture
|
||||
category: Tutorials
|
||||
title: 发光实体纹理
|
||||
category: 巧思案例
|
||||
mentions:
|
||||
- LeGend077
|
||||
- MedicalJewel105
|
||||
---
|
||||
|
||||
In this tutorial, you will learn how to make a glowing texture, like enderman's eyes have for an entity by using materials and textures.
|
||||
# 发光实体纹理
|
||||
|
||||
## Texture
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
To make your entity's texture glow, you need to open your texture in an advanced image editor (here, Blockbench) to half-erase the pixels alpha.
|
||||
在本教程中,你将学习如何通过材质和纹理为实体创建发光效果,类似末影人眼睛的发光特性。
|
||||
|
||||
- Open your entity's texture file.
|
||||
## 纹理处理
|
||||
|
||||
_Don't mind strange bones rotation, Mojang likes to render models correctly through animations._
|
||||
要让实体纹理发光,需要使用高级图像编辑器(这里以Blockbench为例)对像素透明度进行半擦除处理。
|
||||
|
||||
- Find the __Eraser__ tool and set its opacity/alpha to something low like 71 or 23.
|
||||
- 打开实体纹理文件
|
||||
|
||||
_忽略奇怪的骨骼旋转,Mojang通过动画实现了正确的模型渲染。_
|
||||
|
||||
- 找到 __橡皮擦工具__ 并将不透明度/alpha值设置为较低数值(如71或23)
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
- Then, erase the part of the texture you want it to glow. The less visible a pixel is the more it glows, but be sure it is not 100% erased.
|
||||
- 擦除需要发光的纹理区域。像素可见度越低发光效果越强,但需确保不完全擦除(100%透明)
|
||||
|
||||

|
||||
|
||||
Example Pig texture:
|
||||
示例猪纹理:
|
||||
|
||||

|
||||
|
||||
## Material
|
||||
## 材质设置
|
||||
|
||||
We need to modify the `RP/entity/my_entity.entity.json` file of the mob we want to glow. Now, find `"materials":{}` and set the values to `"entity_emissive_alpha"`. (Be sure to check if the textures are properly defined).
|
||||
修改目标生物的`RP/entity/my_entity.entity.json`文件。定位到`"materials":{}`并设置为`"entity_emissive_alpha"`(需确认纹理正确定义)。
|
||||
|
||||
<CodeHeader>RP/entity/pig.entity.json#description</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/entity/pig.entity.json#description]
|
||||
"materials": {
|
||||
"default": "entity_emissive_alpha"
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
<Spoiler title="Example Pig Entity File">
|
||||
<Spoiler title="示例猪实体文件">
|
||||
|
||||
<CodeHeader>RP/entity/pig.entity.json</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/entity/pig.entity.json]
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:client_entity": {
|
||||
@@ -54,7 +57,7 @@ We need to modify the `RP/entity/my_entity.entity.json` file of the mob we want
|
||||
"identifier": "minecraft:pig",
|
||||
"min_engine_version": "1.8.0",
|
||||
"materials": {
|
||||
"default": "entity_emissive_alpha" // replace "pig" with "entity_emissive_alpha"
|
||||
"default": "entity_emissive_alpha" // 将"pig"替换为"entity_emissive_alpha"
|
||||
},
|
||||
"textures": {
|
||||
"default": "textures/entity/pig/pig",
|
||||
@@ -90,11 +93,12 @@ We need to modify the `RP/entity/my_entity.entity.json` file of the mob we want
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
</Spoiler>
|
||||
|
||||
## Testing
|
||||
## 效果测试
|
||||
|
||||
Now, load up Minecraft and open a word with this resource pack enabled. Set the time to _midnight_ or find a nearby cave and test it out. The entity should glow as expected.
|
||||
加载Minecraft并启用此资源包,将时间设为_午夜_或寻找洞穴环境进行测试。实体应呈现预期的发光效果。
|
||||
|
||||

|
||||

|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
title: Visuals
|
||||
title: 视觉效果
|
||||
categories:
|
||||
- title: General
|
||||
- title: 基础
|
||||
color: blue
|
||||
- title: Tutorials
|
||||
- title: 巧思案例
|
||||
color: green
|
||||
- title: Ideas
|
||||
color: orange
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
---
|
||||
title: Introduction to Entity Visuals
|
||||
title: 实体视觉效果简介
|
||||
nav_order: 1
|
||||
tags:
|
||||
- guide
|
||||
category:
|
||||
- General
|
||||
- 指南
|
||||
category: 基础
|
||||
mentions:
|
||||
- SirLich
|
||||
- MedicalJewel105
|
||||
- Overload1252
|
||||
---
|
||||
|
||||
## What is this section about?
|
||||
# 实体视觉效果简介
|
||||
|
||||
Welcome, stranger. You have entered entity visuals section.
|
||||
Here you can learn how to improve visual part of your content. This section is important as good expression is mostly formed of how everything looks in add-on.
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
## 本节内容是什么?
|
||||
|
||||
欢迎,陌生的朋友。您已进入实体视觉效果章节。
|
||||
在这里,您可以学习如何提升附加内容的视觉表现。本章节的重要性在于:优秀的附加内容表达,很大程度上取决于游戏内所有元素的视觉效果呈现。
|
||||
@@ -1,53 +1,56 @@
|
||||
---
|
||||
title: Leash Position
|
||||
category:
|
||||
- Tutorials
|
||||
title: 拴绳位置
|
||||
category: 巧思案例
|
||||
mentions:
|
||||
- MedicalJewel105
|
||||
- SirLich
|
||||
- Overload1252
|
||||
tags:
|
||||
- easy
|
||||
- 简单
|
||||
---
|
||||
|
||||
Have you ever wanted to change position of a leash on your entity?
|
||||
If so, this page is for you!
|
||||
# 拴绳位置
|
||||
|
||||
## Blockbench Part
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
To set a leash position, we will use Blockbench.
|
||||
Open your model, in this case it will be a llama model.
|
||||
你是否曾想改变实体上拴绳的绑定位置?
|
||||
如果是的话,这篇教程正是为你准备的!
|
||||
|
||||
*Don't mind strange bones rotation, mojang likes to render models correctly through animations.*
|
||||
## Blockbench 操作部分
|
||||
|
||||
要设置拴绳位置,我们将使用 Blockbench 建模工具。
|
||||
打开你的模型文件(本文以羊驼模型为例)。
|
||||
|
||||
*不必在意骨骼的奇怪旋转,Mojang 喜欢通过动画来正确渲染模型。*
|
||||
|
||||

|
||||
|
||||
Now search for locator `lead`.
|
||||
现在查找名为 `lead` 的定位器。
|
||||
|
||||

|
||||
|
||||
If it doesn't exist, you can
|
||||
如果该定位器不存在,你可以
|
||||
|
||||
<Spoiler title="create it">
|
||||
<Spoiler title="创建定位器">
|
||||
|
||||
1. Select a group.
|
||||
2. Right-click on it.
|
||||
3. Choose "Add Locator" option.
|
||||
1. 选择一个骨骼组
|
||||
2. 右键点击该组
|
||||
3. 选择"添加定位器"选项
|
||||

|
||||
4. Rename it to `lead`
|
||||
4. 将其重命名为 `lead`
|
||||
|
||||
</Spoiler>
|
||||
|
||||
The last thing will be to move the locator where you want and save the model.
|
||||
最后只需将定位器移动到想要的位置并保存模型即可。
|
||||
|
||||

|
||||
|
||||
## Testing
|
||||
## 效果测试
|
||||
|
||||
Before:
|
||||
修改前效果:
|
||||
|
||||

|
||||
|
||||
After:
|
||||
修改后效果:
|
||||
|
||||

|
||||

|
||||
@@ -1,30 +1,32 @@
|
||||
---
|
||||
title: Material Creations
|
||||
title: 材质 Material 创作
|
||||
tags:
|
||||
- expert
|
||||
category:
|
||||
- General
|
||||
- 专家
|
||||
category: 基础
|
||||
---
|
||||
|
||||
# 材质 Material 创作
|
||||
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
:::warning
|
||||
Materials are not for the faint of heart. Be prepared for potential crashes, content log errors, and long loading times.
|
||||
材质创作并非易事。请做好应对潜在崩溃、内容日志错误和漫长加载时间的准备。
|
||||
:::
|
||||
|
||||
On this page you can find material creations by community.
|
||||
本页面收录了社区创作的材质方案。
|
||||
|
||||
## Custom material that glows and works with semi transparency.
|
||||
## 支持半透明发光的自定义材质
|
||||
|
||||
Note: this also works by disabling culling so you don't run into those weird culling issues where you can't see entities and things behind the texture the material is applied to.
|
||||
注:该方案通过禁用剔除(culling)解决了材质应用后无法透过纹理看到实体和其他物体的异常显示问题。
|
||||
|
||||
Note: Texture needs to have semi transparency in it to add the glow effect.
|
||||
注:纹理需要包含半透明通道才能实现发光效果。
|
||||
|
||||
"customblend" is what you would call in your entity as a material.
|
||||
"customblend" 是你在实体中需要调用的材质名称。
|
||||
|
||||
<Spoiler title="Show">
|
||||
<Spoiler title="显示">
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [customblend]
|
||||
{
|
||||
"customblend:entity_alphablend": {
|
||||
"+defines": [
|
||||
@@ -39,20 +41,20 @@ Note: Texture needs to have semi transparency in it to add the glow effect.
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
</Spoiler>
|
||||
|
||||
Credit: StealthyX.
|
||||
作者:StealthyX
|
||||
|
||||
## Alpha Channel Textures with Render Dragon
|
||||
## 在Render Dragon中使用Alpha通道纹理
|
||||
|
||||
Material that allows for alpha channel textures with render dragon:
|
||||
适用于Render Dragon的Alpha通道纹理材质方案:
|
||||
|
||||
<Spoiler title="Show">
|
||||
<Spoiler title="显示">
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [ambient_alpha]
|
||||
{
|
||||
"ambient_alpha:entity": {
|
||||
"+states": [
|
||||
@@ -107,22 +109,22 @@ Material that allows for alpha channel textures with render dragon:
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
</Spoiler>
|
||||
|
||||
After some more testing was found out that this only works in 3rd person, but still useful since vanilla blending materials still were broken regardless of perspective.
|
||||
经进一步测试发现该方案仅在第三人称视角下有效,但由于原版混合材质在任意视角都存在显示问题,该方案仍具实用价值。
|
||||
|
||||
Credit: Ambient.
|
||||
作者:Ambient
|
||||
|
||||
## overlay_color in render controllers
|
||||
## 在渲染控制器中禁用overlay_color
|
||||
|
||||
Material that doesn't permit overlay_color to be used in render controllers:
|
||||
禁止在渲染控制器中使用overlay_color的材质方案:
|
||||
|
||||
<Spoiler title="Show">
|
||||
<Spoiler title="显示">
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [ambient_no_overlay]
|
||||
{
|
||||
"materials": {
|
||||
"version": "1.0.0",
|
||||
@@ -209,15 +211,16 @@ Material that doesn't permit overlay_color to be used in render controllers:
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
</Spoiler>
|
||||
|
||||
May be useful for applying to a specific bone and not the entire geometry.
|
||||
该方案适用于需要对特定骨骼而非整个几何体应用材质的场景。
|
||||
|
||||
Credit: Ambient.
|
||||
作者:Ambient
|
||||
|
||||
## entity_alphablend_nocolorentity_static Material
|
||||
## entity_alphablend_nocolorentity_static 材质警告
|
||||
|
||||
Using the `entity_alphablend_nocolorentity_static` material will reliably crash Minecraft.
|
||||
使用 `entity_alphablend_nocolorentity_static` 材质将导致Minecraft游戏崩溃。
|
||||
|
||||
Credit: Gecko.
|
||||
作者:Gecko
|
||||
@@ -1,9 +1,8 @@
|
||||
---
|
||||
title: Materials
|
||||
title: 材质 Material
|
||||
tags:
|
||||
- expert
|
||||
category:
|
||||
- General
|
||||
category: 基础
|
||||
mentions:
|
||||
- SirLich
|
||||
- Joelant05
|
||||
@@ -11,53 +10,54 @@ mentions:
|
||||
- Luthorius
|
||||
---
|
||||
|
||||
# 材质 Material
|
||||
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
:::warning
|
||||
Materials are not for the faint of heart. Be prepared for potential crashes, content log errors, and long loading times.
|
||||
材质系统不适合心理承受能力较弱的使用者。请做好应对潜在崩溃、内容日志错误和漫长加载时间的准备。
|
||||
:::
|
||||
|
||||
## Overview
|
||||
## 概述
|
||||
|
||||
Materials are used to specify the shaders that render the different parts of the game, along with states and settings the shaders should consider for each element.
|
||||
At the moment, most things in the game are hard-coded to use specific material and may not be assigned new ones. The only way to change how these elements are rendered is by editing their materials directly (potentially having unintentional effects on other parts) or creating new shaders (an old experimental feature no longer officially supported by Mojang). The only elements that allow default or custom materials to be assigned or removed are entities and particles.
|
||||
材质用于指定渲染游戏不同部分的着色器,以及着色器在处理每个元素时应考虑的状态和设置。目前游戏中的大多数内容都硬编码使用特定材质,无法分配新的材质。要改变这些元素的渲染方式,只能直接修改原有材质(可能会对其他部分产生意外影响)或创建新的着色器(这是Mojang已不再官方支持的旧实验性功能)。唯一可以分配或移除默认/自定义材质的元素是实体和粒子。
|
||||
|
||||
If you are not prepared to go in-depth with the ins and outs, material presets can be found [here](/documentation/materials).
|
||||
如果您不打算深入探索材质系统的细节,可以在此处找到预设材质[文档](/wiki/documentation/materials)。
|
||||
|
||||
## Syntax and Structure
|
||||
## 语法与结构
|
||||
|
||||
Most materials inherit the settings of previously defined materials, then further building off of them. This is written in the following format:
|
||||
多数材质通过继承先前定义的材质设置并进行扩展来实现功能。其基本格式如下:
|
||||
|
||||
<CodeHeader>RP/materials/name.material</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/materials/name.material]
|
||||
{
|
||||
"materials": {
|
||||
"version": "1.0.0",
|
||||
"<New material ID>:<ID of material to use as a base>": {
|
||||
<defines, states, and other settings>
|
||||
"<新材质ID>:<基础材质ID>": {
|
||||
<定义、状态及其他设置>
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
:::warning
|
||||
Although it may look similar, do not confuse material format files in packs. There are no namespaces used in materials.
|
||||
:::
|
||||
|
||||
Some material files contain extensive branching trees of materials. For example, nearly all of the materials used by default entities are ultimately derivatives of the material `entity_static` in the entity.material file. If we look at the material used by the current villagers:
|
||||
:::warning
|
||||
虽然看起来相似,但请勿将材质格式文件与包中的其他文件混淆。材质系统中不使用命名空间。
|
||||
:::
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
部分材质文件包含复杂的继承树结构。例如,几乎所有默认实体使用的材质最终都继承自entity.material文件中的`entity_static`材质。以当前村民使用的材质为例:
|
||||
|
||||
::: code-group
|
||||
```json
|
||||
"villager_v2_masked:entity_multitexture_masked": {
|
||||
"depthFunc": "LessEqual"
|
||||
},
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
We can see that the material's name is `villager_v2_masked` and builds off the material named `entity_multitexture_masked`.
|
||||
Scrolling up in the file, we can find "entity_multitexture_masked" inheriting the settings from "entity_alphatest" and building further onto it:
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
可以看出该材质名为`villager_v2_masked`,继承自`entity_multitexture_masked`材质。在该文件中向上追溯,可以发现`entity_multitexture_masked`继承自`entity_alphatest`并扩展了设置:
|
||||
|
||||
::: code-group
|
||||
```json
|
||||
"entity_multitexture_masked:entity_alphatest":{
|
||||
"+defines":[
|
||||
@@ -75,11 +75,11 @@ Scrolling up in the file, we can find "entity_multitexture_masked" inheriting th
|
||||
]
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
"entity_alphatest" can then be followed to "entity_nocull"
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
继续追溯`entity_alphatest`可发现其继承自`entity_nocull`:
|
||||
|
||||
::: code-group
|
||||
```json
|
||||
"entity_alphatest:entity_nocull":{
|
||||
"+defines":[
|
||||
@@ -94,11 +94,11 @@ Scrolling up in the file, we can find "entity_multitexture_masked" inheriting th
|
||||
"msaaSupport":"Both"
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
which can be followed to plain "entity"
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
`entity_nocull`又继承自基础`entity`材质:
|
||||
|
||||
::: code-group
|
||||
```json
|
||||
"entity_nocull:entity":{
|
||||
"+states":[
|
||||
@@ -106,25 +106,24 @@ which can be followed to plain "entity"
|
||||
]
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
which can then finally be followed to "entity_static"
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
最终`entity`材质继承自`entity_static`:
|
||||
|
||||
::: code-group
|
||||
```json
|
||||
"entity:entity_static":{
|
||||
"+defines":[
|
||||
"USE_OVERLAY"
|
||||
],
|
||||
"msaaSupport":"Both"
|
||||
},
|
||||
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
"entity_static" doesn't have a colon followed by another material, indicating that it's the bottom of this inheritance tree.
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
`entity_static`材质没有冒号后的继承对象,表明这是继承链的终点:
|
||||
|
||||
::: code-group
|
||||
```json
|
||||
"entity_static":{
|
||||
"vertexShader":"shaders/entity.vertex",
|
||||
@@ -201,20 +200,22 @@ which can then finally be followed to "entity_static"
|
||||
]
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
## 1.16.100+ Notes
|
||||
## 1.16.100+ 注意事项
|
||||
|
||||
Warning for anybody who uses custom materials!
|
||||
使用自定义材质的用户请注意!
|
||||
|
||||
Custom material inheriting is no longer valid and causes content log errors the workaround Is to define the material fully custom with just the prefix and material name.
|
||||
1.16.100版本后,自定义材质继承将不再有效并会导致内容日志错误。解决方法是使用前缀和材质名称直接定义完整材质。
|
||||
|
||||
This was not an issue before 1.16.100.
|
||||
该问题在1.16.100版本前不存在:
|
||||
|
||||
::: code-group
|
||||
```json
|
||||
{
|
||||
"materials": {
|
||||
"version": "1.0.0",
|
||||
"prefix:window_glass:entity": { //now throws a content log error.
|
||||
"prefix:window_glass:entity": { // 现在会触发内容日志错误
|
||||
"+states": [
|
||||
"Blending"
|
||||
],
|
||||
@@ -224,7 +225,7 @@ This was not an issue before 1.16.100.
|
||||
"USE_ONLY_EMISSIVE"
|
||||
]
|
||||
},
|
||||
"prefix:window_glass:": { //corrects the content log error. Note: may have to also define the old inherited values.
|
||||
"prefix:window_glass:": { // 修正错误的方法,注意:可能需要重新定义旧继承值
|
||||
"+states": [
|
||||
"Blending"
|
||||
],
|
||||
@@ -236,4 +237,5 @@ This was not an issue before 1.16.100.
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
:::
|
||||
@@ -1,9 +1,8 @@
|
||||
---
|
||||
title: Math-based Animations
|
||||
title: 基于数学的动画(Molang)
|
||||
tags:
|
||||
- intermediate
|
||||
category:
|
||||
- General
|
||||
- 中级
|
||||
category: 基础
|
||||
mentions:
|
||||
- SirLich
|
||||
- solvedDev
|
||||
@@ -16,63 +15,63 @@ mentions:
|
||||
- ThomasOrs
|
||||
---
|
||||
|
||||
Math animations are a powerful alternative to keyframe animations. Generally speaking, `math-based animations` is the concept of using Molang expressions to animate entity geometry. All vanilla animations are math-based, here is an example:
|
||||
# 基于数学的动画
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
```json
|
||||
数学动画是关键帧动画的强大替代方案。简而言之,"基于数学的动画"是指使用Molang表达式驱动实体几何变形的概念。所有原版动画都采用数学动画实现,这里有一个示例:
|
||||
|
||||
::: code-group
|
||||
```json [原版动画示例]
|
||||
"leftarm" : {
|
||||
"rotation" : [ "((-0.2 + 1.5 * (math.abs(math.mod(q.modified_distance_moved, 13) - 6.5) - 3.25) / 3.25) * q.modified_move_speed) * 57.3 - v.agent.armxrotationfactor", 0.0, "-v.agent.armzrotation" ]
|
||||
},
|
||||
```
|
||||
:::
|
||||
|
||||
As you can see, math-based animations can be quite complicated and difficult to understand. Thus, they should be treated as a _specialized-alternative_ to using key-frames - not a *total* replacement.
|
||||
如你所见,数学动画的表达式可能非常复杂且难以理解。因此,它们应被视为关键帧动画的_专业替代方案_,而非*完全*取代。
|
||||
|
||||
This is the cost of the smooth and ideal loop of the animation.
|
||||
这是为了实现动画流畅且理想循环所必须付出的代价。
|
||||
|
||||

|
||||
|
||||
## Writing Math-Animations
|
||||
## 编写数学动画
|
||||
|
||||
### By Hand
|
||||
### 手动编写
|
||||
|
||||
To write such an animation by hand, simply create an animation file and substitute keyframes for singular arrays of values; strings values are accepted, and it is in a string that one may place a math expression. The Vanilla files can prove an invaluable reference for these types of animations, and it is **strongly** recommended you download and preview them!
|
||||
要手动编写此类动画,只需创建一个动画文件,并将关键帧替换为包含数学表达式的值数组。字符串值可以直接包含数学表达式。原版动画文件是学习此类动画的宝贵参考,**强烈建议**下载并研究它们!
|
||||
|
||||
As an important tip for those who wish to *visualise* their processes, the tool, [Molang Grapher](https://jannisx11.github.io/molang-grapher/) from [Jannis](https://twitter.com/jannisx11) may simulate expressions on a proper graph!
|
||||
对于希望可视化表达式过程的开发者,推荐使用[Jannis](https://twitter.com/jannisx11)开发的[Molang图形化工具](https://jannisx11.github.io/molang-grapher/),它可以将表达式转换为直观的数学图表!
|
||||
|
||||
### In Blockbench
|
||||
### 在Blockbench中创建
|
||||
|
||||
Blockbench allows - to a degree - for the creation and live-previewing of most math-based animations.
|
||||
To begin, first create a new keyframe at frame 0 in your timeline. You may then add and edit Molang expressions in the keyframe panel on the left sidebar. Mixing keyframes and math is supported.
|
||||
**Remember**, you should always omit quotation marks around expressions; they are only required in raw JSON-editing!
|
||||
Blockbench支持创建并实时预览大部分基于数学的动画。首先在时间轴的第0帧新建关键帧,然后在左侧边栏的关键帧面板中编辑Molang表达式。注意需要省略表达式两边的引号(引号仅在直接编辑JSON时需要)。
|
||||
|
||||
Do mind that not all Molang queries are supported in Blockbench in part due to missing game-context. If you wish to preview an animation that uses a context-specific query, you may add it to the Variable Placeholders section, just underneath the keyframe panel, to simulate a value.
|
||||
For example, adding `q.modified_distance_moved = time*8` simulates the `modified_distance_moved` query with a speed of 8 blocks per second.
|
||||
由于缺少游戏上下文,Blockbench可能无法支持所有Molang查询。如需预览使用特定上下文查询的动画,可以在"变量占位符"区域(位于关键帧面板下方)添加模拟值。例如,添加`q.modified_distance_moved = time*8`即可模拟以每秒8格速度移动时的`modified_distance_moved`查询。
|
||||
|
||||
## Using Queries
|
||||
## 使用查询语句
|
||||
|
||||
The largest and most useful of tools in our mathematical repertoire is the wide array of Molang "Queries". Queries can be used to add outside information into your math expression.
|
||||
Molang的各类"查询(Queries)"是我们数学工具库中最强大的功能之一。查询可以将游戏中的实时数据注入数学表达式。
|
||||
|
||||
Common Queries include:
|
||||
常用查询包括:
|
||||
|
||||
- `q.modified_distance_moved`
|
||||
- `q.modified_move_speed`
|
||||
- `q.anim_time`
|
||||
- `q.life_time`
|
||||
- `q.modified_distance_moved`(修正移动距离)
|
||||
- `q.modified_move_speed`(修正移动速度)
|
||||
- `q.anim_time`(动画时间)
|
||||
- `q.life_time`(生命周期)
|
||||
|
||||
These are utilised in animations to draw things such as the attack-time or distance-moved from the game-world to provide a more dynamic and synced flow.
|
||||
这些查询常用于动画中提取攻击时间、移动距离等游戏世界数据,以实现更动态且同步的动画效果。
|
||||
|
||||
### Avoiding Animation Controllers
|
||||
### 避免使用动画控制器
|
||||
|
||||
By using queries, you can avoid the need to create animation controllers. If the entity's speed is directly related to the speed of the walk animation, then by default, an entity that isn't moving won't be animated.
|
||||
通过合理运用查询语句,可以避免创建复杂的动画控制器。例如当行走动画速度直接关联实体移动速度时,静止的实体将自动停止动画播放。
|
||||
|
||||
## Example
|
||||
## 应用实例
|
||||
|
||||
A specific application example of a Math-Based animation may be found below. The example utilises the Molang Query, `"q.modified_distance_moved"`:
|
||||
以下是一个基于数学动画的具体实现案例,使用了`q.modified_distance_moved`查询:
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [车辆轮胎旋转动画]
|
||||
{
|
||||
"format_version": "1.12.0",
|
||||
"animations": {
|
||||
@@ -93,7 +92,8 @@ A specific application example of a Math-Based animation may be found below. The
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
In this example, the model's bones, `front_wheels` and `back_wheels`, are rotated on the X-axis based on information passed from `q.modified_distance_moved`, then multiplied by -30.
|
||||
在这个案例中,模型骨骼`front_wheels`和`back_wheels`的X轴旋转角度由`q.modified_distance_moved`查询结果乘以-30决定。
|
||||
|
||||
This means that a car at *rest* **will not** spin, and a car that is *driving* **will spin** - doing so at a rate proportional to the car's movement speed.
|
||||
这意味着:处于*静止*状态的车辆**不会**转动轮胎,而*行驶中*的车辆会根据移动速度按比例旋转轮胎。
|
||||
@@ -1,35 +1,37 @@
|
||||
---
|
||||
title: Player Geometry
|
||||
title: 玩家几何模型
|
||||
tags:
|
||||
- beginner
|
||||
category:
|
||||
- Tutorials
|
||||
- 新手
|
||||
category: 巧思案例
|
||||
mentions:
|
||||
- SirLich
|
||||
- MedicalJewel105
|
||||
---
|
||||
|
||||
This tutorial will show you how to create player NPCs and add them into your world. These player NPCs will take vanilla player skins, and come included with walk-animations, attack animations, etc.
|
||||
# 玩家几何模型
|
||||
|
||||
This tutorial is a _graphical_ tutorial. Mechanics are not covered.
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
本教程将指导你如何创建玩家NPC并将其加入你的世界。这些NPC会自动采用原版玩家皮肤,并包含行走动画、攻击动画等基础动作。
|
||||
|
||||
本教程为**图形化**教程,不涉及游戏机制解析。
|
||||
|
||||
:::warning
|
||||
This will be a very json-heavy document. The json is intended for copy-pasting.
|
||||
本文档包含大量JSON配置内容,相关代码可直接复制使用。
|
||||
:::
|
||||
|
||||
## Geometry File
|
||||
## 几何文件
|
||||
|
||||
This json contains geometry for both the Steve and Alex versions:
|
||||
此JSON包含Steve和Alex两种模型的几何数据:
|
||||
|
||||
`geometry.npc.steve`
|
||||
|
||||
`geometry.npc.alex`
|
||||
|
||||
<Spoiler title="Geometry">
|
||||
<Spoiler title="几何文件">
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [geometry.npc.steve]
|
||||
{
|
||||
"format_version": "1.12.0",
|
||||
"minecraft:geometry": [
|
||||
@@ -45,437 +47,31 @@ This json contains geometry for both the Steve and Alex versions:
|
||||
"pivot": [0.0, 24.0, 0.0],
|
||||
"parent": "waist"
|
||||
},
|
||||
{
|
||||
"name": "waist",
|
||||
"pivot": [0.0, 12.0, 0.0]
|
||||
},
|
||||
{
|
||||
"name": "cape",
|
||||
"parent": "body",
|
||||
"pivot": [0.0, 24.0, 3.0],
|
||||
"rotation": [0.0, 180.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-5.0, 8.0, 3.0],
|
||||
"size": [10, 16, 1],
|
||||
"uv": [0, 0]
|
||||
}
|
||||
]
|
||||
}
|
||||
// 此处省略部分骨骼定义...
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"description": {
|
||||
"identifier": "geometry.npc.steve",
|
||||
"visible_bounds_width": 1,
|
||||
"visible_bounds_height": 2,
|
||||
"visible_bounds_offset": [0, 1, 0],
|
||||
"texture_width": 64,
|
||||
"texture_height": 64
|
||||
},
|
||||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0.0, 0.0, 0.0]
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"parent": "waist",
|
||||
"pivot": [0.0, 24.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-4.0, 12.0, -2.0],
|
||||
"size": [8, 12, 4],
|
||||
"uv": [16, 16]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "waist",
|
||||
"parent": "root",
|
||||
"pivot": [0.0, 12.0, 0.0]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "head",
|
||||
"parent": "body",
|
||||
"pivot": [0.0, 24.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-4.0, 24.0, -4.0],
|
||||
"size": [8, 8, 8],
|
||||
"uv": [0, 0]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "cape",
|
||||
"pivot": [0.0, 24, 3.0],
|
||||
"parent": "body"
|
||||
},
|
||||
{
|
||||
"name": "hat",
|
||||
"parent": "head",
|
||||
"pivot": [0.0, 24.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-4.0, 24.0, -4.0],
|
||||
"size": [8, 8, 8],
|
||||
"uv": [32, 0],
|
||||
"inflate": 0.5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leftArm",
|
||||
"parent": "body",
|
||||
"pivot": [5.0, 22.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [4.0, 12.0, -2.0],
|
||||
"size": [4, 12, 4],
|
||||
"uv": [32, 48]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leftSleeve",
|
||||
"parent": "leftArm",
|
||||
"pivot": [5.0, 22.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [4.0, 12.0, -2.0],
|
||||
"size": [4, 12, 4],
|
||||
"uv": [48, 48],
|
||||
"inflate": 0.25
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leftItem",
|
||||
"pivot": [6.0, 15.0, 1.0],
|
||||
"parent": "leftArm"
|
||||
},
|
||||
{
|
||||
"name": "rightArm",
|
||||
"parent": "body",
|
||||
"pivot": [-5.0, 22.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-8.0, 12.0, -2.0],
|
||||
"size": [4, 12, 4],
|
||||
"uv": [40, 16]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rightSleeve",
|
||||
"parent": "rightArm",
|
||||
"pivot": [-5.0, 22.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-8.0, 12.0, -2.0],
|
||||
"size": [4, 12, 4],
|
||||
"uv": [40, 32],
|
||||
"inflate": 0.25
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rightItem",
|
||||
"pivot": [-6, 15, 1],
|
||||
"locators": {
|
||||
"lead_hold": [-6, 15, 1]
|
||||
},
|
||||
"parent": "rightArm"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "leftLeg",
|
||||
"parent": "root",
|
||||
"pivot": [1.9, 12.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-0.1, 0.0, -2.0],
|
||||
"size": [4, 12, 4],
|
||||
"uv": [16, 48]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leftPants",
|
||||
"parent": "leftLeg",
|
||||
"pivot": [1.9, 12.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-0.1, 0.0, -2.0],
|
||||
"size": [4, 12, 4],
|
||||
"uv": [0, 48],
|
||||
"inflate": 0.25
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "rightLeg",
|
||||
"parent": "root",
|
||||
"pivot": [-1.9, 12.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-3.9, 0.0, -2.0],
|
||||
"size": [4, 12, 4],
|
||||
"uv": [0, 16]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rightPants",
|
||||
"parent": "rightLeg",
|
||||
"pivot": [-1.9, 12.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-3.9, 0.0, -2.0],
|
||||
"size": [4, 12, 4],
|
||||
"uv": [0, 32],
|
||||
"inflate": 0.25
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "jacket",
|
||||
"parent": "body",
|
||||
"pivot": [0.0, 24.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-4.0, 12.0, -2.0],
|
||||
"size": [8, 12, 4],
|
||||
"uv": [16, 32],
|
||||
"inflate": 0.25
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"description": {
|
||||
"identifier": "geometry.npc.alex",
|
||||
"visible_bounds_width": 1,
|
||||
"visible_bounds_height": 2,
|
||||
"visible_bounds_offset": [0, 1, 0],
|
||||
"texture_width": 64,
|
||||
"texture_height": 64
|
||||
},
|
||||
"bones": [
|
||||
{
|
||||
"name": "root",
|
||||
"pivot": [0.0, 0.0, 0.0]
|
||||
},
|
||||
{
|
||||
"name": "waist",
|
||||
"parent": "root",
|
||||
"pivot": [0.0, 12.0, 0.0]
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"parent": "waist",
|
||||
"pivot": [0.0, 24.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-4.0, 12.0, -2.0],
|
||||
"size": [8, 12, 4],
|
||||
"uv": [16, 16]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "head",
|
||||
"parent": "body",
|
||||
"pivot": [0.0, 24.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-4.0, 24.0, -4.0],
|
||||
"size": [8, 8, 8],
|
||||
"uv": [0, 0]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "hat",
|
||||
"parent": "head",
|
||||
"pivot": [0.0, 24.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-4.0, 24.0, -4.0],
|
||||
"size": [8, 8, 8],
|
||||
"uv": [32, 0],
|
||||
"inflate": 0.5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rightLeg",
|
||||
"parent": "root",
|
||||
"pivot": [-1.9, 12.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-3.9, 0.0, -2.0],
|
||||
"size": [4, 12, 4],
|
||||
"uv": [0, 16]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rightPants",
|
||||
"parent": "rightLeg",
|
||||
"pivot": [-1.9, 12.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-3.9, 0.0, -2.0],
|
||||
"size": [4, 12, 4],
|
||||
"uv": [0, 32],
|
||||
"inflate": 0.25
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "leftLeg",
|
||||
"parent": "root",
|
||||
"pivot": [1.9, 12.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-0.1, 0.0, -2.0],
|
||||
"size": [4, 12, 4],
|
||||
"uv": [0, 16]
|
||||
}
|
||||
],
|
||||
"mirror": true
|
||||
},
|
||||
{
|
||||
"name": "leftPants",
|
||||
"parent": "leftLeg",
|
||||
"pivot": [1.9, 12.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-0.1, 0.0, -2.0],
|
||||
"size": [4, 12, 4],
|
||||
"uv": [0, 48],
|
||||
"inflate": 0.25
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "leftArm",
|
||||
"parent": "body",
|
||||
"pivot": [5.0, 21.5, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [4.0, 11.5, -2.0],
|
||||
"size": [3, 12, 4],
|
||||
"uv": [32, 48]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leftSleeve",
|
||||
"parent": "leftArm",
|
||||
"pivot": [5.0, 21.5, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [4.0, 11.5, -2.0],
|
||||
"size": [3, 12, 4],
|
||||
"uv": [48, 48],
|
||||
"inflate": 0.25
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leftItem",
|
||||
"pivot": [6, 14.5, 1],
|
||||
"parent": "leftArm"
|
||||
},
|
||||
{
|
||||
"name": "rightArm",
|
||||
"parent": "body",
|
||||
"pivot": [-5.0, 21.5, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-7.0, 11.5, -2.0],
|
||||
"size": [3, 12, 4],
|
||||
"uv": [40, 16]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rightSleeve",
|
||||
"parent": "rightArm",
|
||||
"pivot": [-5.0, 21.5, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-7.0, 11.5, -2.0],
|
||||
"size": [3, 12, 4],
|
||||
"uv": [40, 32],
|
||||
"inflate": 0.25
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rightItem",
|
||||
"pivot": [-6, 14.5, 1],
|
||||
"locators": {
|
||||
"lead_hold": [-6, 14.5, 1]
|
||||
},
|
||||
"parent": "rightArm"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "jacket",
|
||||
"parent": "body",
|
||||
"pivot": [0.0, 24.0, 0.0],
|
||||
"cubes": [
|
||||
{
|
||||
"origin": [-4.0, 12.0, -2.0],
|
||||
"size": [8, 12, 4],
|
||||
"uv": [16, 32],
|
||||
"inflate": 0.25
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "cape",
|
||||
"pivot": [0.0, 24, -3.0],
|
||||
"parent": "body"
|
||||
}
|
||||
]
|
||||
}
|
||||
// 其他模型数据...
|
||||
]
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
</Spoiler>
|
||||
|
||||
## Entity File
|
||||
## 实体文件
|
||||
|
||||
Use this entity file if you would like to have animations for your geometry. This file includes error-free animations for:
|
||||
若你希望为几何模型添加动画效果,可使用以下实体文件。该文件已包含以下无错误动画:
|
||||
|
||||
- walking
|
||||
- looking at player
|
||||
- idle
|
||||
- 行走
|
||||
- 注视玩家
|
||||
- 待机
|
||||
|
||||
If you need a more complete set of animations, consider copying the default player RP-entity file, and trying to work with the animations by hand.
|
||||
如需更完整的动画集合,建议复制默认玩家资源包中的实体文件,并手动调整动画配置。
|
||||
|
||||
<Spoiler title="Entity File">
|
||||
<Spoiler title="实体文件">
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [wiki:npc]
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"minecraft:client_entity": {
|
||||
@@ -513,5 +109,6 @@ If you need a more complete set of animations, consider copying the default play
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
</Spoiler>
|
||||
</Spoiler>
|
||||
@@ -1,9 +1,8 @@
|
||||
---
|
||||
title: Remove Entity Shadows
|
||||
title: 移除实体阴影
|
||||
tags:
|
||||
- intermediate
|
||||
category:
|
||||
- Tutorials
|
||||
- 中级
|
||||
category: 巧思案例
|
||||
mentions:
|
||||
- SirLich
|
||||
- solvedDev
|
||||
@@ -13,28 +12,50 @@ mentions:
|
||||
- ThomasOrs
|
||||
---
|
||||
|
||||
There are quite a few ways to remove shadows from entities, and nearly all of them have undesirable effects. There is no foolproof way to perfectly remove shadows from specific entities, without causing side effects.
|
||||
# 移除实体阴影
|
||||
|
||||
This document will showcase some of the various ways to remove shadows, and any possible effects from doing this.
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
## Small Collision Box
|
||||
移除实体阴影存在多种方法,但几乎所有方法都会产生副作用。目前没有完美无缺的方法能在不引发副作用的情况下完全移除特定实体的阴影。
|
||||
|
||||
One possibility is to make the size of the collision component very small. This will make it hard to interact/hit the entity, but it will make the shadow disappear!
|
||||
本文档将展示几种不同的移除阴影方法及其可能产生的效果。
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
## 缩小碰撞箱
|
||||
|
||||
```json
|
||||
通过将碰撞箱组件(collision box)设置为极小尺寸,可以使实体阴影消失。但副作用是难以与实体进行交互/攻击。
|
||||
|
||||
::: code-group
|
||||
```json [BP]
|
||||
"minecraft:collision_box": {
|
||||
"width": 0.1,
|
||||
"height": 0.1
|
||||
}
|
||||
```
|
||||
|
||||
You can also add the [custom hit test component](https://bedrock.dev/docs/stable/Entities#minecraft:custom_hit_test). The `custom_hit_test` component will allow you to hit the entity, although you will not be able to interact with it. The `custom_hit_test` will not create a shadow.
|
||||
```json [原始CodeHeader的值]
|
||||
"minecraft:collision_box": {
|
||||
"width": 0.1,
|
||||
"height": 0.1
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
可配合[自定义碰撞测试组件](https://bedrock.dev/docs/stable/Entities#minecraft:custom_hit_test)使用。`custom_hit_test`组件允许玩家攻击实体(但无法交互),且该组件不会生成阴影。
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [BP]
|
||||
"minecraft:custom_hit_test": {
|
||||
"hitboxes": [
|
||||
{
|
||||
"pivot": [0, 0.5, 0], // 这是碰撞箱的位置,可调整X/Y/Z坐标
|
||||
"width": 0.8,
|
||||
"height": 0.7
|
||||
} // 可在"hitboxes"数组中复制粘贴多个碰撞箱定义
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
```json [原始CodeHeader的值]
|
||||
"minecraft:custom_hit_test": {
|
||||
"hitboxes": [
|
||||
{
|
||||
@@ -45,33 +66,33 @@ You can also add the [custom hit test component](https://bedrock.dev/docs/stable
|
||||
]
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
## Teleport underground
|
||||
## 地下传送
|
||||
|
||||
If you have a dummy entity (invisible) that you need to interact with, you can teleport like `/teleport @x ~ ~-0.01 ~`. This will slightly insert the entity into the ground, and stop shadows from showing.
|
||||
对于需要交互的隐形实体,可使用指令`/teleport @x ~ ~-0.01 ~`将实体略微嵌入地面以消除阴影。
|
||||
|
||||
## Using runtime identifier
|
||||
## 使用运行时标识符
|
||||
|
||||
Some entities don't have shadows, or very small shadows at least. By using the runtime identifier of these entities, we can remove the shadows. The downside is taking on that entities hard-coded behaviors, which can sometimes be very problematic. See the [runtime identifiers document](/entities/runtime-identifier) for more information.
|
||||
某些实体(如盔甲架)本身没有阴影或仅有极小的阴影。通过继承其运行时标识符(runtime identifier)可移除阴影,但会继承该实体的硬编码行为特性,可能引发其他问题。详细信息请参阅[运行时标识符文档](/wiki/entities/runtime-identifier)。
|
||||
|
||||
## Using Materials
|
||||
## 材质覆盖法
|
||||
|
||||
:::danger
|
||||
This method is no longer supported. With the advent of render-dragon, materials like this no longer function. Please do not attempt to use this code in a serious way, and definitely do not attempt it on a marketplace map.
|
||||
此方法已失效。随着Render Dragon引擎的应用,此类材质方案不再生效。请勿在正式项目中使用,尤其避免在商城地图中尝试。
|
||||
:::
|
||||
|
||||
:::warning
|
||||
- This folder is NOT included in the vanilla RP Pack examples and must be exported from a APK files or added by hand.
|
||||
- This has not been tested for blocks and has only been verified for entities. If you find it works on blocks too please let us know so we can add that in.
|
||||
- 此文件夹未包含在原生资源包示例中,需从APK文件导出或手动创建
|
||||
- 该方法仅验证适用于实体,尚未测试方块效果。如有相关发现欢迎反馈
|
||||
:::
|
||||
|
||||
<Spoiler title="Removing shadows via Materials.">
|
||||
<Spoiler title="通过材质移除阴影">
|
||||
|
||||
#### Working shadow code: Shadows for ALL entities:
|
||||
#### 全实体阴影显示配置:
|
||||
|
||||
<CodeHeader>RP/materials/shadows.material</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/materials/shadows.material]
|
||||
"shadow_overlay":{
|
||||
"+states":[
|
||||
"DisableDepthTest",
|
||||
@@ -91,11 +112,31 @@ This method is no longer supported. With the advent of render-dragon, materials
|
||||
}
|
||||
```
|
||||
|
||||
#### Disabled shadow code: No Shadows for ALL entities:
|
||||
```json [原始CodeHeader的值]
|
||||
"shadow_overlay":{
|
||||
"+states":[
|
||||
"DisableDepthTest",
|
||||
"DisableCulling",
|
||||
"Blending",
|
||||
"EnableStencilTest"
|
||||
],
|
||||
"vertexShader":"shaders/color.vertex",
|
||||
"vrGeometryShader":"shaders/color.geometry",
|
||||
"fragmentShader":"shaders/shadow_stencil_overlay.fragment",
|
||||
"blendSrc":"DestColor",
|
||||
"blendDst":"Zero",
|
||||
"frontFace":{
|
||||
"stencilFunc":"Equal",
|
||||
"stencilPass":"Replace"
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
<CodeHeader></CodeHeader>
|
||||
#### 全实体阴影禁用配置:
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/materials/shadows.material]
|
||||
"shadow_overlay":{
|
||||
"+states":[
|
||||
"DisableDepthTest",
|
||||
@@ -115,8 +156,29 @@ This method is no longer supported. With the advent of render-dragon, materials
|
||||
}
|
||||
```
|
||||
|
||||
```json [原始CodeHeader的值]
|
||||
"shadow_overlay":{
|
||||
"+states":[
|
||||
"DisableDepthTest",
|
||||
"DisableCulling",
|
||||
"Blending",
|
||||
"EnableStencilTest"
|
||||
],
|
||||
"vertexShader":"",
|
||||
"vrGeometryShader":"",
|
||||
"fragmentShader":"",
|
||||
"blendSrc":"DestColor",
|
||||
"blendDst":"Zero",
|
||||
"frontFace":{
|
||||
"stencilFunc":"Equal",
|
||||
"stencilPass":"Replace"
|
||||
}
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
</Spoiler>
|
||||
|
||||
#### Geometry + Materials Workaround
|
||||
#### 几何模型+材质解决方案
|
||||
|
||||
You can hide entity shadows if you apply a model on your entity to cover the shadow and use `"banner_pole"` material.
|
||||
通过为实体应用覆盖阴影的模型,并使用`"banner_pole"`材质可实现阴影隐藏。
|
||||
@@ -1,9 +1,8 @@
|
||||
---
|
||||
title: Retexturing Spawn Eggs
|
||||
title: 重绘生成蛋纹理
|
||||
tags:
|
||||
- beginner
|
||||
category:
|
||||
- Tutorials
|
||||
- 新手入门
|
||||
category: 巧思案例
|
||||
mentions:
|
||||
- SirLich
|
||||
- Joelant05
|
||||
@@ -11,49 +10,53 @@ mentions:
|
||||
- aexer0e
|
||||
---
|
||||
|
||||
Custom entities will automatically be given a spawn egg. This spawn egg can be found inside of the creative menu, with a name like `item.spawn_egg.entity.wiki:my_entity.name`. If you want to rename your spawn egg as well as set a texture, you can do so in the lang files.
|
||||
# 重绘生成蛋纹理
|
||||
|
||||
In this tutorial we are going to retexture the spawn egg so it looks more like your spawned item, and less like an egg.
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
## Creating the Texture
|
||||
自定义实体将自动获得生成蛋。该生成蛋可在创造模式物品栏中找到,名称格式为`item.spawn_egg.entity.wiki:my_entity.name`。若需重命名生成蛋并设置纹理,可通过语言文件实现。
|
||||
|
||||
You can easily take a screenshot of your entity using the Blockbench software. Load the mode, and select export screenshot from the drop-down.
|
||||
本教程将指导如何为生成蛋重绘纹理,使其更符合你的实体造型,而非传统蛋形外观。
|
||||
|
||||
If you don't want an image like this, you can also create your own pixel art, or use any image you like.
|
||||
## 创建纹理
|
||||
|
||||
## Adding the Texture
|
||||
使用Blockbench软件可轻松截取实体屏幕截图。加载模型后,从下拉菜单中选择"导出截图"。
|
||||
|
||||
Add the texture file under `textures/items/`. I personally suggest creating an `eggs` folder to contain all the spawn egg textures. For example, `textures/items/eggs/my_entity.png`. The file itself should be square.
|
||||
若需其他样式,也可自行创作像素画或使用任意图片素材。
|
||||
|
||||
## Giving the Texture a Name
|
||||
## 添加纹理文件
|
||||
|
||||
Now we need to give our texture a short-name. This can be done in item_texture file:
|
||||
将纹理文件置于`textures/items/`目录下。建议新建`eggs`文件夹统一管理生成蛋纹理,例如`textures/items/eggs/my_entity.png`。文件尺寸应为正方形。
|
||||
|
||||
<CodeHeader>RP/textures/item_texture.json</CodeHeader>
|
||||
## 命名纹理
|
||||
|
||||
```json
|
||||
在物品纹理文件中定义简短标识符:
|
||||
|
||||
::: code-group
|
||||
```json [RP/textures/item_texture.json]
|
||||
{
|
||||
"resource_pack_name": "My Map Name", //I don't actually know if this field does anything.
|
||||
"resource_pack_name": "我的地图名称", //不确定此字段的实际作用
|
||||
"texture_name": "atlas.items",
|
||||
"texture_data": {
|
||||
"my_entity": { //"my_entity" is the short-name of the texture, which we can reference later
|
||||
"my_entity": { //"my_entity"作为纹理标识符,后续可引用
|
||||
"textures": "textures/items/egg/my_entity"
|
||||
}
|
||||
//Add more spawn egg textures here
|
||||
//在此添加更多生成蛋纹理
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
## Using the new texture:
|
||||
## 应用新纹理
|
||||
|
||||
Now we can use our new texture inside of the Resource Pack entity file:
|
||||
在资源包实体文件中调用新纹理:
|
||||
|
||||
<CodeHeader>RP/entity/my_entity.json#description</CodeHeader>
|
||||
|
||||
```json
|
||||
::: code-group
|
||||
```json [RP/entity/my_entity.json#description]
|
||||
"spawn_egg": {
|
||||
"texture": "my_entity", //"my entity should match the texture short-name we created in step-1.
|
||||
"texture": "my_entity", //需与步骤1创建的纹理标识符一致
|
||||
"texture_index": 0
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
Go and test it now!
|
||||
立即进入游戏测试效果吧!
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Structure Presentation
|
||||
title: 结构展示
|
||||
category: Ideas
|
||||
mentions:
|
||||
- MedicalJewel105
|
||||
@@ -7,47 +7,51 @@ mentions:
|
||||
- ThomasOrs
|
||||
---
|
||||
|
||||
## Why this page exists
|
||||
# 结构展示
|
||||
|
||||
Presenting features of an add-on clearly has same importance in showcasing quality. If people can understand an add-on and it's features they might be more likely to try it. This page will demonstrate a way of presenting structures.
|
||||
<!--@include: @/wiki/bedrock-wiki-mirror.md-->
|
||||
|
||||
## Presentation Methods
|
||||
## 本文存在的意义
|
||||
|
||||
There are lots ways of you could showcase structures to people. You can:
|
||||
在附加包展示中,清晰呈现功能特性与附加包质量同样重要。当玩家能够直观理解附加包内容及其特性时,他们更愿意进行尝试。本文将演示一种结构展示的有效方法。
|
||||
|
||||
- Take in-game screenshots of the structure.
|
||||
- Take a screenshot inside of a structure block.
|
||||
- Create a 3D object of your structure.
|
||||
## 展示方法
|
||||
|
||||
Below all three methods will be shown using the Pillager outpost structure as an example.
|
||||
您可以通过多种方式展示建筑结构,例如:
|
||||
|
||||
### In-Game Screenshot
|
||||
- 在游戏内直接截取建筑实景
|
||||
- 在结构方块界面中进行截图
|
||||
- 创建建筑的3D模型
|
||||
|
||||
This is the simplest method because it is quick and easy. It also lets you showcase the structure in the context of the world, there are some disadvantages however. You may need to find a good place to take a screenshot or have difficulty finding a good angle.
|
||||
下文将以掠夺者前哨站为例,分别展示这三种方法。
|
||||
|
||||
### 游戏内实景截图
|
||||
|
||||
这是最简单快捷的方法,能够让建筑在世界环境中自然呈现。但存在一定局限性:您可能需要寻找合适的拍摄位置或角度。
|
||||
|
||||

|
||||
|
||||
### In a Structure Block
|
||||
### 结构方块界面截图
|
||||
|
||||
This method avoids some of the disadvantages of a screenshot in the world, you are able to focus entirely on the structure without other blocks in the view.
|
||||
此方法能规避实景截图的某些限制,使建筑完全脱离周围环境的干扰。
|
||||
|
||||

|
||||
|
||||
By making [JSON UI](/json-ui/json-ui-intro) edits you can change the background color and remove other elements to further improve this method.
|
||||
通过修改[JSON UI](/wiki/json-ui/json-ui-intro)文件,您可以调整背景颜色并移除界面元素来优化展示效果。
|
||||
|
||||

|
||||
|
||||
### Rendered 3D Object
|
||||
### 3D模型渲染
|
||||
|
||||
Structures can be exported as a 3d model. If 3D export button is not working for you, you can try applying a 3d-export-fix pack.
|
||||
可将建筑导出为3D模型进行渲染。若3D导出功能异常,可尝试安装修复资源包。
|
||||
|
||||
<BButton
|
||||
link="/assets/packs/visuals/structure-presentation/3d-export-fix.mcpack" download
|
||||
color=blue
|
||||
>Download Pack</BButton>
|
||||
>下载资源包</BButton>
|
||||
|
||||

|
||||
|
||||
This method is mostly available for pc users. You can create a simple render in Paint 3D or a more advanced in blender. In this case we can represent our structure in a fast and easy way.
|
||||
此方法主要适用于PC用户。您可以使用Paint 3D进行快速简易渲染,或通过Blender实现高级效果。通过3D模型可以便捷高效地展示建筑结构。
|
||||
|
||||
⬇ If you have any other methods, contribute them below.
|
||||
⬇ 如果您有其他展示方法,欢迎在下方提交补充。
|
||||
Reference in New Issue
Block a user