Select the texture, turn on Mipmaps > Generate in the Import dock and reimport, then set the Sprite2D's Texture > Filter to Linear Mipmap (TEXTURE_FILTER_LINEAR_WITH_MIPMAPS). In our Godot 4.7 test a thin-lined 1024 px magic circle drawn at 128 px was 14.6 brightness levels away on average from a clean 128 px version, and a 0.01 rad turn changed it almost twice as much as it changed the clean one. Mipmaps alone, or the filter alone, gave exactly the same numbers. With both it was 4.7 away, and the turn changed it less than the clean version.
The code
Put it on the Sprite2D that shows the circle. It sets the filter in code, warns in the Output panel when the texture was imported without mipmaps, and spins the sprite at spin_speed radians per second.
extends Sprite2D
## A big texture drawn small, like a magic circle that spins under a character, without the grain and sparkle.
## The texture must be imported with Mipmaps > Generate on.
@export var spin_speed := 0.6 # radians per second
func _ready() -> void:
texture_filter = CanvasItem.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS
if texture and not texture.get_image().has_mipmaps():
push_warning("%s has no mipmaps: turn on Mipmaps > Generate in the Import dock and reimport." % texture.resource_path)
func _process(delta: float) -> void:
rotation += spin_speed * delta
What we measured
A white magic circle with 6 rings, 48 spokes and 24 dots, 1024 x 1024 with lines 2 to 4 px wide, shown at scale 0.125 on a black screen. The reference was the same image shrunk to 128 px beforehand with a high-quality filter and drawn at full size. We averaged the brightness difference (0 to 255) over the circle against the reference at 0.30 rad, and between 0.30 and 0.31 rad. Two runs gave the same numbers.
- Reference: 3.5 change between the two angles.
- No mipmaps, Linear filter, the defaults: 14.6 from the reference, 6.6 change between the angles.
- Mipmaps imported, filter still Linear: 14.6 and 6.6, the same.
- Filter Linear Mipmap on a texture imported without mipmaps: 14.6 and 6.6, the same.
- Both, with the script: 4.7 from the reference, 3.0 change between the angles.
Why one setting is not enough
Mipmaps are smaller copies of the texture made at import time. The Linear filter never reads them, so importing them alone changes nothing on screen. The Linear Mipmap filter reads them, but only if they exist, so setting it on a texture imported without them changes nothing either. Without mipmaps, each screen pixel of the shrunk circle samples the full-size image at one spot, so a thin line is hit or missed depending on the angle, which is the sparkle you see while it spins.
Where it matters
- Any large texture drawn much smaller than its size: magic circles under a character, big logos, high-resolution icons in a small HUD slot.
- Moving or rotating sprites show it most, because the grain changes every frame.
- Runes or a name written around the circle: text around a circle with even gaps.
Ready-made magic circles: PD Sigil Forge Pro generates magic circles in 8 styles and exports large PNGs, SVG and spinning animations, with a Godot option. Import the PNGs with mipmaps when you draw them small.
Tested in Godot 4.7 with the Compatibility renderer.
Ready-made: PD Sigil Forge Pro generates magic circles in 8 styles and exports large PNGs, SVG and spinning animations.
More how-tos: Auras, rings, beams and weather
- Light shaft cards without the bright edge-on line
- Stretch a bolt sprite from the caster to the target
- Space lights, posts or coins evenly along a Path3D
- God rays without volumetric fog
- Dark horror fog that works in Compatibility
- Magic aura particles that circle a character
- Charge-up particles that fly in to the middle
- Particle ring standing up instead of flat
- 2D particles from a sprite's shape
- A glowing circle on the ground
- A loot beam that never goes flat
- Chain lightning between enemies
- A tower's attack range ring
- Enemy vision cone with a "!" when it spots you
- Rain that follows the camera
- Rain falling through the roof
- Snow particles not falling
- orbit_velocity not working in 3D: use tangential_accel
- Rain falls through the player
- Snow that stays on roofs
- Emit particles along a Path3D
- Ambient particles in many places from one emitter
- Keep a buff aura on until the last buff really runs out
- Spin a magic circle forever at the same speed
- Space flying swords, shields or orbs evenly around a character for any count
- Text around a circle with even gaps