MCprep
MCprep copied to clipboard
Cannot swap texture pack using jmc2obj
Did the issue happen after restarting Blender?
- [x] Yes, the issue indeed continued after restarting Blender
Check known issues
- [x] I have checked known issues, and my problem is different
What happened?
When using jmc2obj, trying to change a texture pack with normals/specular errors out with "Detected scaled UV's (all in one texture), be sure to use Mineway's 'Export Individual Textures To..'' feature". This happens when exporting all textures + specular/normal, all textures, and no textures (and also + alpha/textures in separate files). Well, every possible combination.
When using one object only the texture pack does not apply. When using objects per material, the texture pack applies but not the normals/specular.
What steps are needed to produce the bug?
- Generate one of the few combinations tested in jmc2obj
- Open new blender file
- Import obj in the jmc2obj tab.
- Immediately press swap texture pack, selecting either Specular or SEUS.
- Plain textures are applied, but not specular/normal data.
What version of MCprep are you using?
3.6.1.2
What version of Blender are you using?
4.2.3 LTS
Can you open the OBJ in a text editor and copy-paste from COMMON_MC_OBJ_START to COMMON_MC_OBJ_END?
And in addition, can you state what version of jmc2OBJ you're using? Maybe this is the result of a new update?
# COMMON_MC_OBJ_START
# version: 1
# exporter: jmc2obj
# world_name: world
# world_path: C:\Users\pipor\Desktop\SSMP PLF\world
# export_bounds_min: (859, 30, -2793)
# export_bounds_max: (1330, 319, -2408)
# export_offset: (-1095.000000, -30.000000, 2600.000000)
# block_scale: 1.000000
# block_origin_offset: (-0.5, -0.5, -0.5)
# z_up: false
# texture_type: INDIVIDUAL_TILES
# has_split_blocks: true
# COMMON_MC_OBJ_END
jmc2OBJ: jMc2Obj-127.jar
I'm unable to recreate this issue on my end. Is there anything I'm missing in my attempt to reproduce?:
- Export from jmc2OBJ with default settings (which seems to be one of the combinations you mentioned)
- Import the OBJ through MCprep's
OBJ World Input - Swap texture pack with a labPBR-enabled resoure pack (specifcally this one, for Minecraft 1.21.5)
- Prep materials afterwards with the SEUS option (this can also be done in the file dialog in the swap operator)
While some materials are missing the extra maps, others aren't, which I assume is just based on what the resource pack supports.
The error message you're getting is a bit weird, given the CommonMCOBJ header for your OBJ file has texture_type defined as INDIVIDUAL_TILES, which shouldn't trigger the scaled UVs message (maybe you're importing through the regular Blender OBJ importer and not though MCprep?)
Followed the instructions and the same happens. Here are all the details:
# COMMON_MC_OBJ_START
# version: 1
# exporter: jmc2obj
# world_name: world
# world_path: C:\Users\pipor\Desktop\SSMP PLF\world
# export_bounds_min: (859, 30, -2793)
# export_bounds_max: (1330, 319, -2408)
# export_offset: (-1095.000000, -30.000000, 2600.000000)
# block_scale: 1.000000
# block_origin_offset: (-0.5, -0.5, -0.5)
# z_up: false
# texture_type: INDIVIDUAL_TILES
# has_split_blocks: true
# COMMON_MC_OBJ_END
What do the UVs for the OBJ look like?
I'm not too familiarized with the UV view, i'm guessing there are a lot of files, one for each texture.
I can provide the files if you want to check them out by yourself. Maybe that way we can pinpoint where the problem is coming from.
I've find that the texture that causes the problem (which stops the whole texture swap operation) is minecraft_block-pink_petals_stem. Replacing every texture besides this one makes it work I think.
Can you send the following files:
- OBJ with issue
- MTL file
texfolder created by jmc2OBJ (same folder as the OBJ)- Blend file (if possible), with all resources packed
Ideally put them in a zip file
Here is the ZIP file: https://drive.google.com/file/d/1komX4dR81o_hGEBBq-cnHv2U-Hn73vM2/view?usp=sharing
Ok, so it looks like the OBJ file you exported has something weird with the model where MCprep thinks the textures are scaled. I've attempted to create a new OBJ using the same exact export settings, and I'm unable to reproduce this. I suspect there's some combination of factors that makes MCprep think the UVs are scaled for a texture atlas.
I'll mark this as a bug for now
Alright, to reduce confusion, I've opened up #662 as a patch for the UV warning, which is incorrect based on the texture_type value in the CommonMCOBJ header your OBJ has.
Thanks for taking the time! As a side note, I want to bring back again the sort-of fix I found,
I've find that the texture that causes the problem (which stops the whole texture swap operation) is minecraft_block-pink_petals_stem. Replacing every texture besides this one makes it work I think.
Replacing every other material besides that one seem to work as a temporal workaround. I've been looking around and it seems that same texture is causing problems in other bug reports.
I believe the patch should resolve that anyway. Maybe that's what's causing MCprep to think the UVs are scaled?
Closing as fixed in #662, I'm hoping we can get a new release by the end of the year (though I've been uploading some builds on the MCprep server and my website, though note they are unofficial)