state of the art cross platform shader development with fx...

35
State of the Art Cross Platform Shader Development with FX Composer 2 Ignacio Castaño Daniel Horowitz

Upload: others

Post on 08-Aug-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

State of the Art Cross Platform Shader

Development with FX Composer 2

Ignacio CastañoDaniel Horowitz

Page 2: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Agenda

FX Composer 2.0 OverviewCross-Platform Shader AuthoringProduction Pipeline IntegrationConclusionQ&A

Page 3: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

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

Page 4: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Your Requirements

Handling of complex renderingHighly customizable layout managementPowerful user interfaceShader performance profilingPlug-in based architectureScriptable

Page 5: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Flexible Render

Many API & shading language combinationsOpenGL, Direct3D, PlayStation3™, OpenGL ES*Cg, HLSL, GLSL*

Surface and fullscreen shaders

Page 6: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Improved User Interface

Customized user layouts

Show or hide panels

VC2005 docking style

Save/Load layouts

Page 7: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Improved User Interface

Page 8: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Typical FX Composer LayoutProperties

PreviewInfo, Scripting, ErrorsTextures

CodingManagement

Page 9: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

DEMO:Shader Authoring

Loading ProjectCompilingErrors and Tasks

Page 10: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

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

Page 11: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

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

Page 12: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Library View

Organize across documentsSort assets by typeVisualize Assets

ScenesEffect

Authoring

Page 13: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Effect Authoring

View effect structureTechniquesPassesParameters

Authoring using toolbars and context menus

Add childrenRemove childrenAdvanced options

Page 14: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

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

Page 15: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

DEMO:Material Authoring

Creating materialsAssigning effectsTweaking material parameters

Page 16: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

DEMO:Scene Integration

Light creationScene traversalBind light to materialRealtime manipulation

Page 17: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Shader Performance Simulation

Page 18: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Speaker Transition

Daniel Horowitz

Page 19: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Production Pipeline Integration

Scene binding expressionsAutomation via scriptingPlug-in based architectureSource control integrationProduction Pipeline Samples

Page 20: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

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

Page 21: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

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

Page 22: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

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)

Page 23: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

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:

...

Page 24: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

DEMO:Scripting

Automatic effect loading & assignment

Page 25: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Custom Plug-ins

Importers ExportersSemantic expression operatorsRendering devicesProcedural geometry generation (fins, hair, etc...)Custom authoring environment

…etc…

Page 26: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Custom Plug-ins: Sky is the limit

Page 27: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Source Control Integration

Seamless integration into source control softwareDocuments and assets reflect file-based state

Page 28: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

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

Page 29: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Pipelines: DCC centric

FXComposer

2.0

DCCApplication

Conditioner

SceneEffectLibrary

Console

GameBinary

Page 30: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Pipelines: Handheld

FX Composer 2.0 ESRemoteRender

Data Conditionerand Compiler

Host PC Target Handheld

DCC ToolsXSI, Max Maya

GameEngine

COLLADA

Page 31: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Pipelines: Engine

FX Composer 2.0

Game Importer

CgFX

GameBinary

D3D FX

COLLADA FX

Rendering Game Adapter Game Engine

GameBinary

Page 32: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

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

Page 33: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

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

Page 34: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004

Q&A

Send us emails for early alpha and beta releases

[email protected]

ThanksIgnacio Castaño ([email protected])Daniel Horowitz ([email protected])

Page 35: State of the Art Cross Platform Shader Development with FX ...developer.download.nvidia.com/presentations/2006/sig...State of the Art Cross Platform Shader Development with FX Composer

Copyright © NVIDIA Corporation 2004