《从CPU粒子系统的交付中吸取的经验教训.pdf》由会员分享,可在线阅读,更多相关《从CPU粒子系统的交付中吸取的经验教训.pdf(52页珍藏版)》请在三个皮匠报告上搜索。
1、Lukas Feller Graphics Programmer Last year Fog,this year VFX:)Enshrouded VFX System Existing system showed its age Entirely new VFX system Designed in close collaboration with the VFX artistsEnshrouded VFX System Fully GPU driven Natural choice nowadays Enshrouded has a GPU driven renderer Reuse dat
2、a which is on the GPU alreadyEnshrouded VFX System Standard HLSL for scripting Custom scripting language was a maintenance&support burden Well known Lots of existing resources&tooling Maximum freedom for the artist Freely import Textures&Meshes From Houdini,EmberGen&othersOverview Particles Define b
3、ehavior Effects Combine particles ParameterizeParticleParticleParticleEffectEffectParticleParticleParticleEffectEffectParticle State Persistent Parameters Evaluated every frame HLSL code Single function which is executed once per frame per particleParticleParticleParticleEffectEffectParticle Data St
4、ate,Parameters Types:Float,Int,UInt,Bool,2,3,4 Model,Mesh,Image,Sound EmitterParticleParticleParticleEffectEffectParticle Code Single HLSL function Called once per frame per particle Extensive API to sample data and generate output Return value:still alive?bool updateParticle(inout VfxParticleState
5、state,VfxParticleParameters parameters,VfxEffectData effect,VfxEngineData engine,bool isNew)Generated HLSL structs for state¶metersstruct VfxParticleStatefloat timer;float age;float ageNormalized;float alpha;float brightness;ParticleParticleParticleEffectEffectOverview Particles Define behavior
6、Effects Combine particles ParameterizeParticleParticleParticleEffectEffectParticleParticleParticleEffectEffectEffect Data Instantiated by the game for a VFX Hierarchy of particles Parents can spawn children Defines order of execution Define values or expressions for particle parametersParticlePartic