GLB Texture Tools - Lightmapping, Batch Image Scale, Quick Export

Hi, your plugin works great, but I have some trouble with glass materials… they just are not visible in glFT viewer. Do you have some info how to set up a material to make it work?
Thanks!

To make transparent materials like glas you need to set the alpha value in your Base Color lower that 1 and change the Blend Mode to Alpha Blend .

To make the changes visible inside blender it is necessary to change the Alpha value to the same value you set in the Base Color. In the end, just set viewport shading to Look Dev or Rendered mode to see the transparent material in the Viewport.

It works! great thanks!

Additionaly if isnt a hassle for you… I have some problems with materials preview in gltf viewer…
Here is the difference in blender vs gltf viewer…
Do you think this problem is linked to UV maps or something else?
Thanks in advance!

Here is Blender view

Try exporting without draco compression, depending on the blender version the exporter is broke

Thanks for the tip… draco wasnt the problem in the end… I had vertex color export checked and that created the problems with textures…
Thanks again for support and great addon!

Hi Lorens,

regarding baking lightmaps in your plugin… whick bake type are you using here? diffuse + direct/indirect or some additional? thanks

Yes, diffuse direct and indirect

I added a new version with the following features :

  • new option to show textures per material
    image

  • connect lightmap to emission or mulitply with base color

Bake your lightmap and afterwards choose how to connect it to the principled shader. The default was to put it n the emission so I could use it with a second uv in three.js but now you can also use it to speed up render times or get a “real” preview how your model will look with lightmap.
image

  • fixed baking materials with metal image textures
2 Likes

This addon is too undervalued.
This is a great tool for optimizing and cleaning large numbers of texture images, especially in Archviz.

As far as I know, there is no tool with this function in Blender. Unlike 3Ds Max.
If you do new sales targeting and marketing, more people will buy it.

I’m sad that more people don’t know that such a great tool exists.

Thanks for the nice review !

The add-on was a lot of work and is still pretty buggy, especially the hole lightmap baking process.

Im thinking about giving it away for free to get more feedback and people can add issue tickets to the git repo themselves.

There’s going to be a detailed tutorial, but until then I wanted to write down some tricks so you don’t get frustrated

  • set ao distance to 1 or lower to produce less noise
  • if the baking produces a black image it could either be that you’re using optixs instead of cuda in the system settings or your baking on gpu and run outa memory on big scenes
  • if resized textures don’t show up in the export you need to unpack before scaling them
  • try reducing noise before baking lightmaps (choose an environment world with balanced brightness, disable caustics if you don’t need them, clamp fireflies, add lights, disable objects from rendering that are irrelevant)

So, I finally managed to write some documentation and clean up the post.

The Add-on is now free to use and if anyone has any problems with it, don’t hesitate to write me.

Also, I encourage you to try out our free govie editor :slight_smile:

Govie Editor Account

Why Govie Editor

  • free to use with a free account
  • build 3D applications without programming knowledge
  • expand your portfolio with additional services
  • no additional external partner necessary
  • less overhead, simpler communication
  • we develop features, you produce your application

Have fun playing around!

For anyone getting a black or purple image after baking the lightmap, try setting the device type to CPU instead of GPU. If your graphics card doesn’t have enough memory to render the image it will result in out of memory error

Hello,

I have a question regarding lightmaps generation.
When I choose PBR or AO - there is bake button. So it is clear how to bake.
But when i choose Lightmaps - there is no any related button anymore. I thought probably it generates lightmap during GLB export on the fly, but it is not.
And of course button “Preview Lightmap on material” doesn’t give any effect.

Can you please clarify, how to prepare lightmaps and use it after PBR Bake ?

Make sure you have the latest version first. There should be a bake button at the same position where you find it baking ao or pbr. Can you make Screenshot? Also did you select an object you want to bake?

Hello, thank you for fast response!
I’m using Addon-Batch-Install which downloads and installs (i guess) latest Govie addon.
And of course I select mesh(es) I want to bake. As I said it works with AO and PBR.
There is screen attached.

It seems the batch install is not up to date, I need to fix that. Till then just download the newest version from the tutorials-blender page listed above and install it the regular way.

Ok, i downloaded latest GLBtextureTools.zip.
But when i tried to install it using: blender -b -P .\Addon\install_addon.py – -addon_path .\Addon\GLBTextureTools.zip -addon_name GLBTextureTools

got several python errors during installation:
For example:
Exception in module register(): C:\Users\Andrey\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\GLBTextureTools_init_.py
Traceback (most recent call last):
File “d:\Blender 2.93\2.93\scripts\modules\addon_utils.py”, line 386, in enable
mod.register()
File “C:\Users\Andrey\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\GLBTextureTools_init_.py”, line 41, in register
bpy.app.handlers.load_post.append(gui_functions.init_values)
AttributeError: module ‘GLBTextureTools.Functions.gui_functions’ has no attribute ‘init_values’

After this i just replaced folder manually:
“c:\Users\Andrey\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\GLBTextureTools”

New version gave me additional drop-down menu “Baking Groups”.

But unfortunatelly still no Bake button when Lightmaps category is active…

P.S. I tried this on 2 different Windows 10 desktops.