state of the art cross platform shader development with fx...
Post on 08-Aug-2020
7 Views
Preview:
TRANSCRIPT
State of the Art Cross Platform Shader
Development with FX Composer 2
Ignacio CastañoDaniel Horowitz
Copyright © NVIDIA Corporation 2004
Agenda
FX Composer 2.0 OverviewCross-Platform Shader AuthoringProduction Pipeline IntegrationConclusionQ&A
Copyright © NVIDIA Corporation 2004
FX Composer 2.0What and Who?
What is it for?Shader Authoring IDEDebugging and ProfilingScene IntegrationAsset Management
Who is it for?Graphics ProgrammersTechnical DirectorsTechnical ArtistsArtists
Copyright © NVIDIA Corporation 2004
Your Requirements
Handling of complex renderingHighly customizable layout managementPowerful user interfaceShader performance profilingPlug-in based architectureScriptable
Copyright © NVIDIA Corporation 2004
Flexible Render
Many API & shading language combinationsOpenGL, Direct3D, PlayStation3™, OpenGL ES*Cg, HLSL, GLSL*
Surface and fullscreen shaders
Copyright © NVIDIA Corporation 2004
Improved User Interface
Customized user layouts
Show or hide panels
VC2005 docking style
Save/Load layouts
Copyright © NVIDIA Corporation 2004
Improved User Interface
Copyright © NVIDIA Corporation 2004
Typical FX Composer LayoutProperties
PreviewInfo, Scripting, ErrorsTextures
CodingManagement
Copyright © NVIDIA Corporation 2004
DEMO:Shader Authoring
Loading ProjectCompilingErrors and Tasks
Copyright © NVIDIA Corporation 2004
Project Explorer
Manage multiple documents
Documents contain multiple assets
Assets are effects, materials, meshes, and other scene elements
Organize you assetsMove, copy, delete, renameDrag and dropOne or many documentsEffect Libraries
COLLADA
Copyright © NVIDIA Corporation 2004
Open asset exchange format (.dae)
Governed by the Khronos GroupIncludes numerous ISVs and IHVsMature DCC plugins for extensive support
Supported by FX Composer 2Import & ExportSupports effects and materialsFacilitates asset exchange with DCC appsOther file formats supported
Copyright © NVIDIA Corporation 2004
Library View
Organize across documentsSort assets by typeVisualize Assets
ScenesEffect
Authoring
Copyright © NVIDIA Corporation 2004
Effect Authoring
View effect structureTechniquesPassesParameters
Authoring using toolbars and context menus
Add childrenRemove childrenAdvanced options
Copyright © NVIDIA Corporation 2004
CgFX & COLLADA FX Cg
CgFXHand codedLess user interface assistance
COLLADA FX for Cg authoringMost user friendly experienceFully editable via user interfaceCan migrate your CgFX assetsLess hand coding
Zero XMLCg, GLSL only when writing the GPU shader code
Copyright © NVIDIA Corporation 2004
DEMO:Material Authoring
Creating materialsAssigning effectsTweaking material parameters
Copyright © NVIDIA Corporation 2004
DEMO:Scene Integration
Light creationScene traversalBind light to materialRealtime manipulation
Copyright © NVIDIA Corporation 2004
Shader Performance Simulation
Copyright © NVIDIA Corporation 2004
Speaker Transition
Daniel Horowitz
Copyright © NVIDIA Corporation 2004
Production Pipeline Integration
Scene binding expressionsAutomation via scriptingPlug-in based architectureSource control integrationProduction Pipeline Samples
Copyright © NVIDIA Corporation 2004
Scene binding expressions
float4 LightPos : Position<
string Object = "PointLight";string Space = "Object";
> = {-10.0f, 10.0f, -10.0f, 0.0f};
Semantic
Annotations
Copyright © NVIDIA Corporation 2004
Custom Semantics and Annotations
1 :<RemappedSemantic name="myWorldView">2 : <MatrixMultiply description="World * View">3 : <input type="internalsemantic" value="world"/>4 : <input type="internalsemantic" value="view"/>5 : </MatrixMultiply>6 :</RemappedSemantic>
Hook parameter to scene and system dataExpressions via xml configuration fileExtensive Library of Operators
dot & cross products, mux, demux, matrix ops, ...Custom operators
Built from XML using operatorsVia plug-in
Copyright © NVIDIA Corporation 2004
Automation Via Scripting
Automatic assignment of Materials to geometryShader parameters to scene objects (nearest lights, cameras, etc...)A model’s accessories to attachment points
Common-tasks toolbar (ala Maya/MEL)
Copyright © NVIDIA Corporation 2004
Automation Via Scripting
#Python scripting
# Convert any Possible Profile to COLLADA FXdef ConvertToCOLLADA():
effects = FXRuntime.Instance.Library.FindLibraryItems(FXEffect)for effect in effects:
for profile in effect.Profiles:if profile.CanConvertToColladaFX() == True:
profile.ConvertToColladaFX()
# Create an effectdef bindMMM():
CmdGroupBegin.Do("script: assign cgfx files to MMM ")
SelectRenderPort("OpenGL")ForceRedraw()
CmdGroupEnd.Do()
# get the cgfx files to assign to MMM
files = FXEffectUtils.GetEffectFiles()for pathname in files:
...
Copyright © NVIDIA Corporation 2004
DEMO:Scripting
Automatic effect loading & assignment
Copyright © NVIDIA Corporation 2004
Custom Plug-ins
Importers ExportersSemantic expression operatorsRendering devicesProcedural geometry generation (fins, hair, etc...)Custom authoring environment
…etc…
Copyright © NVIDIA Corporation 2004
Custom Plug-ins: Sky is the limit
Copyright © NVIDIA Corporation 2004
Source Control Integration
Seamless integration into source control softwareDocuments and assets reflect file-based state
Copyright © NVIDIA Corporation 2004
ConsolePCMAC
Pipelines: FXC2 centric
FX Composer 2.0
COLLADA Scene with FX
COLLADADCC
Geometry
Conditioners and Compilers
GameBinary
Effects
GameBinary
GameBinary
Copyright © NVIDIA Corporation 2004
Pipelines: DCC centric
FXComposer
2.0
DCCApplication
Conditioner
SceneEffectLibrary
Console
GameBinary
Copyright © NVIDIA Corporation 2004
Pipelines: Handheld
FX Composer 2.0 ESRemoteRender
Data Conditionerand Compiler
Host PC Target Handheld
DCC ToolsXSI, Max Maya
GameEngine
COLLADA
Copyright © NVIDIA Corporation 2004
Pipelines: Engine
FX Composer 2.0
Game Importer
CgFX
GameBinary
D3D FX
COLLADA FX
Rendering Game Adapter Game Engine
GameBinary
Copyright © NVIDIA Corporation 2004
FX Composer 2.0 Alpha 5
Alpha5 release ETA end of summer ’06Document and asset managementCOLLADA FX authoringShader parameter scene bindingCustom semantic and annotation supportPython scriptingShader performanceAvailable to Sony PS3 developers and limited partners
Beta release ETA end of fall ’06Open to public
Copyright © NVIDIA Corporation 2004
Conclusion
Next-generation of shader IDE is on its wayProduction-ready with powerful featuresNVIDIA is closely working with Khronos and others to deliver a professional-grade authoring tool
Copyright © NVIDIA Corporation 2004
Q&A
Send us emails for early alpha and beta releases
fxcomposer@nvidia.com
ThanksIgnacio Castaño (icastano@nvidia.com)Daniel Horowitz (dhorowitz@nvidia.com)
Copyright © NVIDIA Corporation 2004
top related