1 / 37

breezEngine

Devmania 2009. breezEngine. Tobias Zirr. Architecture. Languages & Libraries. C++ HLSL / FX C++/CLI C# DirectX 9 Assimp PhysX TinyXml zLib libPNG .NET Framework 2.0. Modules & Responsibilites. Modules & Responsibilites. Prototype. More on that in a moment. Design Goals.

ilandere
Download Presentation

breezEngine

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Devmania 2009 breezEngine Tobias Zirr

  2. Architecture

  3. Languages & Libraries • C++ • HLSL / FX • C++/CLI • C# • DirectX 9 • Assimp • PhysX • TinyXml • zLib • libPNG • .NET Framework 2.0

  4. Modules & Responsibilites

  5. Modules & Responsibilites Prototype More on that in a moment

  6. Design Goals breeze • Simple structure & intuitive interface • Minimal effortwhenincorporatingnewlydevelopedcomponents • Comprehensivecollectionofhighly flexible conceptsservingdevelopersas a frameworkProperties, Controllers, Synchronization, Animation, Entities, Entity Nodes, Effect Binders, Renderables, Lights, Scene Nodes, MeshBuilders…

  7. Effect Framework

  8. Material Management • Once upon a time… • typedefstructD3DMATERIAL9 { D3DCOLORVALUE Diffuse; D3DCOLORVALUEAmbient; D3DCOLORVALUESpecular;D3DCOLORVALUEEmissive;float Power;} D3DMATERIAL9, *LPD3DMATERIAL9; • Wheretoputnew material properties?

  9. Material Management • Material propertymanagementoptions • Variousdistinctdatastructures per shader (group)

  10. Selectiveapplicationofshaders Pioneerproject Specificshader FFP Specificshader

  11. Selectiveapplicationofshaders Pioneerproject Hard-codedspecialdatastructure

  12. Material Management • Material propertymanagementoptions • Various distinct data structures per shader (group) • Enhanced „über“ datastructureselectivelyboundby multiple overlappingshaders (shadergroups)

  13. FFP/Shader mix Pioneerproject Default datastructure Additional texturedata Additional constantdata

  14. Material Management • Material property management options • Various distinct data structures per shader (group) • Enhanced „über“ data structure selectively bound by multiple overlapping shaders (shader groups) • Dynamic datastructures • Nohard-codeddatawhatsoever • „Tweakables“ areloadedfromtherespectiveeffectfilesatruntime, resulting in totally individual datastructuresforeachshader

  15. Compatibility • In manyplaces, FFP compatibilityrequires multiple render paths • In a pure shaderenvironment, dynamicmaterialsofferbothmaximumflexibilityand optimal handlingatthe same time • With FFP legacydropped, therendering API turned out substantiallyslimmer

  16. Compatibility • In manyplaces, FFP compatibilityrequires multiple render paths • In a pure shaderenvironment, dynamicmaterialsofferbothmaximumflexibilityand optimal handlingatthe same time • With FFP legacydropped, therendering API turned out substantiallyslimmer if(shaderModel < 2) throw „Go buy a newcomputer!“;

  17. Live Demo Material Tweaking

  18. Rendering Pipeline

  19. Rendering Pipeline

  20. Render Tree Constructedeveryframeanew!

  21. Global Pipeline Passes

  22. Effect Binders

  23. Effect Binders

  24. Live Demo Post Processing

  25. Shader Library

  26. The Permutation Problem • Importantpivotalpoints • Transformation • Simple Rendering • Instanced Rendering • GPU-side Animation • Lighting • Multiple lightsin arbitrarylight type combinations • Shadows & projectedtextures (on / off) • Material • Albedo, normal und reflectiontextures • Manifoldvariationsof different lightingmodels

  27. The Permutation Problem • Possibleapproaches • Über/Super shaders • StaticBranching • Pre-compilationof all referencedcombinations • Inferred (/ Deferred) Lighting • Optimal separationbetweentransformation, lightingand material makespre-compilationof multiple combinationssuperfluous • Usedby well-knowncompanies:„ The combination of deferred lighting and this technology [= ubershaders & material layers] allows CryENGINE® 3 to avoid the traditional shortcomings of UberShaders alone.” – CryENGINE 3 Specifications, Crytek.com • Dynamic ShaderLinkage • DirectX 9 Fragment Compiler • DirectX 11 Interfaces

  28. The Permutation Problem • A Super Shadercompromise • Material ashighestcriterionof order • Possiblecombinationsoflighttypesaredefinedasseparate passesandmarkedaccordinglybytheshaderdevelopertoenableEffect Binders tochoosetherightpassesatruntime • Transformation isperformedby a centralbaseclassthatknows all thetransformationtypesrequiredbyspecificentities, similartothe super shadertech-nology Classesand Interfaces areavailable in HLSL since November 2008 (even in DirectX 9)

  29. A Super ShaderCompromise • Benefitsofthecomprimise • Selectionofshaders intuitive, beingequivalentwithchoosing an object‘s material • Administration effortreducedfrom 3 to 2 pivotalpoints • Lean shaders due to elegant abstractionusingthenew HLSL languagefeatures • Caveatsofthecompromise • Complexityonlyreduced on thesurface, in effect all permutations still needtobepre-compiled

  30. Scene Management

  31. Scene Management • Scene classesperformnothing but simple frustumculling • Noinformation on thestructureofthescene • Specializationrealized via implementationofthe Scene Nodeinterface • Landscapesusuallyalreadymaintainquadtreesbythemselves • Portal/sectorsystem in a separate Scene Node

  32. Simulation

  33. Simulation / Synchronization

  34. Live Demo Amsterdam Physics

  35. Live Demo Ghosts

  36. Questions

  37. http://www.alphanew.net/

More Related