我要发帖 回复

高级会员

13

主题

1819

积分

0

专家分

:

私信
发表时间 : 2006-9-4 17:05:10 | 浏览 : 4279    评论 : 25
最近在学习Vega-DIS,找到一个较好的英文说明,顺手翻译了一下。
初学中,有不合适的地方请高手指点。

最近VR访客

xibalba 评论于2006-9-4 17:05:43
步骤1:调用LynX
NT
        打开LynX
IRIX
        打开winterm,在命令行键入lynx。
步骤2:关掉不必要的模块
在创建DIS前要关掉不必要的模块, 在文件下拉框选"Active Modules",关掉所有的不用的活动模块。
步骤3:创建战场
在图标栏选object图标,选择new,命名town。
分配模型:
NT:
路径为c:\program files\paradigm\Vega\sample\data\Vega\testdb.flt
UNIX:
路径为/usr/local/PSI/demo/testdb.flt
在对象面板上对地形选择碰撞检测,选择Object Isector Class按钮。选择Override选项,建立检测类选择所有的terrain 复选框(从1-8)。
给town分配DIS属性。
点击objects下拉框,选择"Inbound Template Entity Information":如果不选所有的复选框,目标不会发送任何PUD消息。
关掉对话框,存储ADF命名为DISPlayer1.adf。
xibalba 评论于2006-9-4 17:06:22
步骤4:配置局域对象

objects下拉框选New并命名my tank。
在?中选择
NT
c:\program files\paradigm\Vega\sample\data\Vega\tank_m1.flt路径
UNIX:
/usr/local/PSI/demo/tank_m1.flt路径
选择options-> Coordinate System为“Dynamic”,
给局部对象分配DIS属性
使实体栏中my tank处于高光(选择)状态
objects下拉框选择"Inbound Template Entity Information"
取消所有选择框选择,之后这个对象只会作为局部对象
关闭对话框
注意:NT中内部对象信息模块对话框是tab
选择标签Vega,使my tank 高光
objects下拉框选择""Outbound Entity Information "选择“Enable for Sending”
设置Dead Reakoning 为 Rot/ConstPosRate/WorldCoords
设置Entity Type 如下:Kind: Platform、Domain: Land其他参数为0,
关闭对话框。
注意:NT的Outbound Template Entity Information对话框是tab,请选择标签Vega。
Objects下拉框选择"Outbound Entity Appearance"
标记文本系统分配名字如‘player 1’,关闭对话框。存储Vega。

步骤5:配置内进实体

objects下拉菜单选New,命名“inbound tank”,分配地址
NT:
c:\program files\paradigm\Vega\sample\data\Vega\tank_m1.flt 路径
UNIX:
/usr/local/PSI/demo/tank_m1.flt 路径
设置Coordinate System为 “Dynamic”.使“inbound tank”处于被选择状态。
Objects下拉菜单选择"Inbound Template Entity Information".
选择标签: “Enable for Receiving”
Entity Type设置如下:
Kind: Platform
Domain: Land
所以参数为0.关闭对话框。
Objects 下拉菜单选择"Outbound Entity Information". 所有选框均不选,这样对象仅为"Inbound Template Entity" 使用. 它被认为是一个 "remote entity"-远方实体.
xibalba 评论于2006-9-4 17:06:59
步骤6:在场景中安置对象物

进入场景面板,点击左向箭头将会显示类中所有对象物,将"town " 和"my tank"添加到场景中,inbound tank不用你自己动手添加到场景,因为DIS将会将该坦克和PDU一起引入。

步骤7:创建地面物体运动的碰撞检测

进入Isector面板
创建Isector并命名"driving"
设置Z offset为0.1
设置target 为“Object”、 Object 为“town”、 method 为"tripod".
进入" Isector Class"面板,如同默认,选择所有的terrain框。存储。

步骤8:使用的运动模式

进入Motion Models面板
定义Initial position为(1000, 1000, 0, 0, 0, 0),Motion Model Type为“Drive”。
设置Motion Model Type为“Drive”能最好的控制坦克运行。
点击 isector选项左键头选择 "driving"。存储。

步骤9:创建运作坦克

进入Players面板,创建名为"tank driver"的Players。
使用" my tank"为演示者,在object框处点击左键头,所有的object显示在列表中,选择" my tank"并点击OK。
设置“Positioning Method” 为 “Motion Model”,并点击下方Enable,使之被选择。Enable下方选择Default。将tank缚在tank driver上,此步骤是必不可少的,现在tank driver也捆绑在仿真运动motion model上了。无论motion model在哪里,tank都会随行,motion model由鼠标控制。
左鼠加速,右鼠减速,中鼠停止。
xibalba 评论于2006-9-4 17:07:38
步骤10:对坦克驱动加一个观测者

