Govie Tools
Official Documentation
The add-on actually includes two add-ons, so I made two different documentation pages:
GLB Texture Toos - Documentation
Converting Custom Node Tree
By default the GLB Exporter only accepts image textures as inputs for the pbr node. All custom nodes for image manipulation are being ignored as well as procedurally generated textures.
To still be able to use these features of blender for adjusting your material, these changes need to be baked into new images.
The Add-on creates a new material with only textures as inputs for the pbr shader, this way all your custom changes get included in the glb file.
Notes:
Procedural textures (like noise, wave, voronoi…) need a uv node to be baked correctly. By default if nothing plugged into “vector” the node uses “generated” uv’s that can’t be baked, just use the scale to adjust size of the texture
Extreme PBR add-on materials can be baked as well, just make your adjustments in the material settings and click “bake textures” to create the new bake material with all the changes baked to new textures. This material can now easily be exported in a glb file.
Bake AO Map
The add-on also try’s to automate the process of baking ao maps. Once checked in the settings it will generate an ao map for all materials of the currently selected objects. In the settings you can also set the sample rate to increase image quality, name the new ao image and choose if the image should be cleared before baking. After baking is done the add-on will create a new node setup that is needed for the glb exporter to include ao maps.
Show AO will create an emission setup (like node wranglers “viewer node”) that show’s the ao image. That way you can control if everything look alright.
Notes:
Currenty the uv is created by cloning the uv0 and renaming it to “AO”. After a fist initial bake you can also re-unwrap your selected models and bake again
For baking, the new ao node is used together with an emission setup. This speeds up the hole process and reduces noise.
There is no status bar at the moment, so I’d recommend starting at a lower sample rate to get a quick result and see if all works, then bump up the samples (5 should be ok for that)
Texture Panel
The texture panel lists all the textures in the active material, including the amount of users, the name of the texture, the size in pixel and the size in kb. To get all the textures in the scene, just click on any other scene object, like the camera or an empty, that has no material on it.
Scale a texture by clicking on it and pressing scale image. The image will be scaled to the output resolution. The org. image is saved so you don’t loose any detail and you can always go back to a higher resolution.
Select material will let you search for a specific texture in all materials. The add-on will print out all the materials with the selected textures and select an object that has that material assigned to it. This way you see the material in the node editor if you got it open.
Notes
-
Cleanup textures / materials
If a material has no reference in the scene any more it will show up with a 0 in front. To clear all that unreferenced materials you can click on “clean materials” (normaly you would need to save your scene and reload it)
Once the materials have been cleaned, you will see that the attached textures also show up with zeros in the texture panel. To clean them as well ,you can press “clean textures”
Textures not used in materials can be cleaned using the purge function of blender. In the outliner go to “orphan data” and click purge.
Blenderkit models will have textures packed in them if you append a new model. Click unpack to see all the information of these.