Author Topic: [Blender Plugin] Blockland Save Importer (for 2.8)  (Read 1468 times)

BLS Importer for Blender 2.8

This plugin was originally written by siba for older versions of Blender (original topic), I updated it to work on 2.8 and have released it on GitHub with some minor fixes. Contributions are welcome!

Get it here!





Instructions
  • Download the add-on from GitHub and install it in Edit > Preferences > Add-Ons
  • Set your Blockland directory in the add-on drop-down config
  • Copy the BLS_Bricks folder from the .zip into the root of your Blockland folder you specified in the config
  • Find your save file in the open dialog, and open
  • ???
  • Profit


Issues
  • cannot read byte 0xb0 (or whatever): Your save file is encoded with CR1252 (Windows-1252), the importer has problems reading brick files with special characters if the encoding isn't UTF-8. (ex. bricks with a degree symbol) Make a copy of your save with UTF-8 encoding and try again.
  • Importer takes too long: The importer has problems reading saves with a lot of bricks, please either try the Join Brick Meshes option or cut your builds down to small sizes or into separate files.
  • cannot find blb: You're most likely missing a brick file that is referenced in the save file (& your Blockland directory in the config). Unfortunately since Blockland saves store bricks with their UI name, it is a hassle to track down the appropriate brick and rename it accordingly (ESPECIALLY with non-default bricks, but they will work in the importer), so you're going to have to rename a bunch of bricks if you're willing to go that route. (to do: make a script that creates a set of brick files with their internal and UI names)
  • cannot find something like brickTOP.png: Make sure you have set up the config for your Blockland directory in the add-on drop-down. Otherwise the importer won't work!
  • Brick textures are stretched or look wrong: This is because I forgot to set up the texture nodes properly with a coordinates node. Will be added in a later update.
« Last Edit: September 06, 2019, 05:25:26 PM by Ahead »


Doesn't appear in the import-export list in preferences after I install it.

Wonder if you could get it to use the Principled BSDF material instead of the diffuse material. I've been using this older BLS2OBJ to import into blender since it can handle larger files better (still slow but better than my experience with this importer), but that importer can't import certain bricks properly (crests and arches have missing faces). My goal is to be able to cycles render blockland builds of pretty much any size as simply as possible.

Doesn't appear in the import-export list in preferences after I install it.
Post logs found in the scripting section, it imports fine when I get it from the GitHub repo
edit: you could also try removing the bls_bricks folder in the zip? maybe that will help

Wonder if you could get it to use the Principled BSDF material instead of the diffuse material. I've been using this older BLS2OBJ to import into blender since it can handle larger files better (still slow but better than my experience with this importer), but that importer can't import certain bricks properly (crests and arches have missing faces). My goal is to be able to cycles render blockland builds of pretty much any size as simply as possible.
Initially the plugin was using principled BSDF but I switched to using a mix shader with an image texture for the fac and two diffuse BSDF shaders (one for the color of the brick, the other for the texture) to include transparency but I may try going back
« Last Edit: August 30, 2019, 03:41:46 PM by Ahead »

Post logs found in the scripting section, it imports fine when I get it from the GitHub repo
edit: you could also try removing the bls_bricks folder in the zip? maybe that will help
That worked for installing it, but I get this error when I try to enable it.

That worked for installing it, but I get this error when I try to enable it.
Oops, I should've mentioned the code for older versions was replaced with newer code that only works on 2.8, I should work on making it cross-compatible

Wonder if you could get it to use the Principled BSDF material instead of the diffuse material. I've been using this older BLS2OBJ to import into blender since it can handle larger files better (still slow but better than my experience with this importer), but that importer can't import certain bricks properly (crests and arches have missing faces). My goal is to be able to cycles render blockland builds of pretty much any size as simply as possible.
update: I did some experimenting and I wanted an opinion, should the importer recreate these nodes for every brick material? (and with or without the bump?)

Oops, I should've mentioned the code for older versions was replaced with newer code that only works on 2.8, I should work on making it cross-compatible
Oh. I have 2.79.

Oh. I have 2.79.
In the meantime the original version found at the original topic still works on 2.79, but later I'll make a branch for that version
Or you can use 2.8, up to you

In the meantime the original version found at the original topic still works on 2.79, but later I'll make a branch for that version
Or you can use 2.8, up to you
What's the difference between 2.79 and 2.8? Will Port's DTS exporter still work with 2.8?

What's the difference between 2.79 and 2.8? Will Port's DTS exporter still work with 2.8?
2.8 has a lot of major API changes & other things, it's going to break a lot of add-ons (and I do mean a lot) and it's hard to cater for users running older versions

Also port's DTS plugin has a separate branch that works in 2.8, you can grab it here

update: I did some experimenting and I wanted an opinion, should the importer recreate these nodes for every brick material? (and with or without the bump?)
What does it look like without the bump map? I wonder how different it looks with mixing the brick texture onto the base color vs just using the normal. As for transparency, there's an alpha input that controls transparency.

What does it look like without the bump map? I wonder how different it looks with mixing the brick texture onto the base color vs just using the normal. As for transparency, there's an alpha input that controls transparency.
With bump


Without bump


Imo I think it should be an option in the import dialog whether you want a bump-map or not
« Last Edit: August 30, 2019, 04:56:00 PM by Ahead »

Most people are still using 2.79 because you can still use the DTS and updated BLB plugin, will there be a 2.79 compatible version of this so it can be used alongside those?

Also, if you know how, you can manually change the directory of the file paths in one of the python files to where your Blockland directory is, so you don't actually have to have Blockland installed in the Documents folder
« Last Edit: August 30, 2019, 05:46:42 PM by Masterlegodude »

Most people are still using 2.79 because you can still use the DTS and updated BLB plugin, will there be a 2.79 compatible version of this so it can be used alongside those?

Also, if you know how, you can manually change the directory of the file paths in one of the python files to where your Blockland directory is, so you don't actually have to have Blockland installed in the Documents folder

I do plan on bringing it over to 2.79 and I definitely do plan on making it so you can specify where your blockland directory is