예제 #1
0
def loadOceanScene():
 # Add environments.
 globals_oa.ocean = vizfx.addChild(globals_oa.FILE_PATH_TO_FLOOR)
 globals_oa.ocean.setAnimationSpeed(0.5)
 if globals_oa.sfLevel == SHOCK_FACTOR_LEVELS['LOW']:
  globals_oa.terrainZone1 = vizfx.addChild(globals_oa.FILE_PATH_TO_ZONE1_LOW)
  globals_oa.terrainZone3 = vizfx.addChild(globals_oa.FILE_PATH_TO_ZONE3_HIGH)
  print "Zone 1 model loaded = " + str(globals_oa.FILE_PATH_TO_ZONE1_LOW)
  print "Zone 3 model loaded = " + str(globals_oa.FILE_PATH_TO_ZONE3_HIGH)
 elif globals_oa.sfLevel == SHOCK_FACTOR_LEVELS['HIGH']:
  globals_oa.terrainZone1 = vizfx.addChild(globals_oa.FILE_PATH_TO_ZONE1_HIGH)
  globals_oa.terrainZone3 = vizfx.addChild(globals_oa.FILE_PATH_TO_ZONE3_LOW)
  print "Zone 1 model loaded = " + str(globals_oa.FILE_PATH_TO_ZONE1_HIGH)
  print "Zone 3 model loaded = " + str(globals_oa.FILE_PATH_TO_ZONE3_LOW)
 globals_oa.terrainZone2 = vizfx.addChild(globals_oa.FILE_PATH_TO_ZONE2)

 globals_oa.currentZoneNumber = 1
 
 userheight = globals_oa.head.getPosition()[1]
 globals_oa.user.setPosition(ZONE1_POS[0], userheight, ZONE1_POS[2])
 
 #Init VFX
 worldvizcode.initialize()
 
 #Release the porgyyyyyyy
 schooling.initialize()

 #underwater collision
 transport_vhil.initializeOceanFloorCollision()
 transport_vhil.initializeOceanSurfaceCollision()
예제 #2
0
def loadDisabledOceanScene():
 # Add environments.
 global globeScene, city, skyDome2
 globals_oa.ocean = vizfx.addChild(globals_oa.FILE_PATH_TO_WATER)
 globals_oa.ocean.setAnimationSpeed(0.5)
 globals_oa.terrainZone2 = vizfx.addChild(globals_oa.FILE_PATH_TO_ZONE2)

 globals_oa.currentZoneNumber = 1
 
 #underwater collision
 transport_vhil.initializeOceanFloorCollision()
 transport_vhil.initializeOceanSurfaceCollision()
 
 globals_oa.ocean.disable(viz.RENDERING)
 globals_oa.terrainZone2.disable(viz.RENDERING)


#load globescene assets
 globeScene = vizfx.addChild(globals_oa.FILE_PATH_TO_GLOBE)
 globeScene.setScale([0.2,0.2,0.2])
 globeScene.setPosition([0,0,1])
 globeScene.disable(viz.RENDERING)

#load city scene assets
 city = vizfx.addChild(globals_oa.FILE_PATH_TO_CITY)
 city.setPosition([-8,0,11])
 skyDome2 = viz.add('sky_day.osgb')
 city.disable(viz.RENDERING)
 skyDome2.disable(viz.RENDERING)
예제 #3
0
#globals_oa.terrainZone1 = vizfx.addChild(ART_DIRECTORY + './art/environment/Zone1.osgb')
#globals_oa.terrainZone1 = vizfx.addChild(ART_DIRECTORY + './art/environment/Zone1_ObjectsSeparated_Try1.osgb')
#globals_oa.terrainZone1 = vizfx.addChild(ART_DIRECTORY + './art/environment/Zone01_1.osgb')
#
#terrainZone1.visible(viz.ON)
#globals_oa.terrainZone2.visible(viz.OFF)
#globals_oa.terrainZone3.visible(viz.OFF)
#terrain = terrainZone1

#experience1.initialize(globals_oa.terrainZone1)
#schooling.initialize()

#scavengerhunt.initialize(globals_oa.terrainZone1, 'data/speciesToFindZone1.txt')

#CODE FROM WORLDVIZ BELOW
worldvizcode.initialize()

#Fish schooling code below from Jackie: 11/20/2015
#schooling.initialize()

#algae blending for zone-3 models
#algae_blend.applyBlend(globals_oa.terrainZone3, globals_oa.FILE_PATH_TO_ZONE3_ALGAE_BLEND_ITEMS)

#underwater collision
transport_vhil.initializeOceanFloorCollision()
transport_vhil.initializeOceanSurfaceCollision()

#algae_blend.applyBlend(globals_oa.terrainZone3, globals_oa.FILE_PATH_TO_ZONE3_ALGAE_BLEND_ITEMS)
#algae_blend.applySpecificBlend(globals_oa.terrainZone3, globals_oa.ZONE3_OCEAN_FLOOR_NAME_TO_BLEND, globals_oa.FILE_PATH_TO_ZONE3_FLOOR_TEXTURE, globals_oa.FILE_PATH_TO_ALGAE_TEXTURE)
#algae_blend.applySpecificBlend(globals_oa.terrainZone3, globals_oa.ZONE3_ROCK_CHUNK_NAME_TO_BLEND, globals_oa.FILE_PATH_TO_ZONE3_ROCK_CHUNK_TEXTURE, globals_oa.FILE_PATH_TO_ALGAE_TEXTURE)