进入Observers面板,改变“Positioning Method”的值由默认的"Motion Model" 到 "Tether Follow"。player下拉框中选择tank driver,这样"tank driver"就缚在观测者上了。
设置Offset为 (0, -25, 5),存储。

步骤11:完成发送与接受PDU的计算机配置

进入DIS面板,设置“Protocol” 为 “DIS”、“Status”为 “Send and Receive”
主机host的值是任意的,本练习使用 ‘111’。
每台机子必须由唯一的Host ID, 来保证在仿真过程中每台机子都能连上。
选择Display Entity Markings, Scene 选择"Default" 。存储。
现在使用"DIS Active Preview"预览本练习的运行。
你能够看到你的坦克。

步骤12:创建player2.adf

拷贝 DISplayer1.adf 到 DISplayer2.adf
进入文件下拉框
选择“Save As” 重命名为 “DISplayer2.adf”
把 “DISplayer2.adf”进行下列修正
进入DIS面板。
Host :因为是第二个演示者,设置host值为222。存储。
注意:没有演示者必须有不同的host值,这样再运行中才能观测。
进入“Object”面板,列表框中选择 my tank
Objects下拉框中选择"Outbound Entity Appearance"
Markings中设置Marking Text:命名为‘player 2’
关闭对话框,存储DISplayer2.adf。.
进入Motion Models面板,设置Initial/Reset position 为(1000, 1050, 0, 180, 0, 0)
观测运行,分别对DISplayer1.adf、DISplayer2.adf使用 "DIS Active Preview"预览。
你能够看到演示者1和演示者2都在DIS Active Preview 中。
xibalba 评论于2006-9-4 17:07:51
概要:
这个文档说明开始Vega DIS的一个初始设置。想对DIS有更详细的了解请看:
NT:
C:\program files\paradigm\vega\sample\vgDis\wargame.
拖动 wargame.adf 到wargame.exe上
拖动wargame_pl2.adf 到wargame.exe上
IRIX
/usr/local/PSI/sample/wargame
键入‘tank wargame.adf’再命令行
打开第二个winterm 键入 “tank wargame_pl2.adf” 再命令行
支持的快捷键:
“l” –炮塔左转
“r” – 炮塔右转
“u” –炮筒升高
“d” –炮筒降低
“F” -开火
如果你是内部演示者而且被导弹击中,坦克会燃烧!你的坦克就会从原来完好的状态改变成被破坏掉的外形。
有任何问题请连接MPI技术支持:e-mail vega@multigen-paradigm.com
xibalba 评论于2006-9-4 17:10:39
说明:
这个演示说明了在你的网络上创建一个简单的DIS应用来发送接受数据单元协议的全过程。
基本的步骤如下:1、创建对象   2、对每个DIS配置属性
主要的DIS组成由:内进实体信息模块,外出实体信息模块和外部实体。
内进实体信息模块用来定义坦克的力量和类型,对模块对象物来说坦克是在地图中使用的特殊坦克。当对象被最好的匹配定义后,它将自动的拷贝并增加到DIS-HLA场景中。
外出实体模块消息对话包含联合任何Vega对象的外部网络实体的信息。
外出实体定义了外部实体在播放中的内部状况。
无论指南适用于何种主题,DIS都支持Munitions地图,外部地图,清晰度地图特征。
xibalba 评论于2006-9-4 17:13:09
原英文资料:

