Logo: 3d Lighting

3d Lighting

Organisatioun
SummerEngine
3d-lighting

Light a 3D scene: sun, omni and spot lights, WorldEnvironment, sky, shadows and ambient.

Iwwersiicht

EditeurSummerEngine
Repositorysummer
Skill-Numm3d-lighting
Stären
91
Forks
8
Matgeliwwert Dateien
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    SummerEngine huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill 3d Lighting an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/SummerEngine/summer/tree/main/library/skills/3d-lighting
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SummerEngine/summer.git /tmp/summer
mkdir -p .claude/skills
cp -r /tmp/summer/library/skills/3d-lighting .claude/skills/3d-lighting
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert 3d Lighting an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet 3d Lighting automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass 3d Lighting net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

3D Lighting for Summer Engine

Outdoor and indoor lighting setups for 3D scenes.

Light Types

TypeUse case
DirectionalLight3DSun, moon, outdoor primary light
OmniLight3DPoint lights (lamps, torches)
SpotLight3DFlashlights, stage lights

Basic Outdoor Setup

1. Directional Light (Sun)

A light is one node plus a few properties: build it with one summer_run_script call. Every scene tool takes a required scenePath, the exact res:// scene to change (get it from summer_get_project_context); the snippets use res://main.tscn. One property change on an existing light is one summer_set_prop.

summer_run_script(scenePath="res://main.tscn", source="""
func run(ctx):
    var world = ctx.get_or_create("Node3D", "World")
    ctx.add_node("DirectionalLight3D", "Sun", world, {
        "rotation_degrees": Vector3(-45, 30, 0),
        "light_energy": 1.0,
        "shadow_enabled": true,
        "light_color": Color(1, 0.95, 0.9, 1),
    })
    ctx.save_scene()
""")

Warm sunlight: Color(1, 0.95, 0.9, 1). Cool moonlight: Color(0.8, 0.85, 1, 1).

2. WorldEnvironment (Sky + Ambient)

The Environment resource has:

  • background_mode — 2 for sky, 1 for color, 3 for canvas (Environment.BG_SKY = 2, BG_COLOR = 1, BG_CANVAS = 3; default is 0, BG_CLEAR_COLOR)
  • sky — Sky resource (ProceduralSkyMaterial or PhysicalSkyMaterial)
  • ambient_light_source — AMBIENT_SOURCE_SKY or AMBIENT_SOURCE_COLOR
  • ambient_light_color
  • tonemap_mode

A sky is a Sky resource in environment.sky, with a ProceduralSkyMaterial (or PhysicalSkyMaterial) in its sky_material. summer_set_resource_property only sets properties on a resource that already exists, so build the node, the Environment, the Sky and its material in one script:

summer_run_script(scenePath="res://main.tscn", source="""
func run(ctx):
    var env := Environment.new()
    env.background_mode = Environment.BG_SKY
    env.sky = Sky.new()
    env.sky.sky_material = ProceduralSkyMaterial.new()
    env.ambient_light_source = Environment.AMBIENT_SOURCE_SKY
    env.tonemap_mode = Environment.TONE_MAPPER_FILMIC
    ctx.add_node("WorldEnvironment", "WorldEnvironment", ctx.find("World"), {"environment": env})
    ctx.save_scene()
""")

Later, one value on that Environment is one summer_set_resource_property (resourceProperty="environment", subProperty="background_mode").

Simpler path: start from the 3d-basic template, which already has a sky, and copy its structure.

3. Fill Light (Optional)

A second, weaker directional or omni for shadow fill:

summer_run_script(scenePath="res://main.tscn", source="""
func run(ctx):
    ctx.add_node("DirectionalLight3D", "FillLight", ctx.find("World"), {
        "rotation_degrees": Vector3(-30, -120, 0),
        "light_energy": 0.3,
        "shadow_enabled": false,
        "light_color": Color(0.7, 0.8, 1, 1),
    })
    ctx.save_scene()
""")

Indoor / Point Lights

summer_run_script(scenePath="res://main.tscn", source="""
func run(ctx):
    ctx.add_node("OmniLight3D", "Lamp", ctx.find("World"), {
        "position": Vector3(2, 3, 2),
        "light_energy": 0.8,
        "light_color": Color(1, 0.9, 0.7, 1),
        "omni_range": 8.0,
    })
    ctx.save_scene()
""")

Many lamps (a street, a corridor) are a loop in the same script, not one call per lamp.

Property Reference

