Du bist nicht angemeldet.

Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!

Werbeanzeige

CBenni::O

1x Contest-Sieger

Beiträge: 1 145

Wohnort: Stuttgart

  • Private Nachricht senden

11

12.01.2013, 23:17

Achso übrigens, ich hab mal nach einer analytischen lösung gesucht. Ich bin leider ziemlich stark erkältet, und darunter leidet meine konzentration. Trotzdem meine lösung:
Im folgenden sei
§a\cdot b§ das skalarprodukt von a und b.

Wir wollen n-dot-l lighting haben. Also ist für einen punkt x mit normalenvektor die beleuchtungsstärke von einem leuchtenden punkt a gegeben durch §b(x)=n\cdot (a-x)§

Jetzt betrachten wir eine Leuchtstoffröhre:

(Link)


Die beleuchtungsstärke an der Stelle x ist gegeben durch
§\int_0^1sat(n\cdot l(t)) dt§ mit §l(t)=a+tv-x§ und §sat (x) = \begin{cases}0&x<0\\x&x\ge 0\end{cases}§
also
§\int_0^1sat(n\cdot(a+tv-x)) dt=\int_0^1sat(n\cdot a + n\cdot tv - n\cdot x)dt\qquad (1)§

Um dieses Integral aufzulösen, muss die frage geklärt werden, wann der ausdruck im sat größer als null ist:
§n\cdot a + n\cdot tv - n\cdot x>0§
§n\cdot tv >n\cdot x-n\cdot a§
§t \;n\cdot v >n\cdot x-n\cdot a§
wenn §n\cdot x>0§ (Fall 1):
§t >\frac{n\cdot x-n\cdot a}{n\cdot v}§
wenn §n\cdot x<0§ (Fall 2):
§t <\frac{n\cdot x-n\cdot a}{n\cdot v}§
wenn §n\cdot x=0§ (Fall 3):
§0 > n\cdot x-n\cdot a§

In den ersten fällen bekommt man genau ein §t_0§, sodass die bedingung ab (bzw bis) zu diesem t_0 erfüllt wird (dieses ist nicht notwendigerweise §\in[0,1]§)
Wenn der erste Fall eintritt, und §0\le t_0\le1§ das wird das Integral (1) zu:
§\int_{t_0}^1 n\cdot a + n\cdot tv - n\cdot x dt=(1-t_0)n\cdot a+[\frac{1}{2}t^2n\cdot v]^1_{t_0}-(1-t_0)n\cdot x=(1-t_0)(n\cdot (a-x))+\frac{1}{2}(1-t_0^2)n\cdot v=(1-t_0)(n\cdot (a-x)+\frac{1}{2}(1+t_0)n\cdot v)§
Wenn §t_0<0§, muss §t_0=0§ gesetzt werden. Wenn §t_0>1§, ist das integral null.

Analog für Fall 2, nur dass §t_0§ als obere grenze eingesetzt wird. Ergebis für (1): §\frac{1}{2}t_0n\cdot(2a+t_0v-2x)§
Das Integral wird null, wenn §t_0<0§ und wenn §t_0>1§ ist, muss es auf 1 gesetzt werden.

