12 第1页 | 共2 页下一页
返回列表 发新帖
查看: 2296|回复: 15
打印 上一主题 下一主题

[其它] A Parallel Constraint Solver for a Rigid Body Simulation

[复制链接]

797

主题

1

听众

1万

积分

资深设计师

Rank: 7Rank: 7Rank: 7

纳金币
5568
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

跳转到指定楼层
楼主
发表于 2012-1-5 08:23:45 |只看该作者 |倒序浏览
1 Introduction

Rigid body simulations are used often in games. Because of the

computational cost, a large scale simulation is not feasible in real

time. However, with the increased performance of GPUs, achieving

a larger-scale simulation in real time becomes more realistic. A

rigid body simulation is too complicated to implement on the GPU

in a straightforward manner. One of the challenges is implementing

an efficient constraint solver. A projected Gauss-Seidel method is

often used to solve constraints [Catto 2005]. The input and output

of the solver are the velocity of rigid bodies. However, constraints

sharing a body cannot be solved in parallel because of this data

dependency. This is a challenge when a GPU is used for a rigid

body simulation. A solution to solve constraints in parallel is to

split them into groups of constraints called batches. In a batch, no

body is shared among constraints, so they can be solved in parallel.

An introduction of batch solves the problem of constraint solving,

but batch creation itself is a serial process. To complete a rigid body

simulation pipeline on the GPU, batch creation on the GPU is also

necessary.

We present a method to create batches and solve constraints in parallel

on the GPU. Our batch creation is a two-step process: global

split followed by local batch creation. Global split separates the

constraints into constraint groups. In local batch creation, a SIMD.

(a GPU consists of SIMD engines, or SIMDs, each of which has a

wide SIMD, (e.g., an ATI FireProTMV8800 has 20SIMD engines,

each of which has 64 SIMD lanes)) processes a constraint group efficiently

without doing any global synchronization. The batch creation

has a good memory access pattern because it does most of the

random memory accesses to fast on-chip local data share (LDS).

The constraint solver also assigns a constraint group for a SIMD.

Advantages of this approach not only minimize global communication,

but also localize the computation that can improve the cache

hit rate. Our constraint solver moves some dispatch work that had

to be done by the CPU to the GPU, which reduces the dispatch

overhead on the CPU.

e-mail: takahiro.harada@amd.com

2 Method

2.1 Global Split

At first, constraints are split into disjoint constraint groups, each

of which can be processed in parallel on a SIMD. However, it is

not possible to remove all the dependency between groups. An example

is a chain in which all the constraints are connected. For

this situation, constraints cannot be split into disjoint groups. Our

approach is to create sets of constraint groups. A set has several

constraint groups, which do not have dependency among groups,

but constraints in different sets can have dependency (Fig. 2). To

divide constraints into groups, a spatial split is used. The simulation

space is diced into grids and constraints are assigned for a cell. After

the split, non-adjacent cells do not share constraints, so they can

be processed in parallel. Constraints in each cell make up a constraint

group. Because we used two-dimensional split, the cells or

the constraint groups are split into four independent sets, which are

solved in four steps. Solving a constraint group is an independent

job processed in parallel. On a GPU, a SIMD processes a constraint

group. However there can be dependency on constraints in a group:

they cannot be processed in parallel on a wide SIMD architecture

although they can be solved directly on a multi-core CPU. Local

batch creation solves the issue.

Implementation Global split is performed by calculation of a cell

index for each constraint followed by a radix sort, which sorts constraints

by cell indices. Then the sorted constraints are scanned

to obtain offsets for constraint groups for each cell and number of

constraints in each group
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

797

主题

1

听众

1万

积分

资深设计师

Rank: 7Rank: 7Rank: 7

纳金币
5568
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

沙发
发表于 2012-1-13 11:38:06 |只看该作者


回复

使用道具 举报

1023

主题

3

听众

359

积分

设计实习生

Rank: 2

纳金币
335582
精华
0

最佳新人

板凳
发表于 2012-1-22 23:30:49 |只看该作者
开开心过大年,亲朋好友聚一起,一年抽劳放一边,喝点小酒真高兴,酒后可千万不能开车,那样可不安全,祝平安幸福!2012新年祝福
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

地板
发表于 2012-1-29 23:22:21 |只看该作者
万事胜意,合家幸福,人强马壮,心想事成,顺理成章 步步高升。
回复

使用道具 举报

462

主题

1

听众

31万

积分

首席设计师

Rank: 8Rank: 8

纳金币
2
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

5#
发表于 2012-2-21 23:24:36 |只看该作者
水……生命之源……灌……
回复

使用道具 举报

   

671

主题

1

听众

3247

积分

中级设计师

Rank: 5Rank: 5

纳金币
324742
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

6#
发表于 2012-3-7 23:25:26 |只看该作者
頂。。。
回复

使用道具 举报

   

671

主题

1

听众

3247

积分

中级设计师

Rank: 5Rank: 5

纳金币
324742
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

7#
发表于 2012-3-16 23:22:05 |只看该作者
人过留名!
回复

使用道具 举报

5969

主题

1

听众

39万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

8#
发表于 2012-3-27 23:27:58 |只看该作者
响应天帅号召,顶
回复

使用道具 举报

5969

主题

1

听众

39万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

9#
发表于 2012-4-1 23:20:41 |只看该作者
佩服,好多阿 ,哈哈
回复

使用道具 举报

462

主题

1

听众

31万

积分

首席设计师

Rank: 8Rank: 8

纳金币
2
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

10#
发表于 2012-4-18 23:21:34 |只看该作者
提醒猪猪,千万不能让你看见
回复

使用道具 举报

12 第1页 | 共2 页下一页
返回列表 发新帖
您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2025-8-5 06:57 , Processed in 0.102671 second(s), 29 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部