본문으로 건너뛰기
Skillpedia
영상 편집7.2k · #13349

lightning-energy-skill-vfx

하는 일

이 스킬은 게임 스킬의 번개, 에너지 구체, 관련 충격 효과를 만드는 과정을 에이전트가 안내합니다. 화면을 가리지 않으면서 역동적이고 가느다란 전기 효과를 원하는 게임 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓게임 스킬에 가지를 치며 번쩍이는 번개가 필요할 때.
  • ✓에너지 구체나 폭풍이 캐릭터의 주먹 앞에 놓여야 할 때.
  • ✓같은 스킬 주변에 충격 프레임, 공기 파열, 잔상 연기가 필요한 경우.

스킬 링크

https://github.com/MengTo/Skills/blob/main/agent-skills/game-combat/lightning-energy-skill-vfx/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/MengTo/Skills/blob/main/agent-skills/game-combat/lightning-energy-skill-vfx/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“내 주먹 스킬에 에너지 구체를 추가해 주세요. 적중하면 가지 모양 번개가 번쩍이게 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 번개를 밝은 중심과 보라색 빛을 가진 가지 모양 띠로 만들고, 모든 번개 타이밍을 하나의 공유된 효과 시계에 맞춥니다. 그리고 합성 패스를 추가합니다. 화면이 계속 읽히도록 번쩍임 횟수를 제한합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Lightning Energy Skill VFX

Use this for the effect half of a skill: what the fist throws, what the air does, what the hit leaves. Reach for a sibling instead in these cases:

  • Readable, budgeted gameplay effects in general (telegraphs, status, cleanup rules): create-game-vfx. Its readability rules still apply here.
  • Scoring a skill out of 10, or polishing the caster's body and timing: game-dev-combat-skill-polish and game-dev-combat-animation.

Source: a 30-second skill-showcase brief for a dark-fantasy ability user. White-blue lightning, a semi-transparent thunderstorm orb ahead of the fist, black smoke afterimages like a shattered cloak, air bursts, orange sparks and impact frames. Only the effect language is kept here. The character, story and shot list are left out.

Verified stack: Three.js r170, WebGL2, GLSL ShaderMaterials, HalfFloat render targets, a 96³ baked noise texture, and a hand-written bloom and composite. No post-processing library. The demo's floor is Poly Haven's Dry Ground 01 by Rob Tuytel (CC0), its 1k colour, normal and AO/roughness maps in demo/assets/ground/, embedded by demo/build.mjs as data URIs so the page still opens from disk.

The mechanism

One effect clock, one composite, and a shadow that belongs to the orb.

  • One clock. Lightning re-rolls on it, a hit freezes it (a hold), and a time ramp slows it. A 0.1 s hold therefore stops sparks, smoke, rings and lightning together.
  • One composite. Every layer that bends the air writes a signed screen offset into one shared distortion buffer. The composite reads colour through that offset, adds bloom and tone maps once. Only then does it draw the impact frame on top, so a negative flash inverts the finished image rather than one layer.
  • The orb carries its own shadow. A black teardrop is drawn behind the orb, and ribbons and billows leave from the orb's back. Wherever the fist goes, the black follows it; nothing is emitted from a body you cannot see.
  • Lightning is a tree of strips in one point ring. A bolt is a trunk, its forks, their forks and twigs. All their points live in one ring buffer and the GPU buffers are sized by a point budget, so thousands of twigs fit. Points of bolts anchored to the orb are stored relative to it and the anchor is a uniform, so the buffers change only when the lightning re-rolls (30 Hz), not every frame the orb moves.
  • Lightning has a life, drawn in the shader. Every vertex carries when the leader reaches it, so a channel grows out from its origin (forks from their junctions) in 30–90 ms on the lightning's own clock, flares as the return stroke connects, holds its shape for a few ticks, and fades through an afterglow. The ground flashes when the leader arrives.

Reuse the working effect

Copy assets/storm-energy.mjs. You pass in your own THREE, and the module does not import a second copy. The demo runs this same module, inlined by demo/build.mjs because a page opened from disk cannot import modules.

import { createStormEnergy, ENERGY_LIGHTS_GLSL, GROUND_HEAT_GLSL } from './storm-energy.mjs';

const fx = createStormEnergy(THREE, { renderer, scene, camera });   // bakes the noise texture
fx.setSize(width * dpr, height * dpr, dpr);       // drawing-buffer pixels, again on resize
fx.warmup();                                      // compile every effect before the first hit

const orb = fx.createOrb({ radius: 0.4 });        // shadow: true by default (teardrop, ribbons, billows, motes)
orb.reach = [shoulder, elbow, head];              // Vector3s the arcs can leap back to
orb.strikeAt = groundSpot;                        // optional: aim its ground strikes; orb.strikes = false stops them

// Optional: let ground arcs follow your ground's cracks. Return [x,y,z,...] walking from (x, z).
fx.options.crackPath = (x, z, heading, length) => traceAlongCracks(x, z, heading, length);

// Ground and props: add ENERGY_LIGHTS_GLSL (+ GROUND_HEAT_GLSL, WET_GLSL), spread fx.lightUniforms
// (+ fx.heatUniforms) into their uniforms, and add energyLight(...) and
// uGlow * groundHeat(p.xz) * yourCrackMask to their colour. Use wetness(p.xz) for the ground's
// roughness: the bolts' reflections are masked by the same function.

function frame(realDt) {
  const dt = fx.update(realDt);                   // sim seconds: 0 during a hold, scaled by ramps
  // move the fist with dt, then:
자주 묻는 질문

효과가 너무 밝지 않나요?

이 스킬은 눈을 찌르지 않는 역동적인 효과를 목표로 하며, 화면이 번쩍이는 빈도를 제한합니다.

연기나 불꽃도 포함되나요?

네. 같은 스킬에서 나는 검은 연기 잔상과 주황색 불꽃도 다룹니다.

어떤 엔진을 쓰나요?

WebGL2와 직접 작성한 셰이더를 사용하는 Three.js입니다.

상세 정보

작성자의 원본 설명

Build the effects of a close-combat energy skill as one visual language in Three.js. Lightning that reads as lightning, dynamic but never in your face: trees of strips (trunk, forks of forks, hair-fine branchlets) with a fine white core in a violet-blue glow, each channel reaching out as a stepped leader, flaring as it connects, holding its shape and fading through an afterglow, one discharge at a time; a storm-cloud orb (a lit billow surface that churns in place, 10-15 plasma-globe arcs from a small white core to its inner wall, crawlers on the rim, a hairline fresnel); ground strikes that fl

repo: MengTo/Skills

인기도

GitHub 스타
7.2k
순위
#13349
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