BramStoutProductions / MiEx

A modern Minecraft Exporter
BSD 3-Clause "New" or "Revised" License
57 stars 9 forks source link

Modded Wrong Textures #30

Closed Fyoncle closed 5 months ago

Fyoncle commented 6 months ago

image Using 1.3.0 currently and tree textures are not appearing, but the pink grasses are appearing correctly except the tree and the textures of it, have any idea why again? My file paths; resources > Regions Unexplored > assets > regions_unexplored > blockstates > all json files i found in the mod that is needed

resources > Regions Unexplored > assets > regions_unexplored > models > block > all json files i found in the mod that is needed

resources > Regions Unexplored > assets > regions_unexplored > textures > block > all png files i found in the mod that is needed

Fyoncle commented 6 months ago

image Also some stairs and textures are literally corrupted, not works on 1.3.0 at all.

Fyoncle commented 6 months ago

image Even log sizes and leaf placement and sizes are COMPLETELY WRONG.

Fyoncle commented 6 months ago

image Even log sizes and leaf placement and sizes are COMPLETELY WRONG.

[i manually putted the textures but didnt work.]

BramStout commented 6 months ago

Tomorrow, I'll release a new version that has a tool to automatically extract the resource packs from mods. Hopefully that will fix any issues that you might have with modded worlds.

Fyoncle commented 6 months ago

Tomorrow, I'll release a new version that has a tool to automatically extract the resource packs from mods. Hopefully that will fix any issues that you might have with modded worlds.

Yay!!! that will help A LOT.

Fyoncle commented 5 months ago

Camping here for the new version :D

BramStout commented 5 months ago

Camping here for the new version :D

Sorry, it'll be tomorrow!

Fyoncle commented 5 months ago

Camping here for the new version :D

Sorry, it'll be tomorrow!

:c

Fyoncle commented 5 months ago

CAMPING HERE AGAIN HAHA. 😈

Fyoncle commented 5 months ago

image BRAM STOUT, THAT IS A MASTERPIECE!!! THANK YOU FOR THE VERSION BRO.

Fyoncle commented 5 months ago

image BRAM STOUT, THAT IS A MASTERPIECE!!! THANK YOU FOR THE VERSION BRO.

TESTED WITH MODDED BLOCKS, THEY ALSO WORK!!! ONLY PROBLEM IS ANIMATED TEXTURES BUT ITS FINE.

image

Fyoncle commented 5 months ago

image These tree branch textures are not getting exported with MiEx for some reason, i don't know why.

BramStout commented 5 months ago

image BRAM STOUT, THAT IS A MASTERPIECE!!! THANK YOU FOR THE VERSION BRO.

TESTED WITH MODDED BLOCKS, THEY ALSO WORK!!! ONLY PROBLEM IS ANIMATED TEXTURES BUT ITS FINE.

image

The animated textures not working, should be because you're using UsdPreviewSurface for the materials. UsdPreviewSurface doesn't support animated textures. But it is on my to-do list to improve compatibility with various DCCs.

image These tree branch textures are not getting exported with MiEx for some reason, i don't know why.

It looks like an issue with how MiEx handles resource identifiers for textures specified in model files. Resource identifiers are how you specify different textures, blocks, items, models, etc. Each resource identifier also has a namespace. If no namespace is specified, a namespace is implicitly added in. When I wrote it, I assumed that it would use the namespace of the model file, when no namespace is specified. But, it turns out that Minecraft always uses the "minecraft:" namespace when you don't specify a namespace. I'll get a new version out tomorrow to fix this.

Fyoncle commented 5 months ago

image BRAM STOUT, THAT IS A MASTERPIECE!!! THANK YOU FOR THE VERSION BRO.

TESTED WITH MODDED BLOCKS, THEY ALSO WORK!!! ONLY PROBLEM IS ANIMATED TEXTURES BUT ITS FINE. image

The animated textures not working, should be because you're using UsdPreviewSurface for the materials. UsdPreviewSurface doesn't support animated textures. But it is on my to-do list to improve compatibility with various DCCs.

image These tree branch textures are not getting exported with MiEx for some reason, i don't know why.