Im Fall 3 ist die bedingung entweder erfüllt oder nicht erfüllt. Wenn sie nicht erfüllt ist, ist das Integral null. Wenn sie erfüllt ist, berechne wie im Fall 1 mit §t_0=0§ oder Fall 2 mit §t_0=1§ (Also als ergebnis: §\frac{1}{2}n\cdot(2a+v-2x)§

Damit ist eine analytische lösung gegeben, die sich super effizient ausrechnen lässt:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
ndotv = dot(n, v)
if(ndotv=0)
{
    return 1/2*ndotv+ndota-ndotx
}
else
{
    ndotx = dot(n, x)
    ndota = dot(n, a)
    t0 = (ndotx - ndota) / (ndotv)
    if(ndotv>0)
    {
        if(t0 < 0) t0 = 0
        else if(t0 >= 1) return 0
        return (1-t0)*(ndota-ndotx+1/2*(1-t0)ndotv)
    }
    else
    {
        if(t0>1)t0=1
        else if(t0<=0)return 0
        return t0*(1/2*t0*ndotv+ndota-ndotx)
    }
}


mfg CBenni::O
Ein Mitglied der VEGeiCoUndGraSonMaWiGeS Bewegung.
42!
Aufräumen kann jeder, nur das Genie überblickt das Chaos!
Metal will never die!
1. Sppro Gamecontest - mein Beitrag

12

14.01.2013, 11:02

Interessant, sollte man eigentlich mal ausprobieren (auch wenn ich jetzt nicht alles nachgerechnet habe :D)
Du hast das nicht zufälligerweise mal getestet und Ergebnisbilder parat?
Lieber dumm fragen, als dumm bleiben!

Schrompf

Alter Hase

Beiträge: 1 470

Wohnort: Dresden

Beruf: Softwareentwickler

  • Private Nachricht senden

13

14.01.2013, 12:20

Ja, Bilder würden mich auch interessieren. Aber ich vermute, ohne eine ordentliche Schatten-Lösung wird der Unterschied kaum zu sehen sein. Daher bitte ich auch gleich mal vorausgreifend um ein Vergleichsbild mit einer banalen Punktlichtquelle an Stelle der Leuchtstoffröhre.
Häuptling von Dreamworlds. Baut aktuell an nichts konkretem, weil das Vollzeitangestelltenverhältnis ihn fest im Griff hat. Baut daneben nur noch sehr selten an der Open Asset Import Library mit.

CBenni::O

1x Contest-Sieger

Beiträge: 1 145

Wohnort: Stuttgart

  • Private Nachricht senden

14

14.01.2013, 19:39

Ich hab da gar nix ausprobiert ^.^ Ich kann nicht garantieren, dass das so stimmt, mich würden ergebnisse auch mal interessieren ^.^
Übrigens: Eine modifizierte version von meiner formel funktioniert für jeden beliebigen weg. So können neonröhren (gebogen etc) simuliert werden.
mfg CBenni::O
Ein Mitglied der VEGeiCoUndGraSonMaWiGeS Bewegung.
42!
Aufräumen kann jeder, nur das Genie überblickt das Chaos!
Metal will never die!
1. Sppro Gamecontest - mein Beitrag

CBenni::O

1x Contest-Sieger

Beiträge: 1 145

Wohnort: Stuttgart

  • Private Nachricht senden

15

16.01.2013, 11:36

Oha. Okay, mein beitrag war völlig falsch. >_< Ich habe die attenuation total vergessen (und die länge vom Vektor l). Mal sehen ob ich trotzdem eine Lösung finde.
Ein Mitglied der VEGeiCoUndGraSonMaWiGeS Bewegung.
42!
Aufräumen kann jeder, nur das Genie überblickt das Chaos!
Metal will never die!
1. Sppro Gamecontest - mein Beitrag

BlueCobold

Community-Fossil

Beiträge: 10 738

Beruf: Teamleiter Mobile Applikationen & Senior Software Engineer

  • Private Nachricht senden

16

16.01.2013, 12:14

Und ich dachte schon ich hätte einen am Kopf, wenn man ohne Integration jedes beliebige Shape in O ( 1 ) als Beleuchtung berechnen könnte. Ich denke da z.B. an jeden beliebigen Neon-Schriftzug. Gut, dass Du Dich selbst korrigiert hast. Für Strecken könnte das aber durchaus möglich sein.
Teamleiter von Rickety Racquet (ehemals das "Foren-Projekt") und von Marble Theory

Willkommen auf SPPRO, auch dir wird man zu Unity oder zur Unreal-Engine raten, ganz bestimmt.[/Sarkasmus]

CBenni::O

1x Contest-Sieger

Beiträge: 1 145

Wohnort: Stuttgart

  • Private Nachricht senden

17

16.01.2013, 12:25

Für beliebige funktioniert das nicht so einfach, aber selbst für eine Strecke wird das eklig. Die länge von l ist ein ewig langer term, der wird in die attenuation §\frac{1}{a_0+a_1\|l\|+a_2\|l\|^2}§ eingesetzt und dann Integriert. Mal sehen ob ich was hinbekomme, wenn ich nach hause komme (dank Mathematica ;) ). Immerhin, das t0 ändert sich nicht, solange die attenuation positiv ist.

mfg CBenni::O
Ein Mitglied der VEGeiCoUndGraSonMaWiGeS Bewegung.
42!
Aufräumen kann jeder, nur das Genie überblickt das Chaos!
Metal will never die!
1. Sppro Gamecontest - mein Beitrag

Schrompf

Alter Hase

Beiträge: 1 470

Wohnort: Dresden

Beruf: Softwareentwickler

  • Private Nachricht senden

18

16.01.2013, 12:34

Du kannst ja a1 erstmal auf 0 setzen und a0 als sehr klein annehmen, dann dürfte das Integral etwas einfacher werden. Für Lichtquellen entlang einer unendlichen Linie hat das schonmal jemand ausgeformelt, das Ergebnis sieht man z.B. hier: http://www.youtube.com/watch?v=YJ6bYjnswoQ (ab etwa 0:30)
Häuptling von Dreamworlds. Baut aktuell an nichts konkretem, weil das Vollzeitangestelltenverhältnis ihn fest im Griff hat. Baut daneben nur noch sehr selten an der Open Asset Import Library mit.

CBenni::O

1x Contest-Sieger

Beiträge: 1 145