Prerequisites:
Successful completion of LynX Tutorial.
Introduction:
This exercise will demonstrate all the necessary steps to create a simple DIS application to sendand receive Protocol Data Units (PDUs) over your network.
The basic steps are 1) create your objects 2) configure DIS attributes for each object:
The main DIS components are :Inbound Template Entity Information, Outbound Entity Information and Outbound Entity Appearance.
Inbound Template Entity Information is used to define the force and type for the tank which will be used to map a specific tank to this template object. When the object is determined to be the best match, it will be copied and added to the DIS-HLA scene automatically.
Outbound Entity Information dialog contains information regarding the outbound network entity which may be associated with any Vega object.
Outbound Entity Appearance determines the initial state of the outbound entity when it is broadcast.
Munitions mapping, appearance mapping, and articulation mapping features are also supported by DIS, however those subjects are out of the scope of this tutorial.
Please see the example code and the Vega Options Guide for more details regarding these features.
Tutorial:
Step 1: Invoke LynX
NT
Start Æ Program FilesÆVegaÆ LynX
IRIX
Open a winterm
Type ‘lynx’ on the command line.
Step 2:Turn off unnecessary modules
Before you begin creating your DIS application, let's turn off all
add-on modules that will not be used for this exercise.
Under the File pull down menu, choose "Active Modules". Turn everything off "except" the following add-on modules:
Vega 3.X
DIS/HLA
Base3.X
Step 3: Create the battlefield.
From the Icon Column, select the ‘object’ icon
From the object’s pull down menu select ‘New’
When prompted name the object ‘town’
Assign :
NT:
c:\program files\paradigm\Vega\sample\data\Vega\testdb.flt as the geometry file
UNIX:
/usr/local/PSI/demo/testdb.flt as the geometry file
Assign isector bit mask for terrain mapping On the Objects panel, select the button called "Object Isector Class".
After selecting the Override Option, set the Isector class with all "terrain bits" turned "on" ( terrain bits 1-8).
Assign DIS attributes to the town.
Under the Objects pull down menu, select the "Inbound Template Entity Information".
Disable all check boxes, since this object will be used only by you, (no PDU's need to be sent for the "terrain").
Close this dialogue box.
Under the Objects pull down menu select the “Outbound Template Information:
Disable all check boxes, since this object will not send any PDUs either.
Close this dialog box
Save your ADF as DISPlayer1.adf
Step 4: Configure your local entity:
From the object’s pull down menu select “New”
When prompted name the object “my tank”
Assign :
NT:
c:\program files\paradigm\Vega\sample\data\Vega\tank_m1.flt as the geometry file
UNIX:
/usr/local/PSI/demo/tank_m1.flt as the geometry file
Set the Coordinate System to “Dynamic”
Assign DIS attributes for your local entity
High light “my tank” in the entity list.
Under the Objects pull down menu, select the "Inbound Template Entity Information" Option.
Disable all check boxes, since this object will be used only a local entity.
Close this dialogue box.
NOTE: On NT, the Inbound Template Entity Information dialog box is a “tab”.
When you have made you selections, please select the tab labeled “Vega”.
Highlight “my tank”
Under the Objects pull down menu, select the "Outbound Entity Information".
Check the “Enable for Sending” box
Set the Dead Reakoning to Rot/ConstPosRate/WorldCoords.
Under the Entity Type set the following:
Kind: Platform
Domain: Land
All other values leave at the Default, 0.
Close this dialogue box.
NOTE: On NT the Outbound Template Entity Information dialog box is a “tab”.
When you have made you selections, please select the tab labeled “Vega”.
Under the Objects pull down menu, select the "Outbound Entity Appearance".
Marking Text : Assign an intuitive name i.e. ‘player 1’
Close this dialogue box.
NOTE: On NT the Outbound Entity Appearance dialog box is a “tab”.
When you have made you selections, please select the tab labeled “Vega”.
Save Your ADF!
Step 5: Configure your inbound template:
From the object’s pull down menu select “New”
When prompted name the object “inbound tank”
Assign :
NT:
c:\program files\paradigm\Vega\sample\data\Vega\tank_m1.flt as the geometry file
UNIX:
/usr/local/PSI/demo/tank_m1.flt as the geometry file
Set the Coordinate System to “Dynamic”.
Configure your inbound template for DIS
Highlight “inbound tank”
Under the objects pull down menu, select "Inbound Template Entity Information".
Select the box labeled : “Enable for Receiving”
Under the Entity Type set the following:
Kind: Platform
Domain: Land
All other values remain 0.
Close this dialogue box.
(NT Users please see earlier note!)
Under the Objects pull down menu, select "Outbound Entity Information". Disable all checkboxes, since this object will be used for the "Inbound
Template Entity" only. It is considered a "remote entity".
Step 6: Placing your objects in the Scene.
> Go to the Scenes panel.
Click on the left arrow of the Objects List widget. This will list
all instances of this class. Load the "town " and "my tank" into the scene by selecting the "Apply" button for the "terrain" and the "OK" button for the "tank". The "incoming_tank" IS NOT LOADED into the scene by you!
DIS will handle this with an incoming PDU.
xibalba 评论于2006-9-4 17:13:21
Step 7: Create an Isector for clamping the motion model to the ground .
Go to the Isector panel.
Create an isector called "driving".
Set the Z offset to be 0.1
Make the target the “Object” “town”
Make the method to type "tripod".
Click on the "Target Isector Class" button to set the Isector Class. Turn on all terrain bits, (they should already be on by default.)
Save your ADF.
Step 8: Using the Drive Motion Model.
Go to the Motion Models panel.
Define your Initial/Reset position to be (1000, 1000, 0, 0, 0, 0)
Set the Motion Model Type. to “Drive”
Make the Wheel turning radius 2.5 for better steering of your tank.
Click on the left arrow to pop up the class instance dialogue box for Isectors.
Click on OK to attach the "driving" isector.
Save your ADF.
Step 9: Creating a tank player.
Go to the Players panel.
Create a player called "tank driver"
Use the " my tank" for the players geometry.
Assign the tank object by clicking on the left arrow
An objects list widget will appear
Highlight ‘my tank’ and press OK
Set the “Positioning Method” to “Motion Model”.
Enable the Motion model by checking the box labeled “Enable”.
Select the “Default” Motion Model from the list below the Enable Widget.
This in essence has attached “my tank” to “tank driver”. “tank driver” is now tied to your motion model. Where ever the motion model goes, the tank will follow. Your motion model is control by your mouse.
Left mouse button will accelerate the drive motion model.
Right mouse button will slow down the drive motion model.
Middle mouse button will stop the drive motion model.
Step 10: Have an Observer follow the tank driver.
Go to the Observers panel.
Change the Default Observer’s “Positioning Method” from Type from "Motion Model" to "Tether Follow".
Attach the "tank driver" as the player the observer will follow.
Set the Offset to (0, -25, 5)
Save your ADF.
Step 11: Configuring the machine for sending and receiving PDU’s.
Go to the DIS panel.
Set the “Protocol” to “DIS”
Set the “Status” to “Send and Receive”
Host value is arbitrary. For this exercise use ‘111’
Each person must have a unique Host ID, in order to see everyone else
in the application.
Turn the Display Entity Markings "ON" by clicking on the check box.
Attach the DIS Scene to the "Default" scene.
Save your ADF
Now preview your application using "DIS Active Preview".
You should see your tank. Your entity markings are displayed on the tank, (white is inbound and red outbound).
At this point there are no other participants! You must create a second ADF to participate in your DIS exercise.
Step 12: Create the player2.adf
Copy the DISplayer1.adf to DISplayer2.adf
Go to the File pulldown menu.
Select “Save As” use “DISplayer2.adf” as the file name
To DISplayer2.adf Make the following modifications:
Go to the DIS panel.
Host : Because this is the second player, set the host value to “222”
Note: Each person must have a unique Host ID, in order to see everyone else in the application.
Save your ADF
Go to the “Object” Panel
High light “my tank” in the entity list.
Under the Objects pull down menu, select the "Outbound Entity Appearance".
Marking Text : Assign an intuitive name i.e. ‘player 2’
Close this dialogue box.
Save your ADF. (DISplayer2.adf)
Go to the Motion Models panel.
Define your Initial/Reset position to be (1000, 1050, 0, 180, 0, 0)
Preview the application, again using "DIS Active Preview" for DISplayer1.adf and start a second DIS Active Preview Session for DISplayer2.adf.
You should be able to see both player1 and player 2 in both DIS Active Preview windows.
Summary:
This tutorial will get you started setting up the basic communication between Vega DIS applications.
For a more exciting demonstration of DIS please see
NT:
C:\program files\paradigm\vega\sample\vgDis\wargame.
Drag the wargame.adf over the wargame.exe.
Drag the wargame_pl2.adf over the wargame.exe
IRIX
/usr/local/PSI/sample/wargame
type ‘tank wargame.adf’ on the command line
open a second winterm and type “tank wargame_pl2.adf” on the command line
Supported keystrokes:
“l” – turn turret to the left
“r” – turn turret to the right
“u” – point barrel up
“d” – point barrel down
“F” fire a munitions
If you or the inbound player is hit by a missile, the tank will burst into flames! Your tank will also change from it’s ‘perfect’ appearance into a ‘damaged’ appearance.
Question or problems please contact MPI Technical support
e-mail vega@multigen-paradigm.com

评分

参与人数 1积分 +10 收起 理由
matrix2009 + 10 精品文章

查看全部评分

土豆沙拉 评论于2006-9-4 18:02:50
:) 牛,顶!谢谢啦!
vrer 评论于2006-9-4 22:13:27
很不错的资料,置顶鼓励。
xibalba 评论于2006-9-5 17:20:38
:loveliness: 翻译的不好,可能会有错误,仅供参考^_^。
yingzi_zxp 评论于2006-9-29 19:01:13
强!!!
hmqs261101 评论于2006-12-27 22:27:24
牛人:L :L
obuil 评论于2006-12-27 23:50:08
不错!
xiaoming630 评论于2007-11-4 16:02:59
jeans_net 评论于2007-11-10 16:06:17
顶一下
小黑 评论于2008-6-12 09:04:33
关注中
lqz_qy 评论于2008-7-26 14:24:09
收藏了,先
ggw0122 评论于2011-4-10 19:55:40
很牛呀,很厉害,佩服

手机版|VR开发网 统计 津ICP备18009691号
网安备12019202000257

GMT+8, 2021-2-28 10:49 AM

返回顶部