diff --git a/proj.ios_mac/Programmers Guide.xcodeproj/project.pbxproj b/proj.ios_mac/Programmers Guide.xcodeproj/project.pbxproj index 0d82015..e102466 100644 --- a/proj.ios_mac/Programmers Guide.xcodeproj/project.pbxproj +++ b/proj.ios_mac/Programmers Guide.xcodeproj/project.pbxproj @@ -638,6 +638,8 @@ 7EC0CFCC19ECD4BE00C41BDA /* dot.png in Resources */ = {isa = PBXBuildFile; fileRef = 7EC0CFC819ECD2FD00C41BDA /* dot.png */; }; 7EC0CFCD19ECE10A00C41BDA /* dot.png in Resources */ = {isa = PBXBuildFile; fileRef = 7EC0CFC819ECD2FD00C41BDA /* dot.png */; }; 7EC0CFCE19ECE10B00C41BDA /* dot.png in Resources */ = {isa = PBXBuildFile; fileRef = 7EC0CFC819ECD2FD00C41BDA /* dot.png */; }; + B633D6751B02E31000E32ECA /* Chapter9_11.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B633D6731B02E31000E32ECA /* Chapter9_11.cpp */; }; + B633D6761B02E31000E32ECA /* Chapter9_11.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B633D6731B02E31000E32ECA /* Chapter9_11.cpp */; }; B686A5F11AF1D2850050773F /* chapter9 in Resources */ = {isa = PBXBuildFile; fileRef = B686A5F01AF1D2850050773F /* chapter9 */; }; B686A5F21AF1D2850050773F /* chapter9 in Resources */ = {isa = PBXBuildFile; fileRef = B686A5F01AF1D2850050773F /* chapter9 */; }; B6C9D0481AF0C37C002EC43F /* Chapter9_10.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6C9D0461AF0C37C002EC43F /* Chapter9_10.cpp */; }; @@ -989,6 +991,8 @@ 7EBF317E19E843F100A7FBEA /* Chapter3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Chapter3.cpp; sourceTree = ""; }; 7EBF317F19E843F100A7FBEA /* Chapter3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Chapter3.h; sourceTree = ""; }; 7EC0CFC819ECD2FD00C41BDA /* dot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dot.png; sourceTree = ""; }; + B633D6731B02E31000E32ECA /* Chapter9_11.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Chapter9_11.cpp; path = chapter9/Chapter9_11.cpp; sourceTree = ""; }; + B633D6741B02E31000E32ECA /* Chapter9_11.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Chapter9_11.h; path = chapter9/Chapter9_11.h; sourceTree = ""; }; B686A5F01AF1D2850050773F /* chapter9 */ = {isa = PBXFileReference; lastKnownFileType = folder; path = chapter9; sourceTree = ""; }; B6C9D0461AF0C37C002EC43F /* Chapter9_10.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Chapter9_10.cpp; path = chapter9/Chapter9_10.cpp; sourceTree = ""; }; B6C9D0471AF0C37C002EC43F /* Chapter9_10.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Chapter9_10.h; path = chapter9/Chapter9_10.h; sourceTree = ""; }; @@ -1669,6 +1673,8 @@ 7E53686A19EAD87E005C3C64 /* chapter9 */ = { isa = PBXGroup; children = ( + B633D6731B02E31000E32ECA /* Chapter9_11.cpp */, + B633D6741B02E31000E32ECA /* Chapter9_11.h */, B6C9D0461AF0C37C002EC43F /* Chapter9_10.cpp */, B6C9D0471AF0C37C002EC43F /* Chapter9_10.h */, 7E53686B19EAD894005C3C64 /* AppDelegate.cpp */, @@ -2776,6 +2782,7 @@ 7E53688719EAD894005C3C64 /* Chapter9_3.cpp in Sources */, 7E53688D19EAD894005C3C64 /* Chapter9_6.cpp in Sources */, 5E38D2C619F0F3DD0099B433 /* Chapter9_9.cpp in Sources */, + B633D6751B02E31000E32ECA /* Chapter9_11.cpp in Sources */, 50BA59CD19D4992C0070A133 /* AppController.mm in Sources */, 50BA59CE19D4992C0070A133 /* RootViewController.mm in Sources */, 50BA59CF19D4992C0070A133 /* main.m in Sources */, @@ -2790,6 +2797,7 @@ 7E53688819EAD894005C3C64 /* Chapter9_3.cpp in Sources */, 7E53688C19EAD894005C3C64 /* Chapter9_5.cpp in Sources */, 7E53688219EAD894005C3C64 /* AppDelegate.cpp in Sources */, + B633D6761B02E31000E32ECA /* Chapter9_11.cpp in Sources */, 7E53689019EAD894005C3C64 /* Chapter9_7.cpp in Sources */, 7E53688E19EAD894005C3C64 /* Chapter9_6.cpp in Sources */, B6C9D0491AF0C37C002EC43F /* Chapter9_10.cpp in Sources */, @@ -4231,6 +4239,7 @@ "$(SRCROOT)/../libs/cocos2d-x/cocos", "$(SRCROOT)/../libs/cocos2d-x/cocos/audio/include", "$(SRCROOT)/../libs/cocos2d-x/cocos/editor-support", + "$(SRCROOT)/../libs/cocos2d-x", ); MACOSX_DEPLOYMENT_TARGET = 10.7; ONLY_ACTIVE_ARCH = YES; @@ -4250,6 +4259,7 @@ "$(SRCROOT)/../libs/cocos2d-x/cocos", "$(SRCROOT)/../libs/cocos2d-x/cocos/audio/include", "$(SRCROOT)/../libs/cocos2d-x/cocos/editor-support", + "$(SRCROOT)/../libs/cocos2d-x", ); MACOSX_DEPLOYMENT_TARGET = 10.7; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; diff --git a/res/chapter9/Particle3D/materials/pu_example.material b/res/chapter9/Particle3D/materials/pu_example.material new file mode 100644 index 0000000..5367f07 --- /dev/null +++ b/res/chapter9/Particle3D/materials/pu_example.material @@ -0,0 +1,661 @@ +//----------------------------------------------------------------------------------------------------------------------- +// This script is part of the Particle Universe Media Pack product. +// +// Copyright (c) 2008 Henry van Merode +// +// Usage of this program is licensed under the terms of the Particle Universe Commercial License. +// You can find a copy of the Commercial License in the Particle Universe package. +//----------------------------------------------------------------------------------------------------------------------- + +material mp_fire_02 +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + + texture_unit + { + texture mp_fire_02_2x2.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Tornado +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + + texture_unit + { + texture pu_sand_336x330.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Stone +{ + technique + { + pass + { + lighting off + depth_write off + texture_unit + { + texture pu_stone.jpeg + scale 0.5 0.5 + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Circle +{ + technique + { + pass + { + depth_write off + scene_blend alpha_blend + texture_unit + { + texture pu_circle.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Rain_01 +{ + technique + { + pass + { + scene_blend add + depth_write off + texture_unit + { + texture pu_rain_01.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Barrel_01 +{ + technique + { + pass + { + depth_write off + depth_write off + texture_unit + { + texture pu_barrel_01.png + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Barrel_02 +{ + technique + { + pass + { + lighting off + depth_write off + texture_unit + { + texture pu_barrel_02.png + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Lightning +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pu_lightning_20x64.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material fxpression/ac3dmat1 +{ + technique + { + pass + { + ambient 1 0.05 0 + diffuse 1 0.05 0 + texture_unit + { + texture pu_plate.jpg + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Flame +{ + technique + { + pass + { + scene_blend add + depth_write off + texture_unit + { + texture pu_flame.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Fire +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + texture_unit + { + texture pu_flame.png + tex_address_mode clamp + wave_xform scroll_x sine 0 0.3 0 0.15 + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Smoke +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + + texture_unit + { + texture pu_smoke_brown_336x330.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Smoke_02 +{ + technique + { + pass + { + depth_write off + scene_blend add + + texture_unit + { + texture pu_smoke_brown_336x330.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/ExplosionFire +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + fog_override true + + texture_unit + { + texture pu_smoke_02_128x128.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Nucleus +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pu_nucleus.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Debris +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pu_fire_01_64x64.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Dirt +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + texture_unit + { + texture pu_dirt_256x512.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------- +material PUMediaPack/Smoke +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + texture_unit + { + texture pu_smoke_02_128x128.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/BurstFlare +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + texture_unit + { + texture pu_dot_03_64x64.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/GreenBall +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + texture_unit + { + texture pu_green_ball.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Crate +{ + technique + { + pass + { + texture_unit + { + texture crate6.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Star +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + fog_override true + + texture_unit + { + texture pu_flare_12_256x256.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Hart +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pu_hart.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Interpolate +{ + technique + { + pass + { + lighting on + depth_write off + scene_blend alpha_blend + + texture_unit + { + texture interpolate.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Fish +{ + technique + { + pass + { + texture_unit + { + texture steelhead.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Flare +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pu_flare.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/RibbonTrail +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pu_ribbontrail.png 1d + tex_address_mode clamp + filtering none + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Rain +{ + technique + { + pass + { + scene_blend colour_blend + depth_write off + + texture_unit + { + texture pu_rain.png + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Beam_1 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pu_beam_01.png 1d + tex_address_mode clamp + filtering none + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------------------------------- +material ParticleUniverse/Beam_2 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pu_beam_02.png 1d + tex_address_mode clamp + filtering none + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Pentagram_02 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_pentagram_02.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Flare_04 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_flare_04.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Streak_03 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_streak_03.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------- +material ParticleUniverse/Swirl_02 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_swirl_02.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Watch +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + + texture_unit + { + texture pump_watch.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Hourglass +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + + texture_unit + { + texture pump_hourglass.png + tex_address_mode clamp + } + } + } +} diff --git a/res/chapter9/Particle3D/materials/pu_mediapack_01.material b/res/chapter9/Particle3D/materials/pu_mediapack_01.material new file mode 100644 index 0000000..890c4da --- /dev/null +++ b/res/chapter9/Particle3D/materials/pu_mediapack_01.material @@ -0,0 +1,1323 @@ +//----------------------------------------------------------------------------------------------------------------------- +// This script is part of the Particle Universe Media Pack product. +// +// Copyright (c) 2008 Henry van Merode +// +// Usage of this program is licensed under the terms of the Particle Universe Commercial License. +// You can find a copy of the Commercial License in the Particle Universe package. +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Bubble +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pump_bubble.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/BlurredBubble +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pump_bubble_blurred.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Streak_01 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_streak_01.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Streak_02 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + texture_unit + { + texture pump_streak_02.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Streak_03 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_streak_03.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Streak_04 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_streak_04.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Flare_01 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_flare_01.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Flare_02 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_flare_02.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Flare_03 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_flare_03.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Flare_04 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_flare_04.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Flare_05 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_flare_05.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Flare_06 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_flare_06.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Watch +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + + texture_unit + { + texture pump_watch.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Hourglass +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + + texture_unit + { + texture pump_hourglass.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Leave +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pump_leave.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Smoke_01 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_smoke_01.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Smoke_11 +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pump_smoke_01.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Dirt_11 +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pump_dirt_01.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Dirt_12 +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pump_dirt_02.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Lightning_01 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_lightning_01.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Lightning_02 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_lightning_02.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Lightning_03 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_lightning_03.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Lightning_04 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_lightning_04.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Spark_01 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_spark_01.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Star_01 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_star_01.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Star_02 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_star_02.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Star_03 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_star_03.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Star_04 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_star_04.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Star_05 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_star_05.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Genesis_11 +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pump_genesis_01.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------- +material PUMediaPack/Genesis_12 +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pump_genesis_02.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------- +material ParticleUniverse/Swirl_01 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_swirl_01.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------- +material ParticleUniverse/Swirl_02 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_swirl_02.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------- +material ParticleUniverse/Swirl_03 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_swirl_03.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------- +material PUMediaPack/Ring_01 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_ring_01.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------- +material PUMediaPack/Ring_02 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_ring_02.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------- +material PUMediaPack/Ring_03 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_ring_03.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------- +material PUMediaPack/Ring_14 +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pump_ring_04.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------- +material PUMediaPack/Ring_05 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_ring_05.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Metal_01 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_metal_01.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Metal_02 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_metal_02.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Fire_01 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_flame_01.png + tex_address_mode clamp + } + } + } +} + +//--------------------------------------------------------------------- +material PUMediaPack/Fire_02 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_flame_02.png + tex_address_mode clamp + } + } + } +} + +//--------------------------------------------------------------------- +material PUMediaPack/Fire_03 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_flame_03.png + tex_address_mode clamp + } + } + } +} + +//--------------------------------------------------------------------- +material PUMediaPack/Fire_04 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_flame_04.png + tex_address_mode clamp + } + } + } +} + +//--------------------------------------------------------------------- +material PUMediaPack/AtlasSmoke +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pump_atlas_smoke.png + tex_address_mode clamp + } + } + } +} + +//--------------------------------------------------------------------- +material PUMediaPack/Snow_01 +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_write off + + texture_unit + { + texture pump_snow_01.png + tex_address_mode clamp + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/BBal +{ + technique + { + pass + { + lighting off + depth_write off + + texture_unit + { + texture pu_bbal.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/BioHazzard +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_biohazzard.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/CelticKnot +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_celticknot.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Pentagram_01 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_pentagram_01.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +material PUMediaPack/Pentagram_02 +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + + texture_unit + { + texture pump_pentagram_02.png + tex_address_mode clamp + } + } + } +} + +//----------------------------------------------------------------------------------------------------------------------- +// This script is part of the Particle Universe Media Pack 1 product. +// +// Copyright (c) 2010 Henry van Merode +// +// Usage of this program is licensed under the terms of the Particle Universe Commercial License Media Pack 1. +// You can find a copy of the Commercial License in the Media Pack 1 package. +//----------------------------------------------------------------------------------------------------------------------- + +material mp_explosion_smoke_01 +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + + texture_unit + { + texture mp_explosion_smoke_01.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material mp_explosion_smoke_01_add +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + texture_unit + { + texture mp_explosion_smoke_01_add.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material mp_explosion_flare_01 +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + + texture_unit + { + texture mp_explosion_flare_01.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material mp_explosion_flare_02 +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + + texture_unit + { + texture mp_explosion_flare_02.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material mp_explosion_dirt +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + + texture_unit + { + texture mp_explosion_dirt.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material mp_explosion_flame_01 +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + + texture_unit + { + texture mp_explosion_flame_01.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material mp_explosion_flame_02 +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + + texture_unit + { + texture mp_explosion_flame_02.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material mp_explosion_smoke_02 +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + + texture_unit + { + texture mp_explosion_smoke_02.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material mp_explosion_smoke_03 +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + + texture_unit + { + texture mp_explosion_smoke_03.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material mp_explosion_debris +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + + texture_unit + { + texture mp_explosion_debris.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material mp_explosion_debris_large +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + + texture_unit + { + texture mp_explosion_debris_large_4x4.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material mp_explosion_04 +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + texture_unit + { + texture mp_explosion_04.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material mp_explosion_trail +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend add + + texture_unit + { + texture mp_explosion_trail_01.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material mp_explosion_water +{ + technique + { + pass + { + lighting off + depth_write off + scene_blend alpha_blend + + texture_unit + { + texture mp_explosion_water.dds + } + } + } +} +//----------------------------------------------------------------------------------------------------------------------- +material weaponTrail +{ + technique + { + pass + { + lighting off + scene_blend add + depth_write off + cull_hardware none + cull_software none + + texture_unit + { + texture weaponTrail.png + tex_address_mode clamp + } + } + } +} + diff --git a/res/chapter9/Particle3D/scripts/UVAnimation.pu b/res/chapter9/Particle3D/scripts/UVAnimation.pu new file mode 100644 index 0000000..8622e39 --- /dev/null +++ b/res/chapter9/Particle3D/scripts/UVAnimation.pu @@ -0,0 +1,41 @@ +system example_029 +{ + category Examples_21_30 + technique + { + visual_particle_quota 2000 + emitted_affector_quota 200 + material ParticleUniverse/Interpolate + default_particle_width 1.8 + default_particle_height 1.8 + renderer Billboard + { + texture_coords_rows 6 + texture_coords_columns 6 + } + emitter Point + { + angle 360 + time_to_live dyn_random + { + min 2 + max 5 + } + velocity dyn_random + { + min 3.6 + max 4.8 + } + } + affector Scale + { + xyz_scale 0.6 + } + affector TextureAnimator + { + time_step 0.1 + end_texture_coords_range 35 + texture_start_random false + } + } +} diff --git a/res/chapter9/Particle3D/scripts/advancedLodSystem.pu b/res/chapter9/Particle3D/scripts/advancedLodSystem.pu new file mode 100644 index 0000000..a26f690 --- /dev/null +++ b/res/chapter9/Particle3D/scripts/advancedLodSystem.pu @@ -0,0 +1,57 @@ +system advancedLodSystem +{ + smooth_lod true + main_camera_name MainCamera + lod_distances 21 60 + technique + { + visual_particle_quota 100 + material ParticleUniverse/Barrel_02 + default_particle_width 0.99 + default_particle_height 1.05 + default_particle_depth 1.05 + renderer Entity + { + mesh_name sphere.mesh + } + emitter Box + { + emission_rate 5 + angle 25 + time_to_live dyn_random + { + min 2 + max 6 + } + velocity 2.4 + box_width 3 + box_height 3 + box_depth 3 + } + } + technique + { + material ParticleUniverse/Barrel_01 + lod_index 1 + default_particle_width 0.96 + default_particle_height 1.26 + default_particle_depth 1.5 + renderer Billboard + { + } + emitter Box + { + emission_rate 5 + angle 25 + time_to_live dyn_random + { + min 2 + max 6 + } + velocity 2.4 + box_width 3 + box_height 3 + box_depth 3 + } + } +} diff --git a/res/chapter9/Particle3D/scripts/blackHole.pu b/res/chapter9/Particle3D/scripts/blackHole.pu new file mode 100644 index 0000000..3abffa7 --- /dev/null +++ b/res/chapter9/Particle3D/scripts/blackHole.pu @@ -0,0 +1,76 @@ +system blackHole +{ + technique + { + visual_particle_quota 2500 + material PUMediaPack/Flare_04 + default_particle_width 12 + default_particle_height 12 + renderer Billboard + { + } + emitter SphereSurface + { + emission_rate 200 + velocity 3 + radius 12 + } + affector Colour + { + time_colour 0 0 0 0.2 1 + time_colour 0.9 0.8 0.8 1 1 + time_colour 1 1 1 1 1 + } + affector Gravity + { + gravity 2700 + } + affector Scale + { + xyz_scale -4.5 + } + } + technique + { + visual_particle_quota 250 + material PUMediaPack/Streak_03 + renderer Billboard + { + billboard_type oriented_self + } + emitter Point + { + emission_rate 50 + angle 360 + time_to_live 4 + velocity 1 + particle_width dyn_random + { + min 2 + max 4 + } + particle_height dyn_random + { + min 45 + max 60 + } + colour 0.1 0.1 1 1 + } + affector Scale + { + x_scale -1.2 + } + affector Scale + { + y_scale -45 + } + affector Colour + { + time_colour 0 0 0 0 0 + time_colour 0.2 1 1 1 1 + time_colour 0.8 1 1 1 1 + time_colour 1 0 0 0 0 + colour_operation multiply + } + } +} diff --git a/res/chapter9/Particle3D/scripts/canOfWorms.pu b/res/chapter9/Particle3D/scripts/canOfWorms.pu new file mode 100644 index 0000000..186dea1 --- /dev/null +++ b/res/chapter9/Particle3D/scripts/canOfWorms.pu @@ -0,0 +1,39 @@ +system canOfWorms +{ + category LightFX + technique + { + visual_particle_quota 2000 + emitted_emitter_quota 20 + material PUMediaPack/Flare_04 + default_particle_width 1.2 + default_particle_height 1.2 + renderer Billboard + { + } + emitter Point Core + { + emission_rate 3 + angle 360 + time_to_live 4 + velocity 9 + emits emitter_particle Worms + } + emitter Point Worms + { + emission_rate 60 + angle 360 + time_to_live 2 + velocity 0.45 + direction 0 -1 0 + colour 1 0.6 0.6 1 + } + affector SineForce + { + exclude_emitter Worms + force_vector 15 15 15 + min_frequency 5 + max_frequency 5 + } + } +} diff --git a/res/chapter9/Particle3D/scripts/electricBeamSystem.pu b/res/chapter9/Particle3D/scripts/electricBeamSystem.pu new file mode 100644 index 0000000..4bb28cb --- /dev/null +++ b/res/chapter9/Particle3D/scripts/electricBeamSystem.pu @@ -0,0 +1,69 @@ +system electricBeamSystem +{ + technique + { + position -15 -3 0 + material ParticleUniverse/Lightning + default_particle_width 1.05 + default_particle_height 0 + renderer Billboard + { + billboard_type oriented_shape + billboard_origin bottom_center + } + emitter Line + { + emission_rate 40 + time_to_live 100 + direction 0 0 0 + end 45 9 0 + min_increment 1.5 + max_increment 4.5 + max_deviation 0.3 + } + affector Line + { + max_deviation 4 + time_step 0.03 + end 45 9 0 + drift 0.3 + } + affector Align + { + resize true + } + } + technique + { + position -15 -3 0 + material ParticleUniverse/Lightning + default_particle_width 0.45 + default_particle_height 0 + renderer Billboard + { + billboard_type oriented_shape + billboard_origin bottom_center + } + emitter Line + { + emission_rate 150 + time_to_live 100 + direction 0 0 0 + end 45 9 0 + min_increment 1.5 + max_increment 1.8 + max_deviation 0.9 + } + affector Line + { + max_deviation 4.2 + time_step 0.01 + end 45 9 0 + drift 0.1 + } + affector Align + { + resize true + } + } +} diff --git a/res/chapter9/Particle3D/scripts/example_004.pu b/res/chapter9/Particle3D/scripts/example_004.pu new file mode 100644 index 0000000..8004baf --- /dev/null +++ b/res/chapter9/Particle3D/scripts/example_004.pu @@ -0,0 +1,32 @@ +system example_004 +{ + category Examples_1_10 + technique + { + visual_particle_quota 100 + material ParticleUniverse/Star + default_particle_width 0.6 + default_particle_height 0.6 + renderer Billboard + { + } + emitter SphereSurface + { + emission_rate 60 + time_to_live 1.8 + velocity 0 + direction 0 0 0 + radius 3 + } + affector Colour + { + time_colour 0 1 1 0 1 + time_colour 1 1 0 0 0 + } + affector Gravity + { + mass_affector 0.03 + gravity 150 + } + } +} diff --git a/res/chapter9/Particle3D/scripts/explosionSystem.pu b/res/chapter9/Particle3D/scripts/explosionSystem.pu new file mode 100644 index 0000000..092a2b8 --- /dev/null +++ b/res/chapter9/Particle3D/scripts/explosionSystem.pu @@ -0,0 +1,159 @@ +system explosionSystem +{ + category Explosion + technique + { + material ParticleUniverse/ExplosionFire + default_particle_width 0.3 + default_particle_height 0.3 + renderer Billboard + { + } + emitter SphereSurface BurstEmitter + { + emission_rate 20 + time_to_live 2 + velocity 3 + direction 0 0 0 + auto_direction true + radius 0.15 + } + affector Colour + { + time_colour 0 1 1 0.95 1 + time_colour 0.5 0.18 0.05 0.01 1 + time_colour 1 0 0 0 1 + } + affector Scale + { + xyz_scale 6 + } + observer OnTime + { + handler DoEnableComponent + { + enable_component emitter_component BurstEmitter false + } + since_start_system true + on_time greater_than 0.7 + } + } + technique + { + emitted_technique_quota 6 + material BaseWhite + renderer Billboard + { + } + emitter Point NucleusEmitter + { + emission_rate 6 + angle 80 + time_to_live 10 + velocity 9 + enabled false + emits technique_particle NucleusTechnique + force_emission true + } + affector LinearForce + { + force_vector 0 -3 0 + } + observer OnTime + { + handler DoEnableComponent + { + enable_component emitter_component NucleusEmitter true + } + since_start_system true + on_time greater_than 0.3 + } + } + technique NucleusTechnique + { + material ParticleUniverse/Nucleus + default_particle_width 0.45 + default_particle_height 0.45 + renderer Billboard + { + } + emitter Point + { + emission_rate 100 + angle 360 + velocity 0.06 + direction 0 -1 0 + } + affector Colour + { + time_colour 0 0.5 0.4 0.2 1 + time_colour 0.1 0.5 0.2 0.05 1 + time_colour 0.2 0.1 0.1 0.1 1 + time_colour 1 0 0 0 1 + } + affector TextureRotator + { + use_own_rotation true + rotation dyn_random + { + min 1 + max 90 + } + rotation_speed dyn_random + { + min 0.1 + max 1 + } + } + affector Scale + { + xyz_scale -0.15 + } + } + technique + { + material ParticleUniverse/Debris + renderer Billboard + { + billboard_type oriented_self + } + emitter Point DebrisEmitter + { + emission_rate 100 + angle 360 + time_to_live 5 + velocity dyn_random + { + min 3 + max 6 + } + particle_width 0.09 + particle_height dyn_random + { + min 0.06 + max 0.6 + } + enabled false + direction 0 -1 0 + force_emission true + } + affector Colour + { + time_colour 0 1 1 1 1 + time_colour 1 0 0 0 1 + } + affector LinearForce + { + force_vector 0 -3 0 + } + observer OnTime + { + handler DoEnableComponent + { + enable_component emitter_component DebrisEmitter true + } + since_start_system true + on_time greater_than 0.3 + } + } +} diff --git a/res/chapter9/Particle3D/scripts/flameSystem.pu b/res/chapter9/Particle3D/scripts/flameSystem.pu new file mode 100644 index 0000000..2813d44 --- /dev/null +++ b/res/chapter9/Particle3D/scripts/flameSystem.pu @@ -0,0 +1,77 @@ +system flameSystem +{ + category Fire + technique + { + visual_particle_quota 2000 + emitted_affector_quota 200 + material ParticleUniverse/Flame + default_particle_width 1.35 + default_particle_height 1.8 + renderer Billboard + { + billboard_type oriented_self + } + emitter Box flamesEmitter + { + emission_rate 200 + angle 40 + time_to_live dyn_random + { + min 5 + max 9 + } + velocity dyn_random + { + min 1.8 + max 2.4 + } + box_width 3 + box_height 0.03 + box_depth 3 + } + emitter Box gravityEmitter + { + emission_rate 5 + angle 80 + time_to_live dyn_random + { + min 2 + max 5 + } + mass dyn_random + { + min 0.6 + max 1.2 + } + velocity dyn_random + { + min 2.4 + max 3.6 + } + position 0 1.8 0 + emits affector_particle gravityAffector + box_width 3 + box_height 3 + box_depth 3 + } + affector Gravity gravityAffector + { + gravity 1.2 + } + affector Scale + { + xyz_scale -0.3 + } + affector SineForce + { + force_vector 0.9 0 0 + max_frequency 3 + } + affector Colour + { + time_colour 0 1 1 1 1 + time_colour 1 0 0 0 1 + } + } +} diff --git a/res/chapter9/Particle3D/scripts/flareShield.pu b/res/chapter9/Particle3D/scripts/flareShield.pu new file mode 100644 index 0000000..4a464a3 --- /dev/null +++ b/res/chapter9/Particle3D/scripts/flareShield.pu @@ -0,0 +1,110 @@ +system flareShield +{ + technique + { + visual_particle_quota 200 + emitted_emitter_quota 15 + material PUMediaPack/Flare_05 + renderer Billboard + { + } + emitter Point + { + emission_rate 3 + angle 0 + velocity 4.5 + duration 4 + emits emitter_particle CircleEmitter + } + emitter Circle CircleEmitter + { + emission_rate 20 + angle 360 + time_to_live dyn_random + { + min 0.2 + max 1 + } + velocity 0.15 + all_particle_dimensions dyn_random + { + min 0.9 + max 2.4 + } + keep_local true + direction 0 0 0 + colour 0.7 0.8 1 1 + radius 3 + } + affector Vortex + { + rotation_axis 0 1 0 + rotation_speed 7 + } + affector Colour + { + time_colour 0 1 1 1 1 + time_colour 0.8 1 1 1 1 + time_colour 1 0 0 0 0 + colour_operation multiply + } + observer OnTime + { + observe_until_event true + handler DoEnableComponent + { + enable_component observer_component OnExpireObserver true + } + since_start_system true + on_time greater_than 4 + } + observer OnExpire OnExpireObserver + { + enabled false + handler DoPlacementParticle + { + force_emitter ExplodeEmitter + } + } + } + technique + { + visual_particle_quota 200 + emitted_emitter_quota 30 + material PUMediaPack/Flare_05 + renderer Billboard + { + } + emitter Point ExplodeEmitter + { + emission_rate 0 + angle 0 + time_to_live dyn_random + { + min 0.3 + max 1 + } + direction 0 0 0 + emits emitter_particle ExplodeFlares + } + emitter Point ExplodeFlares + { + emission_rate 5 + angle 360 + time_to_live 1 + velocity 6 + all_particle_dimensions dyn_random + { + min 1.5 + max 1.8 + } + colour 0.7 0.8 1 1 + } + observer OnClear + { + handler DoStopSystem + { + } + } + } +} diff --git a/res/chapter9/Particle3D/scripts/hypno.pu b/res/chapter9/Particle3D/scripts/hypno.pu new file mode 100644 index 0000000..6f410fb --- /dev/null +++ b/res/chapter9/Particle3D/scripts/hypno.pu @@ -0,0 +1,53 @@ +system hypno +{ + technique + { + visual_particle_quota 200 + material ParticleUniverse/Swirl_02 + default_particle_width 6 + default_particle_height 6 + renderer Billboard + { + } + emitter Circle + { + emission_rate 40 + time_to_live dyn_random + { + min 2 + max 5 + } + velocity 0.9 + all_particle_dimensions dyn_random + { + min 3 + max 12 + } + direction 0 0 0 + colour 1 0.22 0.22 1 + auto_direction true + radius 6 + normal 0 0 1 + } + affector Colour + { + time_colour 0 1 1 1 1 + time_colour 0.8 1 1 1 1 + time_colour 1 0 0 0 0 + colour_operation multiply + } + affector TextureRotator + { + rotation dyn_random + { + min 0 + max 180 + } + rotation_speed dyn_random + { + min 5 + max 20 + } + } + } +} diff --git a/res/chapter9/Particle3D/scripts/lightningBolt.pu b/res/chapter9/Particle3D/scripts/lightningBolt.pu new file mode 100644 index 0000000..14fca93 --- /dev/null +++ b/res/chapter9/Particle3D/scripts/lightningBolt.pu @@ -0,0 +1,193 @@ +system lightningBolt +{ + technique + { + visual_particle_quota 100 + material PUMediaPack/Smoke_01 + renderer Billboard + { + } + emitter Point + { + emission_rate 40 + angle 360 + time_to_live dyn_random + { + min 1 + max 3 + } + velocity 3 + duration 4 + all_particle_dimensions dyn_random + { + min 0.3 + max 0.6 + } + colour 0.46 0.06 0.82 1 + } + affector Scale + { + xyz_scale 6 + } + affector Colour + { + time_colour 0 1 1 1 1 + time_colour 1 0 0 0 0 + colour_operation multiply + } + observer OnClear + { + handler DoStopSystem + { + } + } + } + technique Lightning_1 + { + visual_particle_quota 20 + material PUMediaPack/Lightning_01 + renderer Billboard + { + billboard_type oriented_self + billboard_origin top_center + } + emitter Point + { + emission_rate 20 + angle 360 + time_to_live dyn_random + { + min 0.05 + max 0.15 + } + velocity 1e-005 + duration 2.5 + repeat_delay 2.5 + all_particle_dimensions dyn_random + { + min 7.68 + max 15.36 + } + enabled false + colour 0.46 0.06 0.82 1 + } + affector Colour + { + time_colour 0 1 1 1 1 + time_colour 0.5 1 1 1 1 + time_colour 1 0 0 0 0 + colour_operation multiply + } + } + technique Lightning_2 + { + visual_particle_quota 5 + material PUMediaPack/Lightning_02 + renderer Billboard + { + billboard_type oriented_self + billboard_origin top_center + } + emitter Point + { + emission_rate 20 + angle 360 + time_to_live dyn_random + { + min 0.05 + max 0.15 + } + velocity 1e-005 + duration 2.5 + repeat_delay 2.5 + all_particle_dimensions dyn_random + { + min 7.68 + max 15.36 + } + enabled false + colour 0.46 0.06 0.82 1 + } + affector Colour + { + time_colour 0 1 1 1 1 + time_colour 0.5 1 1 1 1 + time_colour 1 0 0 0 0 + colour_operation multiply + } + } + technique Lightning_3 + { + visual_particle_quota 5 + material PUMediaPack/Lightning_03 + renderer Billboard + { + billboard_type oriented_self + billboard_origin top_center + } + emitter Point + { + emission_rate 20 + angle 360 + time_to_live dyn_random + { + min 0.05 + max 0.15 + } + velocity 1e-005 + duration 2.5 + repeat_delay 2.5 + all_particle_dimensions dyn_random + { + min 7.68 + max 15.36 + } + enabled false + colour 0.46 0.06 0.82 1 + } + affector Colour + { + time_colour 0 1 1 1 1 + time_colour 0.5 1 1 1 1 + time_colour 1 0 0 0 0 + colour_operation multiply + } + } + technique Lightning_4 + { + visual_particle_quota 5 + material PUMediaPack/Lightning_04 + renderer Billboard + { + billboard_type oriented_self + billboard_origin top_center + } + emitter Point + { + emission_rate 20 + angle 360 + time_to_live dyn_random + { + min 0.05 + max 0.15 + } + velocity 1e-005 + duration 2.5 + repeat_delay 2.5 + all_particle_dimensions dyn_random + { + min 7.68 + max 15.36 + } + enabled false + colour 0.46 0.06 0.82 1 + } + affector Colour + { + time_colour 0 1 1 1 1 + time_colour 0.5 1 1 1 1 + time_colour 1 0 0 0 0 + colour_operation multiply + } + } +} diff --git a/res/chapter9/Particle3D/scripts/lineStreak.pu b/res/chapter9/Particle3D/scripts/lineStreak.pu new file mode 100644 index 0000000..ea1cace --- /dev/null +++ b/res/chapter9/Particle3D/scripts/lineStreak.pu @@ -0,0 +1,43 @@ +system lineStreak +{ + category LightFX + technique + { + keep_local true + visual_particle_quota 250 + material PUMediaPack/Pentagram_02 + renderer Billboard + { + billboard_type oriented_self + } + emitter Point + { + emission_rate 200 + angle 360 + time_to_live 1 + velocity dyn_random + { + min 3 + max 7.5 + } + particle_width dyn_random + { + min 0.3 + max 1.4 + } + particle_height dyn_random + { + min 6 + max 12 + } + colour 1 0.84 0.45 1 + } + affector Colour + { + time_colour 0 1 1 1 1 + time_colour 0.8 1 1 1 1 + time_colour 1 0 0 0 0 + colour_operation multiply + } + } +} diff --git a/res/chapter9/Particle3D/scripts/mp_torch.pu b/res/chapter9/Particle3D/scripts/mp_torch.pu new file mode 100644 index 0000000..6f7b99d --- /dev/null +++ b/res/chapter9/Particle3D/scripts/mp_torch.pu @@ -0,0 +1,56 @@ +system mp_torch +{ + category Fire + technique + { + visual_particle_quota 20 + material mp_fire_02 + renderer Billboard + { + texture_coords_rows 2 + texture_coords_columns 2 + } + emitter Point + { + emission_rate 30 + angle 5 + time_to_live dyn_random + { + min 0.4 + max 0.6 + } + velocity dyn_random + { + min 4.8 + max 5.4 + } + all_particle_dimensions dyn_random + { + min 1.2 + max 1.8 + } + end_texture_coords_range 3 + } + affector Colour + { + time_colour 0 0 0 0 1 + time_colour 0.3 1 0.45098 0.235294 1 + time_colour 0.5 1 0.45098 0.235294 1 + time_colour 1 0 0 0 1 + } + affector Scale + { + x_scale dyn_curved_linear + { + control_point 0 0.3 + control_point 0.5 0.3 + control_point 1 -3 + } + y_scale dyn_curved_linear + { + control_point 0 15 + control_point 0.6 -3 + } + } + } +} diff --git a/res/chapter9/Particle3D/scripts/ribbonTrailTest.pu b/res/chapter9/Particle3D/scripts/ribbonTrailTest.pu new file mode 100644 index 0000000..a450c8d --- /dev/null +++ b/res/chapter9/Particle3D/scripts/ribbonTrailTest.pu @@ -0,0 +1,32 @@ +system ribbonTrailTest +{ + category Examples_21_30 + technique + { + visual_particle_quota 40 + material ParticleUniverse/RibbonTrail + renderer RibbonTrail + { + max_elements 60 + ribbontrail_length 18 + ribbontrail_width 0.3 + colour_change 0.8 0.8 0.8 0.8 + } + emitter Point + { + angle 360 + time_to_live 40 + velocity 45 + } + affector Gravity + { + position 0 -6 -3 + gravity 700 + } + affector Gravity + { + position 0 6 3 + gravity 700 + } + } +} diff --git a/res/chapter9/Particle3D/scripts/timeShift.pu b/res/chapter9/Particle3D/scripts/timeShift.pu new file mode 100644 index 0000000..c569f8e --- /dev/null +++ b/res/chapter9/Particle3D/scripts/timeShift.pu @@ -0,0 +1,93 @@ +system timeShift +{ + technique + { + visual_particle_quota 20 + material PUMediaPack/Watch + renderer Billboard + { + } + emitter Point + { + emission_rate dyn_curved_linear + { + control_point 0 0 + control_point 0.2 10 + control_point 3 0 + } + angle 360 + velocity dyn_random + { + min 0.9 + max 3 + } + all_particle_dimensions dyn_random + { + min 3 + max 12 + } + colour 1 0.88 0.26 1 + } + affector Colour + { + time_colour 0 0 0 0 0 + time_colour 0.5 1 1 1 1 + time_colour 1 0 0 0 0 + colour_operation multiply + } + affector TextureRotator + { + use_own_rotation true + rotation_speed dyn_random + { + min -2 + max 2 + } + } + } + technique + { + visual_particle_quota 20 + material PUMediaPack/Hourglass + renderer Billboard + { + } + emitter Point + { + emission_rate dyn_curved_linear + { + control_point 0 0 + control_point 0.2 5 + control_point 3 0 + } + angle 360 + velocity dyn_random + { + min 0.9 + max 3 + } + all_particle_dimensions dyn_random + { + min 3 + max 9 + } + colour 0.82 1 0.51 1 + } + affector Colour + { + time_colour 0 0 0 0 0 + time_colour 0.5 1 1 1 1 + time_colour 1 0 0 0 0 + colour_operation multiply + } + affector TextureRotator + { + use_own_rotation true + rotation_speed dyn_random + { + min -2 + max 2 + } + } + } +} diff --git a/res/chapter9/Particle3D/scripts/weaponTrail.pu b/res/chapter9/Particle3D/scripts/weaponTrail.pu new file mode 100644 index 0000000..e29a407 --- /dev/null +++ b/res/chapter9/Particle3D/scripts/weaponTrail.pu @@ -0,0 +1,28 @@ +system weaponTrail +{ + technique + { + visual_particle_quota 1 + material weaponTrail + renderer Billboard + { + texture_coords_rows 6 + texture_coords_columns 6 + billboard_rotation_type vertex + } + emitter Point Emitter32 + { + angle 0 + time_to_live 0.27 + velocity 0.001 + colour 1 0 0 0.501961 + force_emission true + } + affector TextureAnimator Affector47 + { + time_step 0.03 + end_texture_coords_range 8 + texture_start_random false + } + } +} \ No newline at end of file diff --git a/res/chapter9/Particle3D/textures/crate6.png b/res/chapter9/Particle3D/textures/crate6.png new file mode 100644 index 0000000..a7b0b0e Binary files /dev/null and b/res/chapter9/Particle3D/textures/crate6.png differ diff --git a/res/chapter9/Particle3D/textures/interpolate.png b/res/chapter9/Particle3D/textures/interpolate.png new file mode 100644 index 0000000..29620cd Binary files /dev/null and b/res/chapter9/Particle3D/textures/interpolate.png differ diff --git a/res/chapter9/Particle3D/textures/mp_explosion_04.dds b/res/chapter9/Particle3D/textures/mp_explosion_04.dds new file mode 100755 index 0000000..dc886d1 Binary files /dev/null and b/res/chapter9/Particle3D/textures/mp_explosion_04.dds differ diff --git a/res/chapter9/Particle3D/textures/mp_explosion_debris.dds b/res/chapter9/Particle3D/textures/mp_explosion_debris.dds new file mode 100644 index 0000000..3939f10 Binary files /dev/null and b/res/chapter9/Particle3D/textures/mp_explosion_debris.dds differ diff --git a/res/chapter9/Particle3D/textures/mp_explosion_smoke_01.dds b/res/chapter9/Particle3D/textures/mp_explosion_smoke_01.dds new file mode 100755 index 0000000..5d9133a Binary files /dev/null and b/res/chapter9/Particle3D/textures/mp_explosion_smoke_01.dds differ diff --git a/res/chapter9/Particle3D/textures/mp_fire_02_2x2.dds b/res/chapter9/Particle3D/textures/mp_fire_02_2x2.dds new file mode 100755 index 0000000..34209cb Binary files /dev/null and b/res/chapter9/Particle3D/textures/mp_fire_02_2x2.dds differ diff --git a/res/chapter9/Particle3D/textures/mp_fire_02_2x2.png b/res/chapter9/Particle3D/textures/mp_fire_02_2x2.png new file mode 100644 index 0000000..18d6946 Binary files /dev/null and b/res/chapter9/Particle3D/textures/mp_fire_02_2x2.png differ diff --git a/res/chapter9/Particle3D/textures/pu_barrel_01.png b/res/chapter9/Particle3D/textures/pu_barrel_01.png new file mode 100644 index 0000000..402d821 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_barrel_01.png differ diff --git a/res/chapter9/Particle3D/textures/pu_barrel_02.png b/res/chapter9/Particle3D/textures/pu_barrel_02.png new file mode 100644 index 0000000..b5ee14b Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_barrel_02.png differ diff --git a/res/chapter9/Particle3D/textures/pu_bbal.png b/res/chapter9/Particle3D/textures/pu_bbal.png new file mode 100644 index 0000000..7b76a89 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_bbal.png differ diff --git a/res/chapter9/Particle3D/textures/pu_beam_01.png b/res/chapter9/Particle3D/textures/pu_beam_01.png new file mode 100644 index 0000000..b11f843 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_beam_01.png differ diff --git a/res/chapter9/Particle3D/textures/pu_beam_02.png b/res/chapter9/Particle3D/textures/pu_beam_02.png new file mode 100644 index 0000000..144fb2b Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_beam_02.png differ diff --git a/res/chapter9/Particle3D/textures/pu_circle.png b/res/chapter9/Particle3D/textures/pu_circle.png new file mode 100644 index 0000000..250f42b Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_circle.png differ diff --git a/res/chapter9/Particle3D/textures/pu_dirt_256x512.png b/res/chapter9/Particle3D/textures/pu_dirt_256x512.png new file mode 100644 index 0000000..7e95b87 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_dirt_256x512.png differ diff --git a/res/chapter9/Particle3D/textures/pu_dot_03_64x64.png b/res/chapter9/Particle3D/textures/pu_dot_03_64x64.png new file mode 100644 index 0000000..0d85ab4 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_dot_03_64x64.png differ diff --git a/res/chapter9/Particle3D/textures/pu_fire_01_64x64.png b/res/chapter9/Particle3D/textures/pu_fire_01_64x64.png new file mode 100644 index 0000000..f545788 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_fire_01_64x64.png differ diff --git a/res/chapter9/Particle3D/textures/pu_flame.png b/res/chapter9/Particle3D/textures/pu_flame.png new file mode 100644 index 0000000..5b92b5e Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_flame.png differ diff --git a/res/chapter9/Particle3D/textures/pu_flare.png b/res/chapter9/Particle3D/textures/pu_flare.png new file mode 100644 index 0000000..4909d7f Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_flare.png differ diff --git a/res/chapter9/Particle3D/textures/pu_flare_12_256x256.png b/res/chapter9/Particle3D/textures/pu_flare_12_256x256.png new file mode 100644 index 0000000..f2c4026 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_flare_12_256x256.png differ diff --git a/res/chapter9/Particle3D/textures/pu_green_ball.png b/res/chapter9/Particle3D/textures/pu_green_ball.png new file mode 100644 index 0000000..bbb484f Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_green_ball.png differ diff --git a/res/chapter9/Particle3D/textures/pu_hart.png b/res/chapter9/Particle3D/textures/pu_hart.png new file mode 100644 index 0000000..54a0251 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_hart.png differ diff --git a/res/chapter9/Particle3D/textures/pu_lightning_20x64.png b/res/chapter9/Particle3D/textures/pu_lightning_20x64.png new file mode 100644 index 0000000..a55a98c Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_lightning_20x64.png differ diff --git a/res/chapter9/Particle3D/textures/pu_nucleus.png b/res/chapter9/Particle3D/textures/pu_nucleus.png new file mode 100644 index 0000000..0c7bf95 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_nucleus.png differ diff --git a/res/chapter9/Particle3D/textures/pu_plate.jpg b/res/chapter9/Particle3D/textures/pu_plate.jpg new file mode 100644 index 0000000..ee827bf Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_plate.jpg differ diff --git a/res/chapter9/Particle3D/textures/pu_rain.png b/res/chapter9/Particle3D/textures/pu_rain.png new file mode 100644 index 0000000..92d77d2 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_rain.png differ diff --git a/res/chapter9/Particle3D/textures/pu_rain_01.png b/res/chapter9/Particle3D/textures/pu_rain_01.png new file mode 100644 index 0000000..fc316b7 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_rain_01.png differ diff --git a/res/chapter9/Particle3D/textures/pu_ribbontrail.png b/res/chapter9/Particle3D/textures/pu_ribbontrail.png new file mode 100644 index 0000000..e696664 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_ribbontrail.png differ diff --git a/res/chapter9/Particle3D/textures/pu_sand_336x330.png b/res/chapter9/Particle3D/textures/pu_sand_336x330.png new file mode 100644 index 0000000..ae89559 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_sand_336x330.png differ diff --git a/res/chapter9/Particle3D/textures/pu_smoke_02_128x128.png b/res/chapter9/Particle3D/textures/pu_smoke_02_128x128.png new file mode 100644 index 0000000..d333716 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_smoke_02_128x128.png differ diff --git a/res/chapter9/Particle3D/textures/pu_smoke_brown_336x330.png b/res/chapter9/Particle3D/textures/pu_smoke_brown_336x330.png new file mode 100644 index 0000000..9d13cb3 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_smoke_brown_336x330.png differ diff --git a/res/chapter9/Particle3D/textures/pu_stone.jpeg b/res/chapter9/Particle3D/textures/pu_stone.jpeg new file mode 100644 index 0000000..453de47 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pu_stone.jpeg differ diff --git a/res/chapter9/Particle3D/textures/pump_atlas_smoke.png b/res/chapter9/Particle3D/textures/pump_atlas_smoke.png new file mode 100644 index 0000000..f946f98 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_atlas_smoke.png differ diff --git a/res/chapter9/Particle3D/textures/pump_biohazzard.png b/res/chapter9/Particle3D/textures/pump_biohazzard.png new file mode 100644 index 0000000..091be2f Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_biohazzard.png differ diff --git a/res/chapter9/Particle3D/textures/pump_bubble.png b/res/chapter9/Particle3D/textures/pump_bubble.png new file mode 100644 index 0000000..1eec4a3 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_bubble.png differ diff --git a/res/chapter9/Particle3D/textures/pump_bubble_blurred.png b/res/chapter9/Particle3D/textures/pump_bubble_blurred.png new file mode 100644 index 0000000..a841113 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_bubble_blurred.png differ diff --git a/res/chapter9/Particle3D/textures/pump_celticknot.png b/res/chapter9/Particle3D/textures/pump_celticknot.png new file mode 100644 index 0000000..22c9cd8 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_celticknot.png differ diff --git a/res/chapter9/Particle3D/textures/pump_dirt_01.png b/res/chapter9/Particle3D/textures/pump_dirt_01.png new file mode 100644 index 0000000..c259757 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_dirt_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_dirt_02.png b/res/chapter9/Particle3D/textures/pump_dirt_02.png new file mode 100644 index 0000000..9a026c9 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_dirt_02.png differ diff --git a/res/chapter9/Particle3D/textures/pump_flame_01.png b/res/chapter9/Particle3D/textures/pump_flame_01.png new file mode 100644 index 0000000..ed9dc42 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_flame_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_flame_02.png b/res/chapter9/Particle3D/textures/pump_flame_02.png new file mode 100644 index 0000000..c407c30 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_flame_02.png differ diff --git a/res/chapter9/Particle3D/textures/pump_flame_03.png b/res/chapter9/Particle3D/textures/pump_flame_03.png new file mode 100644 index 0000000..e77d998 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_flame_03.png differ diff --git a/res/chapter9/Particle3D/textures/pump_flame_04.png b/res/chapter9/Particle3D/textures/pump_flame_04.png new file mode 100644 index 0000000..592946a Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_flame_04.png differ diff --git a/res/chapter9/Particle3D/textures/pump_flare_01.png b/res/chapter9/Particle3D/textures/pump_flare_01.png new file mode 100644 index 0000000..a90214b Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_flare_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_flare_02.png b/res/chapter9/Particle3D/textures/pump_flare_02.png new file mode 100644 index 0000000..8ead015 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_flare_02.png differ diff --git a/res/chapter9/Particle3D/textures/pump_flare_03.png b/res/chapter9/Particle3D/textures/pump_flare_03.png new file mode 100644 index 0000000..1dc469c Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_flare_03.png differ diff --git a/res/chapter9/Particle3D/textures/pump_flare_04.png b/res/chapter9/Particle3D/textures/pump_flare_04.png new file mode 100644 index 0000000..868431e Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_flare_04.png differ diff --git a/res/chapter9/Particle3D/textures/pump_flare_05.png b/res/chapter9/Particle3D/textures/pump_flare_05.png new file mode 100644 index 0000000..469acc2 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_flare_05.png differ diff --git a/res/chapter9/Particle3D/textures/pump_flare_06.png b/res/chapter9/Particle3D/textures/pump_flare_06.png new file mode 100644 index 0000000..60dadf2 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_flare_06.png differ diff --git a/res/chapter9/Particle3D/textures/pump_genesis_01.png b/res/chapter9/Particle3D/textures/pump_genesis_01.png new file mode 100644 index 0000000..5edcb8e Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_genesis_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_genesis_02.png b/res/chapter9/Particle3D/textures/pump_genesis_02.png new file mode 100644 index 0000000..5473d52 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_genesis_02.png differ diff --git a/res/chapter9/Particle3D/textures/pump_hourglass.png b/res/chapter9/Particle3D/textures/pump_hourglass.png new file mode 100644 index 0000000..b322dc5 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_hourglass.png differ diff --git a/res/chapter9/Particle3D/textures/pump_leave.png b/res/chapter9/Particle3D/textures/pump_leave.png new file mode 100644 index 0000000..1cda97a Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_leave.png differ diff --git a/res/chapter9/Particle3D/textures/pump_lightning_01.png b/res/chapter9/Particle3D/textures/pump_lightning_01.png new file mode 100644 index 0000000..a48297d Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_lightning_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_lightning_02.png b/res/chapter9/Particle3D/textures/pump_lightning_02.png new file mode 100644 index 0000000..a9dd25c Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_lightning_02.png differ diff --git a/res/chapter9/Particle3D/textures/pump_lightning_03.png b/res/chapter9/Particle3D/textures/pump_lightning_03.png new file mode 100644 index 0000000..095c119 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_lightning_03.png differ diff --git a/res/chapter9/Particle3D/textures/pump_lightning_04.png b/res/chapter9/Particle3D/textures/pump_lightning_04.png new file mode 100644 index 0000000..01f9f07 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_lightning_04.png differ diff --git a/res/chapter9/Particle3D/textures/pump_mcdxiiiv.png b/res/chapter9/Particle3D/textures/pump_mcdxiiiv.png new file mode 100644 index 0000000..8101078 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_mcdxiiiv.png differ diff --git a/res/chapter9/Particle3D/textures/pump_metal_01.png b/res/chapter9/Particle3D/textures/pump_metal_01.png new file mode 100644 index 0000000..d776586 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_metal_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_metal_02.png b/res/chapter9/Particle3D/textures/pump_metal_02.png new file mode 100644 index 0000000..e98fcad Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_metal_02.png differ diff --git a/res/chapter9/Particle3D/textures/pump_mmviii.png b/res/chapter9/Particle3D/textures/pump_mmviii.png new file mode 100644 index 0000000..5cf2fa9 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_mmviii.png differ diff --git a/res/chapter9/Particle3D/textures/pump_pentagram_01.png b/res/chapter9/Particle3D/textures/pump_pentagram_01.png new file mode 100644 index 0000000..836830d Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_pentagram_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_pentagram_02.png b/res/chapter9/Particle3D/textures/pump_pentagram_02.png new file mode 100644 index 0000000..49ddcbc Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_pentagram_02.png differ diff --git a/res/chapter9/Particle3D/textures/pump_ring_01.png b/res/chapter9/Particle3D/textures/pump_ring_01.png new file mode 100644 index 0000000..e52ae20 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_ring_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_ring_02.png b/res/chapter9/Particle3D/textures/pump_ring_02.png new file mode 100644 index 0000000..c3c5481 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_ring_02.png differ diff --git a/res/chapter9/Particle3D/textures/pump_ring_03.png b/res/chapter9/Particle3D/textures/pump_ring_03.png new file mode 100644 index 0000000..812453c Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_ring_03.png differ diff --git a/res/chapter9/Particle3D/textures/pump_ring_04.png b/res/chapter9/Particle3D/textures/pump_ring_04.png new file mode 100644 index 0000000..871a319 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_ring_04.png differ diff --git a/res/chapter9/Particle3D/textures/pump_ring_05.png b/res/chapter9/Particle3D/textures/pump_ring_05.png new file mode 100644 index 0000000..f0deb84 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_ring_05.png differ diff --git a/res/chapter9/Particle3D/textures/pump_smoke_01.png b/res/chapter9/Particle3D/textures/pump_smoke_01.png new file mode 100644 index 0000000..3e2735a Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_smoke_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_smoke_02.png b/res/chapter9/Particle3D/textures/pump_smoke_02.png new file mode 100644 index 0000000..0313fad Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_smoke_02.png differ diff --git a/res/chapter9/Particle3D/textures/pump_smoke_03.png b/res/chapter9/Particle3D/textures/pump_smoke_03.png new file mode 100644 index 0000000..cd0d92f Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_smoke_03.png differ diff --git a/res/chapter9/Particle3D/textures/pump_smoke_04.png b/res/chapter9/Particle3D/textures/pump_smoke_04.png new file mode 100644 index 0000000..41bc91b Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_smoke_04.png differ diff --git a/res/chapter9/Particle3D/textures/pump_smoke_05.png b/res/chapter9/Particle3D/textures/pump_smoke_05.png new file mode 100644 index 0000000..b70942a Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_smoke_05.png differ diff --git a/res/chapter9/Particle3D/textures/pump_smoke_06.png b/res/chapter9/Particle3D/textures/pump_smoke_06.png new file mode 100644 index 0000000..6a23466 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_smoke_06.png differ diff --git a/res/chapter9/Particle3D/textures/pump_smoke_07.png b/res/chapter9/Particle3D/textures/pump_smoke_07.png new file mode 100644 index 0000000..6a05665 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_smoke_07.png differ diff --git a/res/chapter9/Particle3D/textures/pump_snow_01.png b/res/chapter9/Particle3D/textures/pump_snow_01.png new file mode 100644 index 0000000..95c414e Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_snow_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_spark_01.png b/res/chapter9/Particle3D/textures/pump_spark_01.png new file mode 100644 index 0000000..2e826d6 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_spark_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_star_01.png b/res/chapter9/Particle3D/textures/pump_star_01.png new file mode 100644 index 0000000..20b4a91 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_star_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_star_02.png b/res/chapter9/Particle3D/textures/pump_star_02.png new file mode 100644 index 0000000..2ab4325 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_star_02.png differ diff --git a/res/chapter9/Particle3D/textures/pump_star_03.png b/res/chapter9/Particle3D/textures/pump_star_03.png new file mode 100644 index 0000000..21a5d4e Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_star_03.png differ diff --git a/res/chapter9/Particle3D/textures/pump_star_04.png b/res/chapter9/Particle3D/textures/pump_star_04.png new file mode 100644 index 0000000..8864c5b Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_star_04.png differ diff --git a/res/chapter9/Particle3D/textures/pump_star_05.png b/res/chapter9/Particle3D/textures/pump_star_05.png new file mode 100644 index 0000000..34dbd49 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_star_05.png differ diff --git a/res/chapter9/Particle3D/textures/pump_streak_01.png b/res/chapter9/Particle3D/textures/pump_streak_01.png new file mode 100644 index 0000000..5b2ce2e Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_streak_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_streak_02.png b/res/chapter9/Particle3D/textures/pump_streak_02.png new file mode 100644 index 0000000..893c421 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_streak_02.png differ diff --git a/res/chapter9/Particle3D/textures/pump_streak_03.png b/res/chapter9/Particle3D/textures/pump_streak_03.png new file mode 100644 index 0000000..a9cd103 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_streak_03.png differ diff --git a/res/chapter9/Particle3D/textures/pump_streak_04.png b/res/chapter9/Particle3D/textures/pump_streak_04.png new file mode 100644 index 0000000..cf0d7c7 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_streak_04.png differ diff --git a/res/chapter9/Particle3D/textures/pump_swirl_01.png b/res/chapter9/Particle3D/textures/pump_swirl_01.png new file mode 100644 index 0000000..4181374 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_swirl_01.png differ diff --git a/res/chapter9/Particle3D/textures/pump_swirl_02.png b/res/chapter9/Particle3D/textures/pump_swirl_02.png new file mode 100644 index 0000000..1825ba5 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_swirl_02.png differ diff --git a/res/chapter9/Particle3D/textures/pump_swirl_03.png b/res/chapter9/Particle3D/textures/pump_swirl_03.png new file mode 100644 index 0000000..35b8463 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_swirl_03.png differ diff --git a/res/chapter9/Particle3D/textures/pump_watch.png b/res/chapter9/Particle3D/textures/pump_watch.png new file mode 100644 index 0000000..038fc73 Binary files /dev/null and b/res/chapter9/Particle3D/textures/pump_watch.png differ diff --git a/res/chapter9/Particle3D/textures/weaponTrail.png b/res/chapter9/Particle3D/textures/weaponTrail.png new file mode 100644 index 0000000..4fadb7e Binary files /dev/null and b/res/chapter9/Particle3D/textures/weaponTrail.png differ diff --git a/src/chapter9/Chapter9.cpp b/src/chapter9/Chapter9.cpp index d861efb..42b216c 100644 --- a/src/chapter9/Chapter9.cpp +++ b/src/chapter9/Chapter9.cpp @@ -9,6 +9,7 @@ #include "Chapter9_8.h" #include "Chapter9_9.h" #include "Chapter9_10.h" +#include "Chapter9_11.h" USING_NS_CC; @@ -184,6 +185,18 @@ bool Chapter9::init() mainmenu->addChild(menuItem,2); mainmenu->setPosition(Vec2::ZERO); + // add "Test 3D Particle" + itemlabel = LabelTTF::create("Particle3D", "Arial", 24); + menuItem = MenuItemLabel::create(itemlabel); + menuItem->setCallback([&](cocos2d::Ref *sender) { + Director::getInstance()->replaceScene(Chapter9_11::createScene()); + }); + menuItem->setPosition(Vec2(origin.x+visibleSize.width/2, origin.y+visibleSize.height/2).x, + (Vec2(origin.x+visibleSize.width/2, origin.y+visibleSize.height).y - (++index) * 40)); + + mainmenu->addChild(menuItem,2); + mainmenu->setPosition(Vec2::ZERO); + // add main menu this->addChild(mainmenu, 1); diff --git a/src/chapter9/Chapter9_11.cpp b/src/chapter9/Chapter9_11.cpp new file mode 100755 index 0000000..977b935 --- /dev/null +++ b/src/chapter9/Chapter9_11.cpp @@ -0,0 +1,84 @@ +#include "Chapter9_11.h" +#include "Chapter9.h" +#include "extensions/Particle3D/PU/CCPUParticleSystem3D.h" + +USING_NS_CC; + +Scene* Chapter9_11::createScene() +{ + FileUtils::getInstance()->addSearchPath("chapter9/Particle3D/scripts"); + FileUtils::getInstance()->addSearchPath("chapter9/Particle3D/materials"); + FileUtils::getInstance()->addSearchPath("chapter9/Particle3D/textures"); + + Size visibleSize = Director::getInstance()->getVisibleSize(); + Vec2 origin = Director::getInstance()->getVisibleOrigin(); + auto winSize = Director::getInstance()->getWinSize(); + + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // create a scene + // 'scene' is an autorelease object + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + auto scene = Scene::create(); + + // add title + auto label = LabelTTF::create("Particle3D", "Arial", 24); + label->setPosition(Vec2(origin.x+visibleSize.width/2, origin.y+visibleSize.height/2).x, + Vec2(origin.x+visibleSize.width/2, origin.y+visibleSize.height).y - 30); + + scene->addChild(label, -1); + + //add the menu item for back to main menu + label = LabelTTF::create("MainMenu", "Arial", 24); + auto menuItem = MenuItemLabel::create(label); + menuItem->setCallback([&](cocos2d::Ref *sender) { + Director::getInstance()->replaceScene(Chapter9::createScene()); + }); + auto menu = Menu::create(menuItem, nullptr); + menu->setPosition( Vec2::ZERO ); + menuItem->setPosition( Vec2(origin.x+visibleSize.width - 80, origin.y + 25) ); + scene->addChild(menu, 1); + + auto layer = Layer::create(); + scene->addChild(layer); + +// //the basic example +// auto ps = PUParticleSystem3D::create("explosionSystem.pu"); +// ps->startParticleSystem(); +// layer->addChild(ps); + +// // the following is a particle with action +// auto ps = PUParticleSystem3D::create("blackHole.pu", "pu_mediapack_01.material"); +// ps->setScale(0.2f); +// ps->setPosition(-20.0f, 0.0f); +// auto moveby = MoveBy::create(2.0f, Vec2(40.0f, 0.0f)); +// auto moveby1 = MoveBy::create(2.0f, Vec2(-40.0f, 0.0f)); +// ps->runAction(RepeatForever::create(Sequence::create(moveby, moveby1, nullptr))); +// ps->startParticleSystem(); +// layer->addChild(ps); + + // the following is an example that attach a particle to a Sprite3D + auto sprite3d = Sprite3D::create("chapter9/orc.c3b"); + sprite3d->setPosition3D(Vec3(0.0f, 0.0f, 0.0f)); + sprite3d->setRotation3D(Vec3(0.0f, 180.0f, 0.0f)); + sprite3d->setScale(0.3f); + auto animation = Animation3D::create("orc.c3b"); + if (animation) + { + auto animate = Animate3D::create(animation); + sprite3d->runAction(RepeatForever::create(animate)); + } + auto handlerps = PUParticleSystem3D::create("lightningBolt.pu"); + handlerps->startParticleSystem(); + sprite3d->getAttachNode("Bip001 L Hand")->addChild(handlerps); + layer->addChild(sprite3d); + + auto camera = Camera::createPerspective(60, (GLfloat)winSize.width / winSize.height, 1.0f, 1000.0f); + camera->setCameraFlag(CameraFlag::USER1); + camera->setPosition3D(Vec3(0.0, 3, 20)); + camera->lookAt(Vec3(0.0, 0.0, 0.0), Vec3(0.0, 1.0, 0.0)); + layer->addChild(camera); + layer->setCameraMask((unsigned short)CameraFlag::USER1); + + // return the scene + return scene; +} \ No newline at end of file diff --git a/src/chapter9/Chapter9_11.h b/src/chapter9/Chapter9_11.h new file mode 100755 index 0000000..37a0f0b --- /dev/null +++ b/src/chapter9/Chapter9_11.h @@ -0,0 +1,14 @@ +#ifndef __CHAPTER_9_11_H__ +#define __CHAPTER_9_11_H__ + +#include "cocos2d.h" + +USING_NS_CC; + +class Chapter9_11 : public Ref +{ +public: + static cocos2d::Scene* createScene(); +}; + +#endif // __CHAPTER_9_11_H__ \ No newline at end of file