![]() |
VOOZH | about |
| Description |
Lightning bolt render |
|---|---|
| Media |
No information available. Please correct this! |
| Source |
Created by Skyrunner |
| Date | 2026/06/04 |
| Author |
Skyrunner |
| Permission (Reusing this file) |
Granted |
| Additional information | Created using a script with the same algorithm as Minecraft's LightningBoltRenderer.java and then rendered in Blender using an orthographic projection as specified in [[1]]. Lightningbolt has a procedural mesh and thus does not have a "canonical" appearance. |
Below is the script used to generate the OBJ file. The algorithm is derived from LightningBoldRenderer.java. It is then imported into blender using one of the templates from the isometric render help page, centered in the camera view, and rendered with color (0.45, 0.45, 0.5) using the Emission shader with strength 1 and alpha 0.3. Because the model is procedurally generated, this lightning bolt is necessary just one of the many variations that exist. Additionally, the shader used is not a precise match the Minecraft's game engine, but because it is transparent it seemed the most straightforward to approximate the result.
# Generate lightning bolt vertices
from dataclasses import dataclass
import random
@dataclass
class Vertex:
x: float
y: float
z: float
index: int
def quad(vertices: list[Vertex], faces: list[tuple], xo0, zo0, h, xo1, zo1, rr1, rr2, px1, pz1, px2, pz2):
i = len(vertices)
p1 = Vertex(
xo0 + (rr2 if px1 else -rr2),
h * 16,
zo0 + (rr2 if pz1 else -rr2),
i + 1,
)
p2 = Vertex(
xo1 + (rr1 if px1 else -rr1),
(h+1) * 16,
zo1 + (rr1 if pz1 else -rr1),
i + 2,
)
p3 = Vertex(
xo1 + (rr1 if px2 else -rr1),
(h+1) * 16,
zo1 + (rr1 if pz2 else -rr1),
i + 3,
)
p4 = Vertex(
xo0 + (rr2 if px2 else -rr2),
h * 16,
zo0 + (rr2 if pz2 else -rr2),
i + 4,
)
vertices.extend([p1, p2, p3, p4])
faces.append((p1.index, p2.index, p3.index, p4.index))
def make_lightning():
x_offsets: list[float] = [0] * 8
z_offsets: list[float] = [0] * 8
x_offset = 0
z_offset = 0
for h in range(7, -1, -1):
x_offsets[h] = x_offset
z_offsets[h] = z_offset
x_offset += random.randint(0, 10) - 5
z_offset += random.randint(0, 10) - 5
final_x_offset = x_offset
final_z_offset = z_offset
vertices: list[Vertex] = []
faces: list[tuple[int, int, int, int]] = []
seed = random.randint(1000000, 1000000000)
for r in range(0, 4):
random.seed(seed)
for p in range(0, 3):
hs = 7
ht = 0
if p > 0:
hs = 7 - p
ht = hs - 2
xo0 = x_offsets[hs] - final_x_offset
zo0 = z_offsets[hs] - final_z_offset
for h in range(hs, ht - 1, -1):
xo1 = xo0
zo1 = zo0
if p == 0:
xo0 += random.randint(0, 10) - 5
zo0 += random.randint(0, 10) - 5
else:
xo0 += random.randint(0, 30) - 15
zo0 += random.randint(0, 30) - 15
rr1 = 0.1 + r * 0.2
if p == 0:
rr1 *= h * 0.1 + 1
rr2 = 0.1 + r * 0.2
if p == 0:
rr2 *= (h - 1) * 0.1 + 1
quad(vertices, faces, xo0, zo0, h, xo1, zo1, rr1, rr2, False, False, True, False)
quad(vertices, faces, xo0, zo0, h, xo1, zo1, rr1, rr2, True, False, True, True);
quad(vertices, faces, xo0, zo0, h, xo1, zo1, rr1, rr2, True, True, False, True);
quad(vertices, faces, xo0, zo0, h, xo1, zo1, rr1, rr2, False, True, False, False);
return vertices, faces
vertices, faces = make_lightning()
with open("lightningbolt.obj", "w") as f:
for vertex in vertices:
f.write(f"v {vertex.x} {vertex.y} {vertex.z}\n")
for face in faces:
face_str = " ".join([str(x) for x in face])
f.write(f"f {face_str}\n")
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Thumbnail | Dimensions | User | Comment | |
|---|---|---|---|---|---|
| current | 11:05, 4 June 2026 | 👁 Thumbnail for version as of 11:05, 4 June 2026 | 1,001 × 1,261 (141 KB) | Skyrunner (talk | contribs) | Use backface culling and EEVEE renderer (instead of cycles) to make it look more like minecraft |
| 07:00, 4 June 2026 | 👁 Thumbnail for version as of 07:00, 4 June 2026 | 1,001 × 1,261 (429 KB) | Skyrunner (talk | contribs) | {{Information | description = Lightning bolt render | media = Blender | source = | date = 2026/06/04 | author = Skyrunner | permission = Granted | other versions = | additional information = Created using a script with the same algorithm as Minecraft's LightningBoltRenderer.java and then rendered in Blender using an orthographic projection as specified in https://minecraft.wiki/w/Help:Isometric_renders. Lightningbolt has a procedural mesh and thus does not have a... |
You cannot overwrite this file.
The following page uses this file (also see what links to it):
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
| Horizontal resolution | 28.35 dpc |
|---|---|
| Vertical resolution | 28.35 dpc |