Open DragonDev1906 opened 4 years ago
Progress so far:
Translation and Scale of blocks (partial blocks) didn't work, showing an error in the projection matrix. This error should now be fixed
Blocks can now have different textures on each face (additionally this is helpful for giving different textures to blocks)
Which texture to use is now (2bad7595fae2e58f527de404544fd9c02ca2d742) read from the json files. For that to work the following two methods have to be implemented (currently they return dummy values):
UVs from the model definition (json) are now used for rendering.
a4e865a84e6213c6075c928c1c83178712bd755b
The rotation defined in blockstate files is now applied (rotating the entire block as minecraft does)
The "uvlock" values is now used to ignore rotations on the block if set to true. This results in stairs (e.g. oak stairs) beeing rendered correctly c056a3c303095acfd2253231ae759acd06648251
A single, directional light is now supported
8d4ebcf9da851fdd21b522220cafa47905540d8b
Add support for rotated cubes (parts of blocks) (e.g. Lantern)
477a8c50797f4d20a5225978263611d757c8db37
As shown in the first image the uvlock didn't quite work correctly. Because of the oak_planks texture this wasn't visible earlier but came up when the stairs were rendered with the sapling texture.
Fixed in d1a822b15dadd5968d6bda0099bee308ac89db78
The rescale option in element["rotation"] is now used. This is for example used for saplings. In the current version of overviewer this option is not needed (for saplings at least) because their textures are always shown from straight on. Adding this option makes the system more future proof and it might work for resource packs using it with different rotations.
The black half is because of the light settings which are optimized for the isometric angle, not for viewing from only one direction as shown in the image.
Wiki: https://minecraft.gamepedia.com/Model#Example:_Sapling
Commit: 81912195c558a9fae9ee5c9ffed9850757b8aa78
Update 1: Unfortunatly this looks wierd when the texture tile is squashed together and rescale is enabled. Maybe there should be an option to disable rescale or better: don't squash the tile.
Update 2: Removed the rescale option in e4c44311180ef0674474dc9344f6b7bcdb57cb2e because it didn't work correctly and everything seemed to look better without it
Correct rendering for non-existant faces (previously they used the texture with index 0
87f10a46fb85bb5c664d8faac12134386498c697
Below is an image of a cactus (with the oak_planks texture)
Here is an image of all currently rendered Blocks (using the oak_planks texture)
The blockstate/elements/./faces/./rotation parameter is now used. It rotates the texture on the face without changing what is displayed. Without this parameter some faces were rotated and scaled wrong.
d2bf84e42139a27f20be5118f491fa4336ac8b8d
Before:
After:
The renderer is now pretty mutch finished for blocks using "variant"
Now with some more textures
All blocks seem to be rendered correctly.
Exception: Some blocks can't because the JSON file does not contain the required data (e.g. the bell block)
Commit: b0ce1d7d3fcd9e3298645f8c4cb5da4400451361
Render full blocks using moderngl. Mainly to test the functionality of moderngl and implement a system for easy extensibility.
The following image shows the blocks rendered using PIL