It looks like an issue with how MiEx handles resource identifiers for textures specified in model files. Resource identifiers are how you specify different textures, blocks, items, models, etc. Each resource identifier also has a namespace. If no namespace is specified, a namespace is implicitly added in. When I wrote it, I assumed that it would use the namespace of the model file, when no namespace is specified. But, it turns out that Minecraft always uses the "minecraft:" namespace when you don't specify a namespace. I'll get a new version out tomorrow to fix this.

Thank you! also my friend making a new addon that will add a compatiblity for animated textures and more into MiEx!

BlueEvilGFX commented 5 months ago

The animated textures not working, should be because you're using UsdPreviewSurface for the materials. UsdPreviewSurface doesn't support animated textures. But it is on my to-do list to improve compatibility with various DCCs.

Hi there :) Just a small question regarding the animated textures. The values of the time samples / location are correct though? float2 inputs:translation.timeSamples = {...}. So it would give me the correct result for animating the texture based on the frametime of the animation ingame (translated values of the .mcmeta file)? Thanks in advance!

BramStout commented 5 months ago

The animated textures not working, should be because you're using UsdPreviewSurface for the materials. UsdPreviewSurface doesn't support animated textures. But it is on my to-do list to improve compatibility with various DCCs.

Hi there :) Just a small question regarding the animated textures. The values of the time samples / location are correct though? float2 inputs:translation.timeSamples = {...}. So it would give me the correct result for animating the texture based on the frametime of the animation ingame (translated values of the .mcmeta file)? Thanks in advance!

The values are indeed translated from the .mcmeta file, so they should be correct. Although, I did recently find out that it might be playing the animation in reverse, so I'll be investigating this tomorrow and will have a fix for it in the next release that is planned for tomorrow. You can read more about it in this section of the Wiki (the part that talks about expressions): https://github.com/BramStoutProductions/MiEx/wiki/6.-USD#material-templates

BlueEvilGFX commented 5 months ago

The values are indeed translated from the .mcmeta file, so they should be correct. Although, I did recently find out that it might be playing the animation in reverse, so I'll be investigating this tomorrow and will have a fix for it in the next release that is planned for tomorrow. You can read more about it in this section of the Wiki (the part that talks about expressions): https://github.com/BramStoutProductions/MiEx/wiki/6.-USD#material-templates

Thanks for your quick reply! So the composed composed material.usd file has following for the animation keyframes...

