#
#  Common stuff is determined here
#
header {
	title: Cat's Cradle
	width: 1280
	height: 720	
	music: cradle.ogg
	bpm: 135.0
}

#
#  Visible objects are defined here
#
objects {
	cam: camera {
		pos.z: 5
	}
	env: enviroment {
		lighting: 1
		light[0].enable: 1
		light[0].position.z: -20
		light[0].position.y: 20
	}
	background: image toehry2.jpg earth.jpg clouds.jpg
	swirl: particles {
		textures: particle.png
		#gravity.z: 0.1
		#fadeAway: 1
		maxParticles: 30
		
		emitter {
			color.r: 0.5, 1.0
			color.g: 0.0, 0.5
			color.b: 0.0, 0.25
			color.a: 0.25
			size: 0.05 0.5
			rotation: 0, 360
			rotationSpeed: -2, 7.5
			lifeTime: -1
		}
	}
	sphere: 3ds sfaari.3ds {
	    shader: sphere.shader
	    shader: sphere2.shader
	}
	torque: 3ds torttu.3ds {
		shader: torque.shader
		generateTexCoords: default
	}
	torque2: 3ds torttu2.3ds {
		shader: torque2.shader
	}
	torqueParticles: particles {
		textures: particle2.png particle3.png particle4.png particle5.png particle6.png
		#gravity.x: 2.0
		fadeAway: 1
		maxParticles: 300
		
		emitter {
			#dir.y: -0.5, 0.5
			#dir.z: -0.5, 0.5
			dir.x: 1.0, 10.0
			color.r: 0.75, 1.0
			color.g: 0.5, 0.75
			color.b: 0.0
			color.a: 0.1, 0.7
			size: 0.05, 2.5
			lifeTime: 1, 10
			rotation: 0, 360
			rotationSpeed: -5, 5
		}
		#emitter[0].emittingSpeed: 100
	}
	city: 3ds buildings.3ds {
		shader: buildings.shader
		multiTextures: towers.jpg
		shaders[0].envTex: 1
	}
	city2: 3ds buildings2.3ds {
		shader: buildings.shader
		multiTextures: towers.jpg
		shaders[0].envTex: 1
	}
	snow: particles {
		textures: particle3.png particle4.png
		gravity.y: -0.5
		fadeAway: 1
		maxParticles: 1000
		emitter {
			dir.y: -0.5, 0.0
			size: 1.0, 2.5
			pos: 0, 50, 10
			radius: 0, 35
			lifeTime: 1, 20
			rotationSpeed: -0.5, 0.5
			color.a: 0.5, 1.0
		}
	}
	hulu: particles {
		textures: particle4.png
		maxParticles: 1000
		#drawingMode: 1
		
		emitter {
			size: 1.5, 2
			radius: 10, 150
			lifeTime: -1
			color.r: 0.5
			color.g: 0.25
			color.b: 0.05
		}
	}
	
	outputPlane: image *mainOutput {
	}
	overlayPlane: image screen1.png {
		blend: 2 # screen
	}
	finalPlane: image *mixerOutput noise.png {
		blend: 0 # none
		shader: intro.frag
		shader: final1.frag
		shader: final2.frag
		shader: final3.frag
		multiTexturing: 1
		shaders[0].NoiseTex: 1; # multitextures must be defined like this
		shaders[1].NoiseTex: 1;
		shaders[2].NoiseTex: 1;
		shaders[3].NoiseTex: 1;
	}
	textPlane: image mattcurrent.jpg toehry.jpg texts1.jpg texts2.jpg texts3.jpg texts4.jpg texts6.jpg texts7.jpg texts8.jpg texts9.jpg texts10.jpg texts12.jpg texts13.jpg texts14.jpg grid.png grid2.png
}

#
#  Renderlines
#
renderLines {
	main {
		output: *mainOutput
		exclude: outputPlane, overlayPlane, textPlane, finalPlane
		clear.a: 1.0
	}
	mixer {
		output: *mixerOutput
		objects: outputPlane, overlayPlane
		clear.a: 1.0
	}
	output {
		objects: finalPlane, textPlane
	}
}

#
#  Main script
#
script {
	@0.0 call init
	
	@0.0 call intro
	
	@16.0 call scene1
	@32.0 call scene2
	@48.0 call scene3
	
	@64.0 call scene4
	
	@84.0 call scene5

	@116.0 disable city
	@116.0 enable torque, torqueParticles, sphere
	
	@116.0 call scene2_remix
	
	@148.0 call ending
}

