gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gfx demo/texturelab.py libtexture/TubeFrame...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz/gfx demo/texturelab.py libtexture/TubeFrame...
Date: Thu, 05 Sep 2002 07:54:50 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/09/05 07:54:50

Modified files:
        gfx/demo       : texturelab.py 
        gfx/libtexture : TubeFrame.texture 

Log message:
        Now the frame is looking pretty good

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/texturelab.py.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libtexture/TubeFrame.texture.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: gzz/gfx/demo/texturelab.py
diff -c gzz/gfx/demo/texturelab.py:1.10 gzz/gfx/demo/texturelab.py:1.11
*** gzz/gfx/demo/texturelab.py:1.10     Thu Sep  5 07:19:32 2002
--- gzz/gfx/demo/texturelab.py  Thu Sep  5 07:54:50 2002
***************
*** 11,22 ****
  lpars = [
      "spec_low", "0.95",
      "spec_high", "1.0",
!     "shadowlen", "0.1",
      "lx", "-0.5",
      "ly", "0.4",
      "npredger", "0.1",
  ]
  
  scal = 1024
  t = {
   "tfamb": ( scal, scal, 0, 2, "LUMINANCE_ALPHA", "LUMINANCE_ALPHA",
--- 11,28 ----
  lpars = [
      "spec_low", "0.95",
      "spec_high", "1.0",
!     "shadowlen", "0.9",
      "lx", "-0.5",
      "ly", "0.4",
      "npredger", "0.1",
+     "noisefreqangle", "10",
+     "noisefreqr", "20",
+     "noisescale", ".5",
+     "xnoisescale", ".7",
  ]
  
+ AbstractUpdateManager.defaultAnimationTime = 10000
+ 
  scal = 1024
  t = {
   "tfamb": ( scal, scal, 0, 2, "LUMINANCE_ALPHA", "LUMINANCE_ALPHA",
***************
*** 39,44 ****
--- 45,51 ----
      return getDList("""
                BindTexture TEXTURE_2D %(tex)s
                  TexParameter TEXTURE_2D TEXTURE_MAG_FILTER LINEAR
+                 TexParameter TEXTURE_2D TEXTURE_MIN_FILTER 
LINEAR_MIPMAP_LINEAR
                Enable TEXTURE_2D
                Begin QUAD_STRIP
                    TexCoord 1.1 1.1 0
Index: gzz/gfx/libtexture/TubeFrame.texture
diff -c gzz/gfx/libtexture/TubeFrame.texture:1.3 
gzz/gfx/libtexture/TubeFrame.texture:1.4
*** gzz/gfx/libtexture/TubeFrame.texture:1.3    Thu Sep  5 07:19:32 2002
--- gzz/gfx/libtexture/TubeFrame.texture        Thu Sep  5 07:54:50 2002
***************
*** 12,23 ****
--- 12,31 ----
    int power = (int)params->getFloat("power", 8);
    float shadow = params->getFloat("shadowlen", 0.5);
  
+ 
    FPARAM(spec_low, 0.85);
    FPARAM(spec_high, 0.9);
  
    FPARAM(lx, -.7);
    FPARAM(ly, .7);
  
+   FPARAM(noisescale, .1);
+   FPARAM(noisefreqangle, .1);
+   FPARAM(noisefreqr, .1);
+ 
+   FPARAM(xnoisescale, .1);
+   FPARAM(xnoisefreq, 200);
+ 
    int type = 0;
    float L[3] = { lx, ly, sqrt(1 - lx*lx - ly*ly) };
    float E[3] = { 0, 0, 1 };
***************
*** 47,55 ****
--- 55,72 ----
        float x8 = ((x * x) * (x * x)) * ((x * x) * (x * x));
        float y8 = ((y * y) * (y * y)) * ((y * y) * (y * y));
  
+ 
        float rad = sqrt(sqrt(sqrt(x8 + y8)));
        float r = (rad - irad) / (orad - irad);
  
+       float angle = atan2(x, y);
+ 
+       float par[2] = { noisefreqangle * angle, noisefreqr * r };
+       float pnoise = Perlin::noise2(par);
+ 
+       par[0] = xnoisefreq * x; par[1] = xnoisefreq * y;
+       float xnoise = Perlin::noise2(par);
+ 
        float dot = 0;
        float alpha = r >= 0 && r <= 1;
  
***************
*** 124,129 ****
--- 141,148 ----
            alpha = alpha + (1 - alpha) * .7 * (1 - t * t * t * t);
          }
        } 
+ 
+       dot *= (1 + noisescale * pnoise + xnoisescale * xnoise);
        
        switch (components) {
        case 1:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]