PropertyTypeExample
light_energyfloat1.0, 1.5
light_colorColor"Color(1, 0.95, 0.9, 1)"
shadow_enabledbooltrue
rotation_degreesVector3"Vector3(-45, 30, 0)"
positionVector3"Vector3(0, 10, 0)"
omni_rangefloat10 (OmniLight3D)
spot_rangefloat10 (SpotLight3D)
spot_anglefloat45 (degrees, SpotLight3D)

Color Format

Always use Color(r, g, b, a) with values 0.0–1.0:

  • Warm white: Color(1, 0.95, 0.9, 1)
  • Cool white: Color(0.9, 0.95, 1, 1)
  • Orange (torch): Color(1, 0.6, 0.2, 1)
  • Green (alien): Color(0.5, 1, 0.5, 1)

Baked lighting — what you can and cannot do from here

Real-time lighting (everything above) is fully scriptable. Baking mostly is too on this build — the split that matters is which process runs the bake, not whether a script can trigger it.

ApproachCallable from MCP / a script?
DirectionalLight3D / Omni / Spot with shadow_enabledYes
WorldEnvironment + Environment (sky, ambient, tonemap, glow, SSAO, SSR)Yes
SDFGI real-time GIYes — Environment.sdfgi_enabled = true, no bake step at all
VoxelGIYes — VoxelGI.bake() is bound to script (ClassDB.class_has_method("VoxelGI", "bake") is true)
LightmapGI bakeYes, from the live editor. Summer binds LightmapGI.bake(from_node, image_data_path) to script (upstream leaves it button-only). Call it from summer_run_script. The GPU lightmapper needs a real renderer (a RenderingDevice): a normal desktop editor has one; a cloud container needs xvfb + GL (running-in-the-cloud); a pure-headless process has none and the call returns BAKE_ERROR_NO_LIGHTMAPPER.
OccluderInstance3D occlusion bakeNo. bake_single_node is not script-callable. Editor-button only.

So when the user asks for baked lighting: add and configure the LightmapGI node, set the meshes' gi_mode, then run the bake yourself from summer_run_script — lgi.bake(lgi, "res://lightmaps/scene_lm.exr") — and check the returned bake-error enum (0 is OK; BAKE_ERROR_NO_LIGHTMAPPER means no renderer in this process, not a missing binding). Verify with a framing:"camera" screenshot, which renders the real environment. Only fall back to "press Bake Lightmaps in the editor" when no renderer is available. If they want GI with zero bake step, steer to SDFGI (Environment.sdfgi_enabled) or VoxelGI.

Note the related trap: Engine.has_singleton("EditorInterface") returns true even in a headless non-editor process, so it is not a valid capability probe. ClassDB.can_instantiate("EditorScript") returns false outside the editor and is the reliable check.

Fallback (no MCP — edit .tscn directly)

If Summer MCP isn't connected, append the lighting block to your scene file:

[node name="Sun" type="DirectionalLight3D" parent="World"]
transform = Transform3D(0.866, 0, -0.5, 0.354, 0.707, 0.612, 0.354, -0.707, 0.612, 0, 0, 0)
light_color = Color(1, 0.95, 0.9, 1)
light_energy = 1.0
shadow_enabled = true

[node name="WorldEnvironment" type="WorldEnvironment" parent="World"]

Then create Environment and Sky resources via the inspector or load from .tres.

Collaborative protocol

This skill mutates the scene (adds lights + WorldEnvironment + tunes Environment sub-properties). Always ask before applying: "May I add a DirectionalLight3D Sun with shadows + a WorldEnvironment with a procedural sky?".

From a shell

No Summer MCP tools in this session? Run each one as a command; when summer --version is missing or below 4.0, use npx -y summer-engine@latest in place of summer. Fields are flags in kebab-case (--scene-path res://main.tscn) or one --input '<json>', and summer ops describe <op> prints the exact input. The summer-cli skill has the rest.

In this skillCommand
summer_add_nodesummer engine add-node
summer_get_project_contextsummer engine get-project-context
summer_run_scriptsummer engine run-script
summer_save_scenesummer engine save-scene
summer_screenshotsummer engine screenshot
summer_set_propsummer engine set-prop
summer_set_resource_propertysummer engine set-resource-property

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill 3d Lighting?

Light a 3D scene: sun, omni and spot lights, WorldEnvironment, sky, shadows and ambient.

Firwat 3d Lighting op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. 3d Lighting besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech 3d Lighting an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/SummerEngine/summer/tree/main/library/skills/3d-lighting an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen 3d Lighting benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat 3d Lighting benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir 3d Lighting domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill 3d Lighting gratis?

Jo. SummerEngine huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