init {
	@0.0 enable cam, outputPlane, overlayPlane, finalPlane, textPlane
	@0.0 finalPlane.shaders[0].noisePos.0 = rand( 0.0 - 1.0 ) for 1000.0
	@0.0 finalPlane.shaders[0].noisePos.1 = rand( 0.0 - 1.0 ) for 1000.0
	@0.0 finalPlane.shaders[1].noisePos.0 = rand( 0.0 - 1.0 ) for 1000.0
	@0.0 finalPlane.shaders[1].noisePos.1 = rand( 0.0 - 1.0 ) for 1000.0
	@0.0 finalPlane.shaders[2].noisePos.0 = rand( 0.0 - 1.0 ) for 1000.0
	@0.0 finalPlane.shaders[2].noisePos.1 = rand( 0.0 - 1.0 ) for 1000.0
	@0.0 finalPlane.shaders[3].noisePos.0 = rand( 0.0 - 1.0 ) for 1000.0
	@0.0 finalPlane.shaders[3].noisePos.1 = rand( 0.0 - 1.0 ) for 1000.0
}

intro {
	@0.0 enable swirl, overlayPlane, textPlane
		
	@0.0 cam.pos.z = 0.3 to 0.01 in @16.0
	@0.0 overlayPlane.zoom = 10.0 to 2.0 in @16.0
	@0.0 overlayPlane.rotate = 0 to 720 in @16.0
	
	@0.0 outputPlane.col.a = 0.0 to 1.0 in @8.0
	@0.0 overlayPlane.col.a = 0.0 to 1.0 in @8.0
	
	@0.0 finalPlane.shaders[0].ripple = 2.0 to 1.5 in @8.0
	@8.0 finalPlane.shaders[0].ripple = 1.5 to 2.0 in @0.0.25
	@8.1 finalPlane.shaders[0].ripple = 2.0 to 2.25 in @1.3
	@10.0 finalPlane.shaders[0].ripple = 2.25 to 2.5 in @0.0.25
	@10.1 finalPlane.shaders[0].ripple = 2.5 to 2.75 in @1.3
	@12.0 finalPlane.shaders[0].ripple = 2.75 to 3.0 in @0.0.25
	@12.1 finalPlane.shaders[0].ripple = 3.0 to 3.25 in @1.3
	@14.0 finalPlane.shaders[0].ripple = 3.25 to 3.5 in @0.0.25
	@14.1 finalPlane.shaders[0].ripple = 3.5 to 3.75 in @1.3
	
	@0.0 finalPlane.shaders[0].distortPos = 0 to 30 in @16.0
	
	@6.0 finalPlane.shaders[0].distort = 0.01 to 0.0 in @0.0.25
	@6.0.25 finalPlane.shaders[0].distort = -0.008 to 0.0 in @0.0.25
	@6.1.66 finalPlane.shaders[0].distort = 0.007 to 0.0 in @0.0.25
	@6.1.91 finalPlane.shaders[0].distort = -0.006 to 0.0 in @0.0.25
	@6.3.32 finalPlane.shaders[0].distort = 0.005 to 0.0 in @0.0.25
	@6.3.57 finalPlane.shaders[0].distort = -0.004 to 0.0 in @0.0.25
	@6.5.00 finalPlane.shaders[0].distort = 0.003 to 0.0 in @0.0.25
	@6.5.25 finalPlane.shaders[0].distort = -0.002 to 0.0 in @0.0.25
	@6.6.66 finalPlane.shaders[0].distort = 0.001 to 0.0 in @0.0.25
	
	@14.0 outputPlane.col.a = 1.0 to 0.0 in @2.0
	@14.0 overlayPlane.col.a = 1.0 to 0.0 in @2.0
	@16.0 outputPlane.col.a = 1.0
	

	@0.0 disable textPlane
	@4.0 enable textPlane
	@4.0 textPlane.blend = 2
	@4.0 textPlane.frame = 0
	@4.0 textPlane.col.a = 0 to 1 in @1.0
	@4.0 textPlane.zoom = 0.1 to 0.0 in @4.0

	#@8.0 textPlane.blend = 3
	@8.0 textPlane.frame = 1
	@8.0 textPlane.col.a = 0 to 1 in @4.0
	@8.0 textPlane.zoom = 0.2 to 0.0 in @8.0
	@8.0 loop @2.0 4 times {
		@0.0 textPlane.zoom.x = 10 to 0 in @0.0.1
	}
	@14.0 textPlane.col.a = 1 to 0 in @2.0
}