Wohnort: Stuttgart

  • Private Nachricht senden

19

16.01.2013, 13:36

@Schrompf "als klein annehmen und weglassen" funktioniert nicht. Und bei unendlichen linien kann man das SEHR gut durch den nähesten Punkt approximieren (das geht auch bei linien gut, aber ist nicht ganz korrekt)

Eine Approximation wählt einfach den nähesten punkt der linie, (Siehe im Wiki) und nimmt den als punkt einer punktlichtquelle. Das Integral haue ich jetzt mal in Mathematica rein :P
EDIT: Man müsste über

Quellcode

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
(b1 n1)/(Sqrt[
    b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
     t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + x1^2 - 
     2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
     x3^2] (a0 + a2 b1^2 + a2 b2^2 + a2 b3^2 + 2 a2 b1 t v1 + 
      a2 t^2 v1^2 + 2 a2 b2 t v2 + a2 t^2 v2^2 + 2 a2 b3 t v3 + 
      a2 t^2 v3^2 - 2 a2 b1 x1 - 2 a2 t v1 x1 + a2 x1^2 - 
      2 a2 b2 x2 - 2 a2 t v2 x2 + a2 x2^2 - 2 a2 b3 x3 - 
      2 a2 t v3 x3 + a2 x3^2 + 
      a1 Sqrt[b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
        t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + 
        x1^2 - 2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
        x3^2])) + (b2 n2)/(Sqrt[
    b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
     t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + x1^2 - 
     2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
     x3^2] (a0 + a2 b1^2 + a2 b2^2 + a2 b3^2 + 2 a2 b1 t v1 + 
      a2 t^2 v1^2 + 2 a2 b2 t v2 + a2 t^2 v2^2 + 2 a2 b3 t v3 + 
      a2 t^2 v3^2 - 2 a2 b1 x1 - 2 a2 t v1 x1 + a2 x1^2 - 
      2 a2 b2 x2 - 2 a2 t v2 x2 + a2 x2^2 - 2 a2 b3 x3 - 
      2 a2 t v3 x3 + a2 x3^2 + 
      a1 Sqrt[b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
        t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + 
        x1^2 - 2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
        x3^2])) + (b3 n3)/(Sqrt[
    b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
     t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + x1^2 - 
     2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
     x3^2] (a0 + a2 b1^2 + a2 b2^2 + a2 b3^2 + 2 a2 b1 t v1 + 
      a2 t^2 v1^2 + 2 a2 b2 t v2 + a2 t^2 v2^2 + 2 a2 b3 t v3 + 
      a2 t^2 v3^2 - 2 a2 b1 x1 - 2 a2 t v1 x1 + a2 x1^2 - 
      2 a2 b2 x2 - 2 a2 t v2 x2 + a2 x2^2 - 2 a2 b3 x3 - 
      2 a2 t v3 x3 + a2 x3^2 + 
      a1 Sqrt[b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
        t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + 
        x1^2 - 2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
        x3^2])) + (n1 t v1)/(Sqrt[
    b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
     t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + x1^2 - 
     2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
     x3^2] (a0 + a2 b1^2 + a2 b2^2 + a2 b3^2 + 2 a2 b1 t v1 + 
      a2 t^2 v1^2 + 2 a2 b2 t v2 + a2 t^2 v2^2 + 2 a2 b3 t v3 + 
      a2 t^2 v3^2 - 2 a2 b1 x1 - 2 a2 t v1 x1 + a2 x1^2 - 
      2 a2 b2 x2 - 2 a2 t v2 x2 + a2 x2^2 - 2 a2 b3 x3 - 
      2 a2 t v3 x3 + a2 x3^2 + 
      a1 Sqrt[b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
        t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + 
        x1^2 - 2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
        x3^2])) + (n2 t v2)/(Sqrt[
    b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
     t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + x1^2 - 
     2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
     x3^2] (a0 + a2 b1^2 + a2 b2^2 + a2 b3^2 + 2 a2 b1 t v1 + 
      a2 t^2 v1^2 + 2 a2 b2 t v2 + a2 t^2 v2^2 + 2 a2 b3 t v3 + 
      a2 t^2 v3^2 - 2 a2 b1 x1 - 2 a2 t v1 x1 + a2 x1^2 - 
      2 a2 b2 x2 - 2 a2 t v2 x2 + a2 x2^2 - 2 a2 b3 x3 - 
      2 a2 t v3 x3 + a2 x3^2 + 
      a1 Sqrt[b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
        t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + 
        x1^2 - 2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
        x3^2])) + (n3 t v3)/(Sqrt[
    b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
     t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + x1^2 - 
     2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
     x3^2] (a0 + a2 b1^2 + a2 b2^2 + a2 b3^2 + 2 a2 b1 t v1 + 
      a2 t^2 v1^2 + 2 a2 b2 t v2 + a2 t^2 v2^2 + 2 a2 b3 t v3 + 
      a2 t^2 v3^2 - 2 a2 b1 x1 - 2 a2 t v1 x1 + a2 x1^2 - 
      2 a2 b2 x2 - 2 a2 t v2 x2 + a2 x2^2 - 2 a2 b3 x3 - 
      2 a2 t v3 x3 + a2 x3^2 + 
      a1 Sqrt[b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
        t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + 
        x1^2 - 2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
        x3^2])) - (n1 x1)/(Sqrt[
    b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
     t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + x1^2 - 
     2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
     x3^2] (a0 + a2 b1^2 + a2 b2^2 + a2 b3^2 + 2 a2 b1 t v1 + 
      a2 t^2 v1^2 + 2 a2 b2 t v2 + a2 t^2 v2^2 + 2 a2 b3 t v3 + 
      a2 t^2 v3^2 - 2 a2 b1 x1 - 2 a2 t v1 x1 + a2 x1^2 - 
      2 a2 b2 x2 - 2 a2 t v2 x2 + a2 x2^2 - 2 a2 b3 x3 - 
      2 a2 t v3 x3 + a2 x3^2 + 
      a1 Sqrt[b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
        t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + 
        x1^2 - 2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
        x3^2])) - (n2 x2)/(Sqrt[
    b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
     t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + x1^2 - 
     2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
     x3^2] (a0 + a2 b1^2 + a2 b2^2 + a2 b3^2 + 2 a2 b1 t v1 + 
      a2 t^2 v1^2 + 2 a2 b2 t v2 + a2 t^2 v2^2 + 2 a2 b3 t v3 + 
      a2 t^2 v3^2 - 2 a2 b1 x1 - 2 a2 t v1 x1 + a2 x1^2 - 
      2 a2 b2 x2 - 2 a2 t v2 x2 + a2 x2^2 - 2 a2 b3 x3 - 
      2 a2 t v3 x3 + a2 x3^2 + 
      a1 Sqrt[b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
        t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + 
        x1^2 - 2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
        x3^2])) - (n3 x3)/(Sqrt[
    b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
     t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + x1^2 - 
     2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
     x3^2] (a0 + a2 b1^2 + a2 b2^2 + a2 b3^2 + 2 a2 b1 t v1 + 
      a2 t^2 v1^2 + 2 a2 b2 t v2 + a2 t^2 v2^2 + 2 a2 b3 t v3 + 
      a2 t^2 v3^2 - 2 a2 b1 x1 - 2 a2 t v1 x1 + a2 x1^2 - 
      2 a2 b2 x2 - 2 a2 t v2 x2 + a2 x2^2 - 2 a2 b3 x3 - 
      2 a2 t v3 x3 + a2 x3^2 + 
      a1 Sqrt[b1^2 + b2^2 + b3^2 + 2 b1 t v1 + t^2 v1^2 + 2 b2 t v2 + 
        t^2 v2^2 + 2 b3 t v3 + t^2 v3^2 - 2 b1 x1 - 2 t v1 x1 + 
        x1^2 - 2 b2 x2 - 2 t v2 x2 + x2^2 - 2 b3 x3 - 2 t v3 x3 + 
        x3^2]))


