Download presentation
Presentation is loading. Please wait.
Published byMeghan Sherman Modified over 8 years ago
1
Portal & Particle
2
Index Portal Particles
3
Portal Room-Portal visibility system Determine which room is shown at this time Determine which object is shown at this time
4
Portal (cont.) Portal Generation By Designer Primitives NiRoomGroup NiRoom Convex Region NiRoom::Wall NiPortal Fixtures and Shell
5
Portal (cont.) Rooms Convex Region Components Walls, Fixtures, Portals if the current room is being visited then return to calling room else mark the current room as being visited for each portal in the room test the portal against the current view rectangle if the portal is visible then downsize the view rectangle to bound the portal and recursively process the adjoining room end for process the current room's fixtures mark the current room as not being visited return to calling room
6
Portal (cont.) Portals “room” to “adjoiner” Represent a way of seeing from a part of a scene graph “through” a polygon to another part of a scene graph Making “View Frustum” smaller
7
Portal (cont.) Walls
8
Portal (cont.) Fixtures Objects in a Room
9
Portal (cont.)
10
Portal (cont.) Design Strategy
11
Portal (cont.) Collision Detection Collision Detection pkRoomGroup->WhichRoom(pkObject->GetWorldBound().GetCenter())
12
Portal (cont.) Class Details NiPortal *_NDLPR NiRoom *_NDLRM NiRoom::Wall - _NDLWL NiRoomGroup *_NDLRG Sorting with accumulator, Shell NiFixtureCuller NiCullingProcess Avoid Multiple Render with Map
13
Particle System Overview NiParticleSystem NiTimeControllerNiPSysModifierNiProperty 1 * 1 * 1 *
14
Particles (cont.) World Space Particles Model Space Particles Mesh Particle Sprite-Based Particles Pools for Reusing Classes NiMeshParticleSystem NiMeshPSysData NiPSysMeshUpdateModifier
15
Particles (cont.) Modifier Order Flags enum { ORDER_KILLOLDPARTICLES = 0, ORDER_EMITTER = 1000, ORDER_SPAWN = 2000, ORDER_GENERAL = 3000, ORDER_FORCE = 4000, ORDER_COLLIDER = 5000, ORDER_POSUPDATE = 6000, ORDER_POSTPOSUPDATE = 6500, ORDER_BOUNDUPDATE = 7000 };
16
Particles (cont.) Required Modifiers ModifierDescription NiPSysAgeDeath Modifier Updates the age of each particle, killing off particles whose age exceeds their life span. Also provides an option to spawn new particles upon death. NiPSysBoundUpd ateModifier Updates the bounding volume around the set of particles. Also provides an option to skip frames between bound updates. NiPSysMeshUpda teModifier Updates mesh particles using each particle's age as the time passed into the Update call. Also initializes new particles to have the proper mesh type. Only required for mesh particle systems. NiPSysPositionMo difier Updates the position of each particle based on its velocity and the time elapsed since its last update. NiPSysRotationM odifier Updates the rotation of each particle around its rotation axis.
17
Particles (cont.) Common Optional Modifiers ModifierDescription NiPSysColorModifierChanges the color of each particle over its lifetime. NiPSysEmitterCreates new particles. NiPSysEmitter is an abstract base class for a variety of particle emitters.NiPSysEmitter NiPSysGrowFadeModifierSmoothly changes the size of each particle so that it grows or fades over its lifetime. NiPSysSpawnModifierUsed to spawn new particles using information from an existing particle.
18
Particles (cont.) Force Modifier ModifierDescription NiPSysBombModifierExerts an explosive force over a specified period of time. NiPSysDragFieldModifierExerts a drag force over some specified field. Most closely matches the drag force in Maya. NiPSysDragModifierExerts a drag force on particles. Most closely matches the drag force in 3ds max. NiPSysGravityModifierGravity force for particles with specified strength, position, and direction. NiPSysFieldModifierBase class for all field modifiers includes magnitude, attenuation and max distance
19
Particles (cont.) Force Modifiers (cont.) ModifierDescription NiPSysGravityFieldModifier Exerts a directional gravity field with specified magnitude, position and direction. NiPSysRaidalFieldModifierExerts a point gravity field with specified magnitude and position. NiPSysVortexFieldModifierExerts a rotational force around the directional axis of the vortex. NiPSysAirFieldModifierAccelerates particles up to the magnitude of the air field, creates wind, fan, or wake effects. NiPSysTurbulenceFieldModifierExerts a turbulent field force.
20
Particles (cont.) Particle Colliders NiPSysColliderManager Collection of NiPSysCollider NiPSysPlanarCollider NiPSysSphericalCollider
21
Particles (cont.) Particle System Time Controllers Time ControllerDescription NiPSysUpdateCtlrCalls UpdateSystem on the NiParticleSystem object, passing it the current time. This is what updates the particle system, so it is critical that this controller be attached to the NiParticleSystem object. It ensures when it is attached that it is the last controller that is updated, allowing the other controllers to change modifier parameters before the modifiers are updated by UpdateSystem.NiParticleSystem NiPSysEmitterCtlrIf the particle system contains an NiPSysEmitter modifier, this controller is necessary in order for any particles to be emitted. It stores animation keys for the rate of emission and for whether or not the emitter is active.NiPSysEmitter
22
QA 김종욱 freewill@nexon.co.kr
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.