Skip to content

Emissive Textures (Geckolib4)

Tslat edited this page Apr 22, 2024 · 3 revisions

GeckoLib provides built-in functionality for allowing your animatable objects to have fullbright textures or texture parts. You may also know this as emissive textures, or glow textures. This is similar to the functionality that vanilla Spider eyes have - where they glow in the dark.

To do this, GeckoLib implements a GeoRenderLayer called AutoGlowingGeoLayer.

Usage

To use the emissive rendering functionality that GeckoLib provides, you'll need to add an instance of AutoGlowingGeoLayer to your animatable renderer, in its constructor. This is similar to how you would normally add render layers to any other renderer.

Preparing the Texture

GeckoLib uses a special texture file to render the glowing parts of your texture. To make this texture file, make a duplicate of your base texture file (the one your model normally uses), then rename it so that it has _glowmask on the end, before the .png

E.G.

my_entity_texture.png

my_entity_texture_glowmask.png

Then, open up the _glowmask png file you just created, and delete any pixels you don't want to be glowing. This should leave you with an almost empty texture file, with only the glowing pixels remaining.

Table of Contents

Geckolib 3
Geckolib 4

Hosted By: Cloudsmith

Package repository hosting is graciously provided by Cloudsmith.

Cloudsmith is the only fully hosted, cloud-native, universal package management solution that enables your organization to create, store and share packages in any format, to any place, with total confidence.

Clone this wiki locally