Integrieren => Es gibt keine effiziente Methode, dieses Integral zu lösen (leider)
Ein Mitglied der VEGeiCoUndGraSonMaWiGeS Bewegung.
42!
Aufräumen kann jeder, nur das Genie überblickt das Chaos!
Metal will never die!
1. Sppro Gamecontest - mein Beitrag

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »CBenni::O« (16.01.2013, 14:08)


Schrompf

Alter Hase

Beiträge: 1 470

Wohnort: Dresden

Beruf: Softwareentwickler

  • Private Nachricht senden

20

16.01.2013, 13:40

Nein und Nein. Zu a) physikalisch betrachtet ist die Attenuation immer 1/r2 für unendlich kleine Punktlichtquellen. Demzufolge könntest Du die Attenuation-Formel vereinfachen wie beschrieben. Und evtl. wird es was bringen, evtl. auch nicht. Und zu b) die Approximation durch eine Punktlichtquelle an der nahesten Position auf der Linie funktioniert nur mit rein diffuser Beleuchtung, schon beim Specular-Anteil einer banalen Phong-Beleuchtung scheitert dieser Ansatz. Ganz zu schweigen von anderen Beleuchtungsmodellen und/oder Anisotropischen Oberflächen.
Häuptling von Dreamworlds. Baut aktuell an nichts konkretem, weil das Vollzeitangestelltenverhältnis ihn fest im Griff hat. Baut daneben nur noch sehr selten an der Open Asset Import Library mit.

Werbeanzeige