From d466b529e74919a639c8852e4be218a4fb2eb6e7 Mon Sep 17 00:00:00 2001 From: nickwrecks Date: Sun, 6 Aug 2023 19:31:21 +0300 Subject: [PATCH 1/5] Added information related to creating a BakedQuad. --- docs/rendering/modelloaders/bakedmodel.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/rendering/modelloaders/bakedmodel.md b/docs/rendering/modelloaders/bakedmodel.md index 33579018..4e6475e4 100644 --- a/docs/rendering/modelloaders/bakedmodel.md +++ b/docs/rendering/modelloaders/bakedmodel.md @@ -43,6 +43,9 @@ See [Transform][transform]. This is the main method of `BakedModel`. It returns a list of `BakedQuad`s: objects which contain the low-level vertex data that will be used to render the model. If the model is being rendered as a block, then the `BlockState` passed in is non-null. If the model is being rendered as an item, the `ItemOverrides` returned from `#getOverrides` is responsible for handling the state of the item, and the `BlockState` parameter will be `null`. +!!! note + The origin point for the vertices in a `BakedQuad` is the bottom, Northwest corner. Any value greater than 1 will position a given vertex outside of the block space. To avoid lighting issues, provide the vertices in counterclockwise order. + The `Direction` passed in is used for face culling. If the block against the given side of another block being rendered is opaque, then the faces associated with that side are not rendered. If that parameter is `null`, all faces not associated with a side are returned (that will never be culled). The `rand` parameter is an instance of Random. @@ -51,6 +54,8 @@ It also takes in a non null `ModelData` instance. This can be used to define ext Note that this method is called very often: once for every combination of non-culled face and supported block render layer (anywhere between 0 to 28 times) *per block in a level*. This method should be as fast as possible, and should probably cache heavily. + + [overrides]: ./itemoverrides.md [ambocc]: https://en.wikipedia.org/wiki/Ambient_occlusion [bewlr]: ../../items/bewlr.md From f08d4da520f92cb5f8da54c16d3c9141bc341c36 Mon Sep 17 00:00:00 2001 From: nickwrecks Date: Mon, 7 Aug 2023 11:31:30 +0300 Subject: [PATCH 2/5] [1.20.x] Added information related to creating a BakedQuad. --- docs/rendering/modelloaders/bakedmodel.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/rendering/modelloaders/bakedmodel.md b/docs/rendering/modelloaders/bakedmodel.md index 4e6475e4..f8627c64 100644 --- a/docs/rendering/modelloaders/bakedmodel.md +++ b/docs/rendering/modelloaders/bakedmodel.md @@ -43,8 +43,8 @@ See [Transform][transform]. This is the main method of `BakedModel`. It returns a list of `BakedQuad`s: objects which contain the low-level vertex data that will be used to render the model. If the model is being rendered as a block, then the `BlockState` passed in is non-null. If the model is being rendered as an item, the `ItemOverrides` returned from `#getOverrides` is responsible for handling the state of the item, and the `BlockState` parameter will be `null`. -!!! note - The origin point for the vertices in a `BakedQuad` is the bottom, Northwest corner. Any value greater than 1 will position a given vertex outside of the block space. To avoid lighting issues, provide the vertices in counterclockwise order. +!!! note + The origin point for the vertices in a `BakedQuad` is the bottom, Northwest corner. Vertex coordinate values less than 0 or greater than 1 will position the vertex outside of the block. To avoid lighting issues, provide the vertices in counterclockwise order. The `Direction` passed in is used for face culling. If the block against the given side of another block being rendered is opaque, then the faces associated with that side are not rendered. If that parameter is `null`, all faces not associated with a side are returned (that will never be culled). From 5dc3334240e31b934b5602a7a33301d8262268a3 Mon Sep 17 00:00:00 2001 From: NickWrecks <137068872+NickWrecks@users.noreply.github.com> Date: Sat, 16 Sep 2023 19:49:41 +0300 Subject: [PATCH 3/5] Update docs/rendering/modelloaders/bakedmodel.md Co-authored-by: ChampionAsh5357 --- docs/rendering/modelloaders/bakedmodel.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rendering/modelloaders/bakedmodel.md b/docs/rendering/modelloaders/bakedmodel.md index f8627c64..ea3b815b 100644 --- a/docs/rendering/modelloaders/bakedmodel.md +++ b/docs/rendering/modelloaders/bakedmodel.md @@ -44,7 +44,7 @@ See [Transform][transform]. This is the main method of `BakedModel`. It returns a list of `BakedQuad`s: objects which contain the low-level vertex data that will be used to render the model. If the model is being rendered as a block, then the `BlockState` passed in is non-null. If the model is being rendered as an item, the `ItemOverrides` returned from `#getOverrides` is responsible for handling the state of the item, and the `BlockState` parameter will be `null`. !!! note - The origin point for the vertices in a `BakedQuad` is the bottom, Northwest corner. Vertex coordinate values less than 0 or greater than 1 will position the vertex outside of the block. To avoid lighting issues, provide the vertices in counterclockwise order. + The origin point for the vertices in a `BakedQuad` is the bottom, northwest corner. Vertex coordinate values less than 0 or greater than 1 will position the vertex outside of the block. To avoid lighting issues, provide the vertices in counterclockwise order. The `Direction` passed in is used for face culling. If the block against the given side of another block being rendered is opaque, then the faces associated with that side are not rendered. If that parameter is `null`, all faces not associated with a side are returned (that will never be culled). From 8b636fb47573de213ae9ffe1c89532b3864af71f Mon Sep 17 00:00:00 2001 From: NickWrecks <137068872+NickWrecks@users.noreply.github.com> Date: Sat, 16 Sep 2023 19:56:33 +0300 Subject: [PATCH 4/5] Removed unnecessary whitespace in bakedmodel.md --- docs/rendering/modelloaders/bakedmodel.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/rendering/modelloaders/bakedmodel.md b/docs/rendering/modelloaders/bakedmodel.md index ea3b815b..dd173a68 100644 --- a/docs/rendering/modelloaders/bakedmodel.md +++ b/docs/rendering/modelloaders/bakedmodel.md @@ -55,7 +55,6 @@ It also takes in a non null `ModelData` instance. This can be used to define ext Note that this method is called very often: once for every combination of non-culled face and supported block render layer (anywhere between 0 to 28 times) *per block in a level*. This method should be as fast as possible, and should probably cache heavily. - [overrides]: ./itemoverrides.md [ambocc]: https://en.wikipedia.org/wiki/Ambient_occlusion [bewlr]: ../../items/bewlr.md From 759d50ec41dbeaf9ca4e4aaa7d0b0eccff9cc6ec Mon Sep 17 00:00:00 2001 From: NickWrecks <137068872+NickWrecks@users.noreply.github.com> Date: Fri, 22 Sep 2023 20:08:59 +0300 Subject: [PATCH 5/5] Update bakedmodel.md --- docs/rendering/modelloaders/bakedmodel.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/rendering/modelloaders/bakedmodel.md b/docs/rendering/modelloaders/bakedmodel.md index dd173a68..1bc70fbe 100644 --- a/docs/rendering/modelloaders/bakedmodel.md +++ b/docs/rendering/modelloaders/bakedmodel.md @@ -54,7 +54,6 @@ It also takes in a non null `ModelData` instance. This can be used to define ext Note that this method is called very often: once for every combination of non-culled face and supported block render layer (anywhere between 0 to 28 times) *per block in a level*. This method should be as fast as possible, and should probably cache heavily. - [overrides]: ./itemoverrides.md [ambocc]: https://en.wikipedia.org/wiki/Ambient_occlusion [bewlr]: ../../items/bewlr.md