parallel scene graph(psg)

12
Parallel Scene Graph(P SG) Parallel Rendering Group CAD&CG State Key Lab

Upload: shoshana-gallagher

Post on 31-Dec-2015

52 views

Category:

Documents


3 download

DESCRIPTION

Parallel Scene Graph(PSG). Parallel Rendering Group CAD&CG State Key Lab. PSG Goals. Abstract scene graph management. Support various high-level applications, especially the HLA-base simulation. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Parallel Scene Graph(PSG)

Parallel Scene Graph(PSG)

Parallel Rendering Group

CAD&CG State Key Lab

Page 2: Parallel Scene Graph(PSG)

PSG Goals

• Abstract scene graph management.• Support various high-level applications, especially

the HLA-base simulation.• Support cluster-based parallel rendering, expecial

ly the cluster architecture with large display wall.• Integrate with parallel rendering, view frustum and

occlusion culling, out-of-core data management, LODs management.

• Provide a configurable and scalable framework.

Page 3: Parallel Scene Graph(PSG)

Cluster Architechture

client01 client02

server01 server02 server32

networknetwork

server15

Note the differencewith NVSG. So problem?

支持多个客户端的仿真

支持并行绘制支持大屏幕投影

Page 4: Parallel Scene Graph(PSG)

Abstract scene graph management

High-level applicationHigh-level application

PSGPSG

OpenGLOpenGL DirectXDirectX

Graphics hardwareGraphics hardware

Page 5: Parallel Scene Graph(PSG)

Interface to high-level application

SimulationApplication

SimulationApplication

PSGPSG

WalkthroughApplication

WalkthroughApplication

EntertainmentApplication

EntertainmentApplication

SimulationInstantiation

SimulationInstantiation

SimulationEnvironment

SimulationEnvironment

PSGPSG

SimulationInstantiation

SimulationInstantiation

SimulationEnvironment

SimulationEnvironment

(our scheme) (another scheme)

把仿真环境建立在PSG 上的,为了重用部分数据结构,HLA 更新数据和状态, PSG 则根据状态绘制数据,实现采用类的继承,由 HLA 继承 PSG中的基类。

Page 6: Parallel Scene Graph(PSG)

PSG treePSG

TreeRoot

PSGTreeRoot

PSGStaticNode

PSGStaticNode

PSGDynamicNode

PSGDynamicNode

PSGTreeNode

PSGTreeNode

PSGTreeNode

PSGTreeNode

PSGTreeNode

PSGTreeNode

PSGTreeNode

PSGTreeNode

PSGModelFile

PSGModelFile

PSGModelFile

PSGModelFile

地形、海面地形、海面 树木、建筑树木、建筑

PSGTreeNode

PSGTreeNode

PSGModelFile

PSGModelFile

PSGModelFile

PSGModelFile

飞机、坦克飞机、坦克 潜艇潜艇

Page 7: Parallel Scene Graph(PSG)

PSG tree meta data

PSGTreeRoot

PSGTreeRoot

PSG 场景树的根节点,遍历入口点,通过它可以遍历到场景中的每个模型,或更新其状态,或对其进行绘制。

PSGStaticNode

PSGStaticNode

PSGDynamicNode

PSGDynamicNode

PSGTreeNode

PSGTreeNode

PSGModelFile

PSGModelFile

PSG 场景树仅含有一个此静态节点,直接挂在根节点下,维系场景中的静态模型层次结构。

PSG 场景树仅含有一个此动态节点,直接挂在根节点下,维系场景中的动态模型层次结构。

PSG 场景树的中间节点,或表示一个模型组(子节点为 TreeNode ),或表示单个模型(子节点为 ModelFile )。

PSG 场景树的叶节点,对应一个模型文件,存储模型几何数据,可以被多个 TreeNode 引用,场景树变成场景图。

Page 8: Parallel Scene Graph(PSG)

PSG tree geometry

PSGTreeNode

PSGTreeNode

PSGModelFile

PSGModelFile

PSGModelObject

PSGModelObject

包含模型组信息:模型组全局标识符,模型组局部坐标框架,其父模型组指针,所有子模型组指针或子模型文件指针(二选一有效)。一个 TreeNode 最多对应一个 ModelFile ,但一个 ModelFile 可以对应多个 TreeNode 。

包含模型文件信息:模型文件全局标识符,模型文件被引用计数器,所有子模型物体指针,模型包围盒。一个 ModelFile 可以对应多个 ModelObject ,但一个 ModelObject 只对应一个 ModelFile 。 ModelFile 指现实中的一个物体, ModelObject 指物体中的一个部件。

n

1

1

n包含模型部件信息:模型部件局部坐标框架,模型部件顶点列表,模型部件三角面片列表,模型部件包围盒。

Page 9: Parallel Scene Graph(PSG)

PSG tree traverser将遍历器从场景树中分离的好处:( 1)仿真环境与绘制环境分离,仿真环境可以继承并修改自己需要的

遍历器,方便的根据仿真结果修改模型状态;并行绘制则根据绘制的需要拥有自己的遍历器,遍历场景并绘制。

( 2)提供更方便的二次开发能力, PSG tree 可以继承和修改,如果需要访问修改后的数据(特别是增加的数据结构),则继承基本遍历器并修改其对每个元数据的访问方式即可。

( 3)将实现与数据结构分离,若用 OpenGL 绘制,则将绘制语句封装在GL traverser 中;若用 DirectX 绘制,则其封装在 DX traverser 中。

simutraverser

simutraverser

GL rendertraverser

GL rendertraverser

PSG tree

DX rendertraverser

DX rendertraverser

Page 10: Parallel Scene Graph(PSG)

文件名

Interaction with simulation仿真应用仿真应用 仿真环境仿真环境 PSGPSG

状态信息

绘制请求

创建场景创建场景

仿真仿真

更新场景更新场景

创建 SG加载文件创建 SG加载文件

更新场景更新场景

显示场景显示场景 并行绘制并行绘制

Page 11: Parallel Scene Graph(PSG)

PSG modules

Parallel Rendering Engine

Rendering moduleRendering module

Culling moduleCulling module

File manager moduleFile manager module

Camera moduleCamera module

绘制资源管理和调度、并行绘制控制、场景树的管理

视锥剔除、遮挡剔除

对 ModelFile/ 纹理进行 disk/ main memory/video memory 三个层次的 out-of-core 管理

Lighting moduleLighting module

Page 12: Parallel Scene Graph(PSG)

PSG rendering pipeline

Culling

File manager

Parallel rendering

Video memory

DiskMain

memoryGraphics hardware