scene1 {
	@0.0 main.clear.r = 1.0
	@0.0 enable env, torque, sphere, background
	@0.0 disable swirl, overlayPlane, textPlane

	@0.0 finalPlane.useShader = 1
	#@0.0 finalPlane.shaders[0].ripple = 0.5 to 0.0 in @16.0
	@0.0 loop @4.0 4 times {
		@0.0 finalPlane.shaders[1].whiteNoiseAmount = 1.0 to 0.0 in @1.0
	}
	@15.2 finalPlane.shaders[1].whiteNoiseAmount = 0.0 to 1.0 in @0.2
	@16.0 finalPlane.shaders[1].whiteNoiseAmount = 0.0
	
	@0.0 torque.mesh.cylinder2.rot.x = 0 to 180 in @16.0
	@4.0 torque.shaders[0].pulseAmount = 0.0 to 0.5 in @12.0
	@4.0 loop @2.0 6 times {
		@0.0 torque.shaders[0].pulsePos = 0.0 to 10.0 in @2.0
	}

	@0.0 cam.pos.z = 3 to 2 in @16.0
	@0.0 cam.pos.x = 0 to 10 in @16.0
	@0.0 cam.lookAt.x = 2 to 7 in @16.0
	@0.0 cam.lookAt.y = 0
	@0.0 cam.lookAt.z = 0
	
	@0.0 cam.pos.y = 0.0
	@2.0 cam.pos.y = 0.0 to 1.0 in @0.0.1
	@4.0 cam.pos.y = 1.0 to -0.5 in @0.0.1
	@6.0 cam.pos.y = -0.5 to 1.5 in @0.0.1
	@8.0 cam.pos.y = 1.5 to 0.0 in @0.0.1
	@10.0 cam.pos.y = 0.0 to -2.0 in @0.0.1
	@12.0 cam.pos.y = -2.0 to -0.5 in @0.0.1
	@14.0 cam.pos.y = -0.5 to 3.0 in @0.0.1
	
	@0.0 sphere.shaders[0].anim = 0 to 4 in @16.0
	@0.0 sphere.shaders[0].alpha = 0.25 to 1 in @16.0

	@0.0 background.zoom = 0.3 to 0.0 in @16.0
	@12.0 background.col.a = 1.0 to 0 in @4.0
}

scene2 {
	@0.0 disable background	
	@0.0 enable torqueParticles, hulu
	@0.0 cam.lookAt.x = 0
	@0.0 cam.pos.x = 0.1 to 5 in @16.0
	@0.0 cam.pos.y = 0
	@0.0 cam.pos.z = 0

    @0.0 torque.mesh.cylinder2.rot.x = 180 to 360 in @16.0
	
	@0.0 loop @8.0 2 times {
		@0.0 cam.fovy = 150
		@0.2 cam.fovy = 10 to 50 in @0.0.1
		@1.0 cam.fovy = 140
		@1.2 cam.fovy = 10 to 80 in @0.0.1
		@2.0 cam.fovy = 130
		@2.2 cam.fovy = 10 to 40 in @0.0.1
		@3.0 cam.fovy = 120
		@3.2 cam.fovy = 10 to 60 in @0.0.1
		@4.0 cam.fovy = 100
		@4.2 cam.fovy = 10 to 50 in @0.0.1
		@5.0 cam.fovy = 120
		@5.2 cam.fovy = 10 to 80 in @0.0.1
		@6.0 cam.fovy = 140
		@6.2 cam.fovy = 10 to 40 in @0.0.1
		@7.0 cam.fovy = 10
		@7.2 cam.fovy = 30
		@7.2.666 cam.fovy = 90
		@7.3.333 cam.fovy = 150
	}
	@0.0 loop @4.0 4 times {
		@0.0 cam.pos.y = 3.0
		@0.2 cam.pos.z = 0.5 to 0.0 in @0.2
		@1.2 cam.pos.y = 0.5 to 0.0 in @0.2
		@2.0 cam.pos.y = -3.0
		@2.2 cam.pos.z = -0.5 to 0.0 in @0.2
		@3.2 cam.pos.y = -0.5 to 0.0 in @0.2
	}
	@0.0 cam.up.x = -10 to 10 in @16.0
	@0.0 cam.up.z = 2 to 5 in @8.0
	@8.0 cam.up.z = 5 to -5 in @8.0
	@0.0 cam.up.y = 7 to -2 in @16.0
	
	@0.0 loop @4.0 4 times {
		@1.2 loop @0.0.25 8 times {
			@0.0 finalPlane.shaders[1].whiteNoiseAmount = 1.0 to 0.0 in @0.0.1
		}
		@3.3 loop @0.0.25 4 times {
			@0.0 finalPlane.shaders[1].whiteNoiseAmount = 1.0 to 0.0 in @0.0.1
		}
	}
	
	@0.0 loop @1.0 16 times {
		@0.0 torque.shaders[0].pulsePos = 0.0 to 10.0 in @0.2
		@0.2 torque.shaders[0].pulsePos = 0.0 to 10.0 in @0.2
	}
	@0.0 loop @4.0 4 times {
		@0.0 torque.shaders[0].pulseAmount = 0.0 to 1.0 in @0.2
		@1.2 torque.shaders[0].pulseAmount = 1.0 to 3.0 in @0.2
		@2.0 torque.shaders[0].pulseAmount = 3.0 to 0.0 in @0.2
		@2.2 torque.shaders[0].pulseAmount = 0.0 to 1.0 in @0.2
		@3.3 torque.shaders[0].pulseAmount = 1.0 to 3.0 in @0.1
	}

	@0.0 sphere.shaders[0].anim = 0 to 20 in @16.0
	@0.0 sphere.shaders[0].distortAmount = 0 to 1 in @16.0
	
}

