Author: JasonWard
Date: 2008-03-21 21:59:30 -0400 (Fri, 21 Mar 2008)
New Revision: 1195

Modified:
   trunk/pysoy/examples/TexBlocks.py
   trunk/pysoy/examples/blocks.py
   trunk/pysoy/examples/vid_canvas.py
Log:
I merged bumpblocks.py with blocks.py and now TexBlocks.py can run with 
bumpMapped textures and with non-bumpMapped textures


Modified: trunk/pysoy/examples/TexBlocks.py
===================================================================
--- trunk/pysoy/examples/TexBlocks.py   2008-03-21 23:54:04 UTC (rev 1194)
+++ trunk/pysoy/examples/TexBlocks.py   2008-03-22 01:59:30 UTC (rev 1195)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 import soy
-import bumpblocks
+import blocks
 from time import sleep
 
 sce = soy.scenes.Scene()
@@ -8,7 +8,7 @@
 cam.position = (0.0, 0.0, 3.0)
 lig = soy.bodies.Light(sce)
 lig.position = (-5.0,5.0,5.0)
-bks = bumpblocks.blocks(sce)
+bks = blocks.blocks(sce)
 fps = soy.textures.Print()
 
 scr = soy.Screen()

Modified: trunk/pysoy/examples/blocks.py
===================================================================
--- trunk/pysoy/examples/blocks.py      2008-03-21 23:54:04 UTC (rev 1194)
+++ trunk/pysoy/examples/blocks.py      2008-03-22 01:59:30 UTC (rev 1195)
@@ -1,6 +1,9 @@
 import soy
 from random import random
 
+mrbl = soy.transports.File('media/marble.soy')['gimp']
+dot3 = soy.transports.File('media/fieldstone-dot3.soy')['gimp']
+
 class BlockMesh(soy.models.Mesh) :
   def __init__(self, mycol) :
     black = soy.materials.Material()
@@ -64,8 +67,8 @@
       coord = (coord[2], coord[0], coord[1])
       normal = (normal[2], normal[0], normal[1]) 
     if not self.verts.has_key(coord) :
-      self.verts[coord] = soy.atoms.Vertex(self.mesh, position=coord, 
-                                           normal=normal)
+      self.verts[coord] = soy.atoms.Vertex(self.mesh, position=coord, 
texcoord=coord, 
+                                           normal=normal, tangent=(0,1,0))
     return self.verts[coord]
 
 def srand() :
@@ -73,6 +76,7 @@
 
 def blocks(sce):
   colors = {
+    'Marble'     : (soy.materials.Material(color=mrbl, normal=dot3), (0,0,0)),
     'Aventurine'     : (soy.materials.Aventurine(),    ( 0, 0, 0)),
     'Basalt'         : (soy.materials.Basalt(),        ( 4,-1,-4)),
     'Copper'         : (soy.materials.Copper(),        (-3,-2,-2)),

Modified: trunk/pysoy/examples/vid_canvas.py
===================================================================
--- trunk/pysoy/examples/vid_canvas.py  2008-03-21 23:54:04 UTC (rev 1194)
+++ trunk/pysoy/examples/vid_canvas.py  2008-03-22 01:59:30 UTC (rev 1195)
@@ -1,5 +1,4 @@
 #!/usr/bin/env python
-
 import soy
 from time import sleep
 

_______________________________________________
PySoy-SVN mailing list
PySoy-SVN@pysoy.org
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to