Glb Texture Tools

by Lorenz Wieseke in Scripts and Addons


Do you struggle to optimize your 3D models for WebGL?

Preparing your model for real-time playback is a tedious and complicated process. Whether you want your scene in a game engine like Unity/Unreal or use it inside a WebGL Library, like Three.js or Babylon.js, the process is similar. The main difference is that for WebGL you even need to pay more attention to optimizing.

The main things to focus on are:

Draw Calls: The fewer draw call, the faster it runs! 

Merging meshes and materials is the solution here.

File Size: Get your texture size down! 

In most cases the texture size is what blows up your file, try to reduce it while keeping visual quality at a high level.

Precompute Lighting: Bake things ahead so you don't need to calculate them at runtime!

Baking lightmaps and ambient occlusion is a technique that's been used for decades now to pre-calculate global illumination. This way you can have nice shadows, nice lights, and nice diffuse reflections. In general, you get a more realistic and better-looking scene.


Demos

Check out the showroom, to see some examples where the add-on was used to create interactive online presentations.

The Govie Editor used to create the demos is available for free.



Reduce File Size

Some of you might know it from Unity, where you can dynamically change the size of your textures and see the result in your viewport. 

The GLB Texture Tools add-on introduces a similar workflow for Blender. Just choose your desired image size, select a format, and press scale image.

The scaling operation will always use the original file as input, so you never lose any information.



Precompute Lighting

The add-on allows you to generate UVs, bake light- or ambient occlusion maps and set up a node tree so all textures end up in your GLTF file. 

The general process is pretty easy as everything happens with one click.

But the lightmap and ao baking also have some additional features:

  • different groups of AO and lightmap objects (named by your last selected object)
  • AI denoising via Compositing nodes or options chosen in renderer (optix, open image denoise)
  • generate UVs or make your own (make sure to name the UV-set "Lightmap", use UV Tools for editing Multiple UVs at once)
  • control the influence of your World (aka Environment)



Why isn't my material looking the same as in Blender?

In Blender, you can use a ton of different nodes to create your material. There are procedural texture nodes like Musgrave, Noise, or Voronoi. You have mapping nodes like the color ramp or vector math and image manipulation nodes like hue/saturation, brightness/contrast, RGB Curve or MixRGB.

All these nodes are not included in the GLTF format and, therefore, don't get exported.


Solution:

The add-on will convert all your custom nodes to the ones the exporter likes. This means we just bake every input, change the images and clean the nodes because we now have all the information baked into the texture.


To create a PBR Bake Material, simply choose PBR in the bake setting, select your model and click Bake Textures.


This also works great with the Extreme PBR add-onCustomize your material with the Extreme PBR add-on, bake it and see it in your GLTF Viewer.

You can also go back and forth between the original material and the baked one, make changes to the original material and rebake it.



Do I always need to upload GLB/GLTF files to see the changes? 

NOuse the Preview button inside the Govie Tools Tab after you export your model, and a browser window will appear, showing your model in all its glamour.



Additional Documentation

In the tutorial page, you will find full documentation on how to use the add-ons included in this package.

There are also updated builds downloadable for free.


Need help, write me on:

https://blenderartists.org/t/glb-texture-tools-lightmapping-batch-image-scale-quick-export/1207509


Features

Govie Tools
  • live preview for GLB export
  • define the visibility of objects and object groups
  • animation overview for naming and organization
  • annotation overview for quick text editing
  • conversion of particle systems to animation
  • check and clean objects for mesh defects
  • simplified access to export settings
GLB Texture Tools
  • dynamic scaling of textures
  • conversion of any node setup into PBR materials
  • UV tools for multi-UV layer editing
  • auto-generation of AO- and Lightmaps
  • cleanup tools for mesh, material, and texture cleaning


Update 15.3.2021 :

Added new AI-based Lightmapper and automatic node generator for AO and Lightmaps
Manage multiple AO and Lightmaps at the same time and organize them into groups
Batch scale and convert images on all selected objects or in the hole scene
Toggle between baked maps and original material to see if everything looks fine
Find materials to selected texture

Update 05.08.2021:

upped to Blender 3.0
fixed paths for mac users in govie tools
clean empty materials
fix no active object bug
fixed denoise and blur


Update 23.02.2022:

added hdr support
fixed denoising producing a pink image (image not found)
clear junk images needed for denoise
added option to save images internally
fixed no mesh selected error

Update 25.08.2022:

new viewer for govie tools preview
support for material variants



Sales 200+
Customer Ratings 3
Average Rating
Dev Fund Contributor
Published over 2 years ago
Blender Version 2.8, 2.81, 2.82, 2.83, 2.9, 2.91, 2.92, 2.93, 3.0, 3.1, 3.2
License GPL
Have questions before purchasing?

Contact the Creator with your questions right now.

Login to Message