scene3 {
	@0.0 main.clear.r = 0.25 to 1 in @16.0
	@0.0 main.clear.g = 0
	@8.0 main.clear.g = 0 to 1 in @8.0
	@12.0 main.clear.b = 0 to 1 in @4.0
	@0.0 main.clear.a = 1.0
	
	@0.0 enable env, torque, sphere
	@0.0 disable swirl, overlayPlane, textPlane
	
	@0.0 sphere.useShader = 1
	
	@0.0 finalPlane.useShader = 2
	@0.0 loop @4.0 4 times {
		@0.0 finalPlane.shaders[2].whiteNoiseAmount = 1.0 to 0.0 in @1.0
	}
	@15.2 finalPlane.shaders[2].whiteNoiseAmount = 0.0 to 1.0 in @0.2
	@16.0 finalPlane.shaders[2].whiteNoiseAmount = 0.0
	@0.0 finalPlane.shaders[2].blur = 0.05 to 0.1 in @8.0
	@8.0 finalPlane.shaders[2].blur = 0.5 to 0.05 in @0.2
	@9.0 loop @1.0 5 times {
		@0.0 finalPlane.shaders[2].blur = 0.05 to 0.2 in @0.2
		@0.2 finalPlane.shaders[2].blur = 0.05
	}
	@14.0 finalPlane.shaders[2].blur = 0.05 to 0.5 in @2.0
	

	@0.0 cam.pos.z = 3 to 2 in @16.0
	@0.0 cam.pos.x = 4 to 0 in @16.0
	@0.0 cam.lookAt.x = 2 to 7 in @16.0
	@0.0 cam.lookAt.y = 0
	@0.0 cam.lookAt.z = 0
	@0.0 cam.fovy = 130 to 70 in @8.0
	@8.0 cam.fovy = 50 to 160 in @8.0
	
	@0.0 loop @8.0 2 times {
		@0.0 cam.pos.y = 2.0
		@0.2 cam.pos.y = 2.0 to 3.0 in @0.0.1
		@1.2 cam.pos.y = 3.0 to -0.5 in @0.0.1
		@2.2 cam.pos.y = -0.5 to 3.5 in @0.0.1
		@3.2 cam.pos.y = 3.5 to 0.0 in @0.0.1
		@4.2 cam.pos.y = 4.0 to -0.5 in @0.0.1
		@5.2 cam.pos.y = -0.5 to -2.0 in @0.0.1
		@6.2 cam.pos.y = -2.0 to 3.5 in @0.0.1
		@7.2 cam.pos.y = 3.5 to 0.0 in @0.0.1
		@7.2.66 cam.pos.y = 0.0 to -3.0 in @0.0.1
		@7.3.33 cam.pos.y = -3.0 to 0.0 in @0.0.1
		
		@0.2 cam.lookAt.y = 5
		@1.2 cam.lookAt.y = -5
		@2.2 cam.lookAt.y = 0
		@3.2 cam.lookAt.y = 5
		@4.2 cam.lookAt.y = -5
		@5.2 cam.lookAt.y = 5
		@6.2 cam.lookAt.y = -5
		@7.2 cam.lookAt.y = 0
	}
		
	@0.0 torque.mesh.cylinder2.rot.x = 0 to 360 in @16.0
	@0.0 loop @1.0 16 times {
		@0.0 torque.shaders[0].pulsePos = 0.0 to 10.0 in @0.2
		@0.2 torque.shaders[0].pulsePos = 0.0 to 10.0 in @0.2
	}
	@0.0 loop @4.0 4 times {
		@0.0 torque.shaders[0].pulseAmount = 0.0 to 2.0 in @0.2
		@1.2 torque.shaders[0].pulseAmount = 2.0 to 6.0 in @0.2
		@2.0 torque.shaders[0].pulseAmount = 6.0 to 0.0 in @0.2
		@2.2 torque.shaders[0].pulseAmount = 0.0 to 2.0 in @0.2
		@3.3 torque.shaders[0].pulseAmount = 2.0 to 6.0 in @0.1
	}

	@0.0 sphere.shaders[0].anim = 0 to 4 in @16.0
	@0.0 sphere.shaders[0].alpha = 0.25 to 1 in @16.0

	@0.0 enable textPlane
	@0.0 loop @2.0 8 times {
		@0.0 textPlane.col.a = 1 to 0 in @1.0
		@1.0 textPlane.col.a = 0 to 1 in @1.0
		@0.0 textPlane.zoom = 0.05 to 0 in @2.0
	}
	@0.0 textPlane.blend = 2
	@0.0 loop @8.0 2 times {
		@0.0 textPlane.frame = 2
		@1.2 textPlane.frame = 0 to 100 in @0.2
		@1.2 textPlane.offset.y = 0 to 10 in @0.2
		@1.2 textPlane.offset.x = 0 to 1 in @0.2
		@2.0 textPlane.frame = 3
		@3.3 textPlane.frame = 0 to 100 in @0.1
		@3.3 textPlane.offset.y = 0 to 10 in @0.1
		@3.3 textPlane.offset.x = rand( 0.0 - 1.0 ) for @0.1
		@4.0 textPlane.offset.x = 0
		@4.0 textPlane.frame = 4
		@5.2 textPlane.frame = 0 to 100 in @0.2
		@5.2 textPlane.offset.y = 0 to 10 in @0.2
		@5.2 textPlane.offset.x = 1 to 0 in @0.2
		@6.0 textPlane.frame = 1
		@7.2.0 textPlane.frame = 5
		@7.2.66 textPlane.frame = 1
		@7.3.33 textPlane.frame = 5
	}
}

