-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
wine_glass.ft
70 lines (53 loc) · 1.54 KB
/
wine_glass.ft
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
camera.origin = F3(0.0, 0.2, 2.5);
camera.fov = 70.0;
let bsdf = BSDF();
bsdf.iterations = 2000;
bsdf.depth = 6;
settings.background = F3(0.3, 0.3, 0.3);
settings.width = 800;
settings.height = 600;
settings.renderer = bsdf;
settings.max_distance = 4.0;
let light = PointLight();
light.position = F3(3.0, 2.0, 2.0);
light.intensity = 10.0;
let plane = AnalyticalPlane();
plane.offset.y = -0.6;
plane.material.rgb = F3(0.8, 0.8, 0.8);
plane.material.roughness = 0.2;
plane.material.metallic = 1.0;
let plane1 = AnalyticalPlane(F3(0.0, 0.0, 1.0));
plane1.offset.z = -8.0;
plane1.material = plane.material;
// Glass
let glass = Cone(0.6, 0.7, 0.6);
glass.rounding = 0.2;
glass.material.rgb = F3(1.0, 1.0, 1.0);
glass.material.roughness = 0.0;
glass.material.transmission = 1.0;
glass.material.ior = 1.50;
let interior = glass.copy();
interior.scale = 0.96;
// Fluid
let fluid = interior.copy();
fluid.scale -= 0.0002;
fluid.bbox = F3(0.6);
fluid.material.rgb = F3("722F37").to_linear();
fluid.material.transmission = 1.0;
fluid.material.roughness = 0.5;
fluid.material.ior = 1.3443705; // Red Wine
fluid.material.clearcoat_gloss = 1.0;
fluid.material.sheen = 1.0;
fluid.material.sheen_tint = 1.0;
fluid.max.y = 0.0;
glass -= interior;
// Top: Smooth Cut Off & Gold Rim
let box = Box();
box.material.rgb = F3("d4af37");
box.material.metallic = 1.0;
box.material.roughness = 0.2;
box.position.y = 1.5;
// Smoothly subtract the box from the glass
glass -= Smooth(box, 0.01);
// Create a groove with the gold material of the box
glass += Groove(box, 0.001, 0.07);