Browse Source

some roads

shuvit 1 year ago
parent
commit
dd6d59b18d
7 changed files with 48 additions and 31 deletions
  1. 2
    2
      assets/roads.blend
  2. 2
    2
      characters/annie.blend
  3. 4
    4
      config.ini
  4. 16
    16
      scripts/birds.py
  5. 22
    5
      scripts/scene_init.py
  6. 2
    2
      shuvit.blend
  7. 0
    0
      shuvit.blend~2

+ 2
- 2
assets/roads.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:cc11997306b9a0be9e7cb38a9a92c8140eb02c949deafd71669da9444113d6a2
3
-size 82822100
2
+oid sha256:b51eb8f13519309046c08810b1f0549b8ed0d916187279e316c0de65169963e7
3
+size 83645076

+ 2
- 2
characters/annie.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:946def328b4993b48b80a5a35306bdac0c3b9a8d321a10b60c8624bb4c57275b
3
-size 4212932
2
+oid sha256:3376c5f3b5cda4af8436670dd6925ece4a51569e326b2067540da8cce7fc1af2
3
+size 4256380

+ 4
- 4
config.ini View File

@@ -91,17 +91,17 @@ wheel4_b = 0.21
91 91
 ###################
92 92
 
93 93
 #brightness / contrast
94
-bc = 1
94
+bc = 0
95 95
 BC_BRIGHTNESS = 1.03
96 96
 BC_CONTRAST = 1.06
97 97
 
98 98
 #HDR
99
-hdr = 1
99
+hdr = 0
100 100
 avgL = 0.75
101 101
 HDRamount = 0.3
102 102
 
103 103
 #Ambient Occlusion
104
-ao = 1
104
+ao = 0
105 105
 onlyAO = 0
106 106
 aowidth = 0.2
107 107
 aoradius = 2.4
@@ -113,7 +113,7 @@ dof_on = 0
113 113
 bloom_on = 0
114 114
 
115 115
 #FXAA
116
-fxaa = 1
116
+fxaa = 0
117 117
 FXAA_SPAN_MAX = 8.0
118 118
 #-------------------
119 119
 

+ 16
- 16
scripts/birds.py View File

@@ -26,22 +26,22 @@ def main(cont, scene):
26 26
                 own['bird_list'].append(x)
27 27
                 
28 28
     def do_birds(scene, own, cont):
29
-        
30
-        if own['life'] % 50 == 0:
31
-            num = random.randint(0,2)
32
-            if num == 1:
33
-                #print('add bird')
34
-                top = len(own['bird_list']) - 1
35
-                start = random.randint(0, top)
36
-                end = start
37
-                while end == start:
38
-                    end = random.randint(0, top)
39
-                obj = scene.addObject('bird_cont', own['bird_list'][start], 0)                
40
-                obj['start'] = own['bird_list'][start]
41
-                obj['end'] = own['bird_list'][end]
42
-                obj.worldPosition = obj['start'].worldPosition
43
-                #print(obj['start'], obj['end'])
44
-            
29
+        if own['bird_list'] != []:
30
+            if own['life'] % 50 == 0:
31
+                num = random.randint(0,2)
32
+                if num == 1:
33
+                    #print('add bird')
34
+                    top = len(own['bird_list']) - 1
35
+                    start = random.randint(0, top)
36
+                    end = start
37
+                    while end == start:
38
+                        end = random.randint(0, top)
39
+                    obj = scene.addObject('bird_cont', own['bird_list'][start], 0)                
40
+                    obj['start'] = own['bird_list'][start]
41
+                    obj['end'] = own['bird_list'][end]
42
+                    obj.worldPosition = obj['start'].worldPosition
43
+                    #print(obj['start'], obj['end'])
44
+                
45 45
     def life(own):
46 46
         if 'life' in own:
47 47
             own['life'] += 1     

+ 22
- 5
scripts/scene_init.py View File

@@ -77,11 +77,12 @@ def main():
77 77
         else:
78 78
             cont.activate(cam.actuators["bloom_off"])
79 79
             
80
-    #    print(dict['shadow_on'], 'shadow_on')    
81
-    #    if dict['shadow_on'] == 1:
82
-    #        bge.render.setGLSLMaterialSetting("shadows", 1) 
83
-    #    else:
84
-    #        bge.render.setGLSLMaterialSetting("shadows", 0)  
80
+        #print(dict['shadow_on'], 'shadow_on')
81
+           
82
+        #if dict['shadow_on'] == 1:
83
+           #bge.render.setGLSLMaterialSetting("shadows", 1) 
84
+        #else:
85
+           #bge.render.setGLSLMaterialSetting("shadows", 0)  
85 86
 
86 87
         if dict['music_player'] == 1:
87 88
             dict['music_start'] =  True   
@@ -155,4 +156,20 @@ def main():
155 156
         
156 157
         print('scene init ran')
157 158
         dict['scene_inited'] = True
159
+
160
+
161
+        material_list = []
162
+        for obj in scene.objects:
163
+            for mesh in obj.meshes:
164
+                for material in mesh.materials:
165
+                    material_list.append(material.name)
166
+        for obj in scene.objectsInactive:
167
+            for mesh in obj.meshes:
168
+                for material in mesh.materials:
169
+                    material_list.append(material.name)
170
+
171
+
172
+
173
+        material_list = set(material_list)
174
+        print('number of materials:', len(material_list))
158 175
       

+ 2
- 2
shuvit.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:ddb30969c1abc34cdc454af5523e5a0a8cbd2d7c613ac143844b072ce482925a
3
-size 135574672
2
+oid sha256:36b5868936935dc6e4cf8f2d4e321ff29c83909338c0a9f6a90c4e72d112b0d3
3
+size 112662748

shuvit.blend~1 → shuvit.blend~2 View File


Loading…
Cancel
Save