scene4 {
	@0.0 enable background	
	@0.0 disable torqueParticles, hulu
	@0.0 main.clear.r = 1.0 to 0.0 in @8.0
	@0.0 main.clear.g = 1.0 to 0.0 in @4.0
	@0.0 main.clear.b = 1.0 to 0.0 in @2.0
	@0.0 finalPlane.shaders[2].blur = 0.5 to 0.05 in @8.0
	@8.0 finalPlane.shaders[2].blur = 0.05 to 0.0 in @12.0
	
	@0.0 torque.mesh.cylinder2.rot.x = 0 to 180 in @20.0
	@0.0 torque.shaders[0].pulseAmount = 6.0 to 0.0 in @20.0

	@0.0 cam.lookAt.x = 0.0
	@0.0 cam.lookAt.y = 0.0
	@0.0 cam.lookAt.z = 0.0
	@0.0 cam.fovy = 160 to 50 in @20.0
	@0.0 cam.pos.x = 4 to 10 in @20.0
	@0.0 cam.pos.y = 0 to -3.5 in @8.0
	@0.0 cam.pos.z = 5
	
	@0.0 background.frame = 1
	@0.0 background.col.a = 0 to 1 in @20.0
	@0.0 background.zoom = 0 to 0.3 in @20.0
	
	# texts
	@0.0 textPlane.frame = 6
	@0.0 textPlane.col.a = 1 to 0 in @4.0
	@0.0 textPlane.zoom = 0 to 0.05 in @4.0
	
	@4.1 textPlane.frame = 7
	@4.1 textPlane.col.a = 1 to 0 in @3.2
	@4.1 textPlane.zoom = 0 to 0.05 in @3.2

	@7.3 textPlane.frame = 8
	@7.3 textPlane.col.a = 1 to 0 in @4.0
	@7.3 textPlane.zoom = 0 to 0.05 in @4.0

	@12.0 textPlane.frame = 9
	@12.0 textPlane.col.a = 1 to 0 in @1.0
	@12.0 textPlane.zoom = 0 to 0.05 in @4.0

	@13.0 textPlane.frame = 10
	@13.0 textPlane.col.a = 1 to 0 in @0.3
	@13.3 textPlane.frame = 11
	@13.3 textPlane.col.a = 1 to 0 in @1.2
	@15.1 textPlane.frame = 12
	@15.1 textPlane.col.a = 1 to 0 in @1.1

	@16.3 textPlane.frame = 13
	@16.3 textPlane.col.a = 1 to 0 in @3.1
	@16.3 textPlane.zoom = 0 to 0.05 in @3.1
}