float2 inputs:translation.timeSamples = {
                -0.301: (0.0,0.0),
                -0.3: (0.0,0.96875),
                1.699: (0.0,0.96875),
                1.7: (0.0,0.9375),
                3.699: (0.0,0.9375)...

Am i correct that the key are the frames? If so, for which framerate are these? Thanks a bunch, this would help me a lot to have a more precise animation playback speed.

BramStout commented 5 months ago

The values are indeed translated from the .mcmeta file, so they should be correct. Although, I did recently find out that it might be playing the animation in reverse, so I'll be investigating this tomorrow and will have a fix for it in the next release that is planned for tomorrow. You can read more about it in this section of the Wiki (the part that talks about expressions): https://github.com/BramStoutProductions/MiEx/wiki/6.-USD#material-templates

Thanks for your quick reply! So the composed composed material.usd file has following for the animation keyframes...

float2 inputs:translation.timeSamples = {
                -0.301: (0.0,0.0),
                -0.3: (0.0,0.96875),
                1.699: (0.0,0.96875),
                1.7: (0.0,0.9375),
                3.699: (0.0,0.9375)...

Am i correct that the key are the frames? If so, for which framerate are these? Thanks a bunch, this would help me a lot to have a more precise animation playback speed.

The keys are indeed in frames. It doesn't specify the framerate, so it's whatever the framerate of your DCC is. Minecraft's framerate is 20 FPS, so you could say that the implicit framerate of the animation keyframes is 20 FPS. But depending on the framerate of your project, you might want it to be a different speed. So, in the miex_config.json file you can specify a frame rate multiplier with the setting animatedTexturesFrameTimeMultiplier. The default config file is located in the base_resource_pack, but any resource pack can contain a miex_config.json file allowing you to override specific settings only when specific resource packs are enabled. So you could make a resource pack for if your project is 30 FPS, or 60 FPS, etc. which would just change that one setting.

Fyoncle commented 5 months ago

The values are indeed translated from the .mcmeta file, so they should be correct. Although, I did recently find out that it might be playing the animation in reverse, so I'll be investigating this tomorrow and will have a fix for it in the next release that is planned for tomorrow. You can read more about it in this section of the Wiki (the part that talks about expressions): https://github.com/BramStoutProductions/MiEx/wiki/6.-USD#material-templates

Thanks for your quick reply! So the composed composed material.usd file has following for the animation keyframes...

float2 inputs:translation.timeSamples = {
                -0.301: (0.0,0.0),
                -0.3: (0.0,0.96875),
                1.699: (0.0,0.96875),
                1.7: (0.0,0.9375),
                3.699: (0.0,0.9375)...

Am i correct that the key are the frames? If so, for which framerate are these? Thanks a bunch, this would help me a lot to have a more precise animation playback speed.

The keys are indeed in frames. It doesn't specify the framerate, so it's whatever the framerate of your DCC is. Minecraft's framerate is 20 FPS, so you could say that the implicit framerate of the animation keyframes is 20 FPS. But depending on the framerate of your project, you might want it to be a different speed. So, in the miex_config.json file you can specify a frame rate multiplier with the setting animatedTexturesFrameTimeMultiplier. The default config file is located in the base_resource_pack, but any resource pack can contain a miex_config.json file allowing you to override specific settings only when specific resource packs are enabled. So you could make a resource pack for if your project is 30 FPS, or 60 FPS, etc. which would just change that one setting.

Hes making an addon for MiEx to add animated textures into blender, so i think he needs further explanation about how to get how fast animations info from mods and all automatically into the addon.

BramStout commented 5 months ago

The values are indeed translated from the .mcmeta file, so they should be correct. Although, I did recently find out that it might be playing the animation in reverse, so I'll be investigating this tomorrow and will have a fix for it in the next release that is planned for tomorrow. You can read more about it in this section of the Wiki (the part that talks about expressions): https://github.com/BramStoutProductions/MiEx/wiki/6.-USD#material-templates

Thanks for your quick reply! So the composed composed material.usd file has following for the animation keyframes...

float2 inputs:translation.timeSamples = {
                -0.301: (0.0,0.0),
                -0.3: (0.0,0.96875),
                1.699: (0.0,0.96875),
                1.7: (0.0,0.9375),
                3.699: (0.0,0.9375)...

Am i correct that the key are the frames? If so, for which framerate are these? Thanks a bunch, this would help me a lot to have a more precise animation playback speed.

The keys are indeed in frames. It doesn't specify the framerate, so it's whatever the framerate of your DCC is. Minecraft's framerate is 20 FPS, so you could say that the implicit framerate of the animation keyframes is 20 FPS. But depending on the framerate of your project, you might want it to be a different speed. So, in the miex_config.json file you can specify a frame rate multiplier with the setting animatedTexturesFrameTimeMultiplier. The default config file is located in the base_resource_pack, but any resource pack can contain a miex_config.json file allowing you to override specific settings only when specific resource packs are enabled. So you could make a resource pack for if your project is 30 FPS, or 60 FPS, etc. which would just change that one setting.

Hes making an addon for MiEx to add animated textures into blender, so i think he needs further explanation about how to get how fast animations info from mods and all automatically into the addon.

If he has access to the USD data, then he could take the animation keyframes from the USD export from MiEx and apply it in Blender onto the right shading node. If he doesn't have access to the USD data, then he could look up the file path of the texture and then find the mcmeta file for that texture, read it himself and figure out the animation keyframes from that. Just like MiEx also figures out the animation keyframes from the mcmeta file.

BramStout commented 5 months ago

image These tree branch textures are not getting exported with MiEx for some reason, i don't know why.

This issue has now been fixed in the latest release of MiEx, which you can find here: https://github.com/BramStoutProductions/MiEx/releases/tag/v1.5.0