scene5 {
    @0.0 disable torque, torqueParticles, sphere
    @0.0 enable city, snow
 
	@0.0 main.clear.a = 0.0
    
    @0.0 finalPlane.useShader = 3
    @0.0 loop @1.0 16 times {
		@0.0 finalPlane.shaders[3].blur = 0.0 to 0.025 in @0.1
		@0.1 finalPlane.shaders[3].blur = 0.025 to 0.2 in @0.1
		@0.2 finalPlane.shaders[3].blur = 0.0
	}
    
    @0.0 city.shaders[0].lightPos.0 = 0
    @0.0 city.shaders[0].lightPos.1 = 30
    @0.0 city.shaders[0].lightPos.2 = -30
       
    @0.0 cam.lookAt.x = 0
    @0.0 cam.lookAt.y = 20 to 15 in @16.0
    @0.0 cam.lookAt.z = 10
    
    @0.0 cam.up.x = 0
    @0.0 cam.up.y = 1
    @0.0 cam.up.z = 0

    @16.0 cam.lookAt.y = 15 to 25 in @16.0
    
    @0.0 loop @8.0 3 times {
		@0.0 cam.pos.x = 0
		@0.2 cam.pos.x = 10
		@1.2 cam.pos.x = -20
		@2.2 cam.pos.x = 5
		@3.2 cam.pos.x = -7
		@4.2 cam.pos.x = 20
		@5.2 cam.pos.x = 5
		@6.2 cam.pos.x = 10
		@7.2 cam.pos.x = -5
	
		@0.0 cam.pos.z = -4 to -6 in @0.2
		@0.0 cam.pos.y = 13
		@0.2 cam.pos.z = -3 to -5 in @1.0
		@0.2 cam.pos.y = 8
		@1.2 cam.pos.z = -2 to -4 in @1.0
		@1.2 cam.pos.y = 10
		@2.2 cam.pos.z = -4 to -6 in @1.0
		@2.2 cam.pos.y = 14
		@3.2 cam.pos.z = -3 to -5 in @1.0
		@3.2 cam.pos.y = 9
		@4.2 cam.pos.z = -5 to -3 in @1.0
		@4.2 cam.pos.y = 20
		@5.2 cam.pos.z = -3 to -5 in @1.0
		@5.2 cam.pos.y = 11
		@6.2 cam.pos.z = -2 to -4 in @1.0
		@6.2 cam.pos.y = 7
		@7.2 cam.pos.z = -4 to -6 in @0.2
		@7.2 cam.pos.y = 10
		@7.2.66 cam.pos.y = 15
		@7.3.33 cam.pos.y = 20
    }
    @24.0 loop @8.0 1 times {
		@0.0 cam.pos.x = 0
		@0.2 cam.pos.x = 10
		@1.2 cam.pos.x = -20
		@2.2 cam.pos.x = 5
		@3.2 cam.pos.x = -7
		@4.2 cam.pos.x = 20
		@5.2 cam.pos.x = 0
		@6.2 cam.pos.x = 10
		
		@0.0 cam.pos.z = -2 to -4 in @0.2
		@0.0 cam.pos.y = 15
		@0.2 cam.pos.z = -3 to -5 in @1.0
		@0.2 cam.pos.y = 20
		@1.2 cam.pos.z = -2 to -4 in @1.0
		@1.2 cam.pos.y = 25
		@2.2 cam.pos.z = -4 to -6 in @1.0
		@2.2 cam.pos.y = 30
		@3.2 cam.pos.z = -3 to -5 in @1.0
		@3.2 cam.pos.y = 35
		@5.2 cam.pos.z = -3 to -5 in @1.0
		@5.2 cam.pos.y = 40
		@6.2 cam.pos.z = -2 to -4 in @1.0
		@6.2 cam.pos.y = 45
		@7.0 cam.pos.y = spline 45 45 45 90 in @1.0
    }
    
    @8.0 disable city
    @8.0 enable city2
    
    @16.0 enable torque2
    @16.0 loop @2.0 16 times {
		@0.2 torque2.shaders[0].pulsePos = 0 to 10 in @1.0
		@1.2 torque2.shaders[0].pulsePos = 10 to 0 in @1.0
	}
    @16.0 torque2.shaders[0].pulseAmount = 3.0
    @16.0 finalPlane.shaders[3].blur = 0.5 to 0.0 in @1.0
    @17.0 loop @1.0 14 times {
		@0.0 finalPlane.shaders[3].blur = 0.0 to 0.025 in @0.1
		@0.1 finalPlane.shaders[3].blur = 0.025 to 0.2 in @0.1
		@0.2 finalPlane.shaders[3].blur = 0.0
	}
	
	@0.0 background.frame = 2
	@0.0 background.blend = 2
	@0.0 loop @2.0 16 times {
		@0.0 background.zoom = 0 to 0.1 in @2.0
	}
	@0.0 background.offset.x = 0 to 1 in @32.0
	
	@0.0 textPlane.frame = 14
	@0.0 textPlane.blend = 1
	@0.0 textPlane.col.a = 0.75
	@0.0 textPlane.zoom = 0 to 0.2 in @16.0
	@16.0 textPlane.frame = 15
	@16.0 textPlane.zoom = 0.2 to 0 in @16.0
	@32.0 disable textPlane
	
	@16.0 enable hulu
}

scene2_remix {
	@0.0 call scene2
	@16.0 call scene2
	
	@0.0 loop @4.0 4 times {
		@0.0 enable city2
		@0.0 disable torque
		@1.0 disable city2
		@1.0 enable torque2
		@2.0 disable torque2
		@2.0 enable torque
		@3.0 disable torque
		@3.0 enable torque2
		@3.2 enable torque
	}
	@0.0 loop @4.0 4 times {
		@0.0 finalPlane.zoom = 0
		@1.2 finalPlane.zoom = rand 1 - 2
		@1.2.5 finalPlane.zoom = 0
		@1.3 finalPlane.zoom = rand 3 - 4
		@2.0 finalPlane.zoom = 0
		@3.2 finalPlane.zoom = rand 1 - 2
		@3.2.5 finalPlane.zoom = 0
		@3.2.75 finalPlane.zoom = rand 2 - 3
		@3.3.25 finalPlane.zoom = 0
		@3.3.75 finalPlane.zoom = rand 4 - 5
	}
	
	@16.0 finalPlane.zoom = 0
	@16.0 finalPlane.useShader = 2
	@16.0 loop @4.0 4 times {
		@0.0 finalPlane.shaders[2].whiteNoiseAmount = 1.0 to 0.0 in @1.0
	}
	@31.2 finalPlane.shaders[2].whiteNoiseAmount = 0.0 to 1.0 in @0.2
	@32.0 finalPlane.shaders[2].whiteNoiseAmount = 0.0
	@16.0 finalPlane.shaders[2].blur = 0.05 to 0.1 in @8.0
	@24.0 finalPlane.shaders[2].blur = 0.5 to 0.1 in @0.2
	@24.2 finalPlane.shaders[2].blur = 0.1 to 0.2 in @3.2
	@30.0 finalPlane.shaders[2].blur = 0.2 to 0.5 in @2.0
}

ending {
	@0.0 enable torque
	@2.0 torqueParticles.maxParticles = 0
	@2.0 disable hulu
	
	@0.0 cam.pos.z = -3 to -10 in @16.0

	@4.0 enable textPlane
	@4.0 textPlane.col.r = 0
	@4.0 textPlane.col.g = 0
	@4.0 textPlane.col.b = 0
	@4.0 textPlane.col.a = 0 to 1 in @4.0
	@4.0 textPlane.frame = 0
	@4.0 textPlane.blend = 1
	
	@10.0 end
}