R06 - Computer Science and Engineering

DiRT - Dust in Real-Time: The
Specification Process
Marcos C. Bagby,
Ryan A. Romero,
Brett L. Sulprizio,
Hiroko Uda,
Joseph R. Jaquish,
Frederick C. Harris, Jr.
Introduction
• Overall Goal
– Desert Research Institute
– Immersive Visualization Lab.
– Desert Terrain
Introduction
• Short Term Goal
– Therefore, we need to simulate/model Dust
• Realistic
– Videos
• Real time simulation might be difficult.
Introduction
• This project is an ongoing research project
that could not be completed in 1 semester.
• In Senior Projects the students use a
streamlined software engineering process to
design and implement their projects.
Requirements Specification
• Two Types
– Functional
– Non-Functional
Requirements Specification
• Functional
–
–
–
–
–
–
–
–
–
–
–
R01 [1] DiRT shall use volumetric fog extensions.
R02 [1] DiRT shall simulate dust dissipation.
R03 [1] DiRT simulates wind patterns.
R04 [3] DiRT shall check to see if current computer hardware can
run the simulation.
R05 [2] DiRT shall display the current frame rate.
R06 [1] DiRT shall allow the user to start the simulation.
R07 [1] DiRT shall allow the user to stop the simulation at any
time.
R08 [1] DiRT shall display the methods of dust simulation.
R09 [3] DiRT shall allow the user to change the terrain.
R10 [1] DiRT shall allow the user to change the point of view.
R11 [3] DiRT shall enable the user to customize the lighting.
Requirements Specification
• Functional
–
–
–
–
–
–
–
–
–
–
R12 [1] DiRT shall support a free form camera.
R13 [1] DiRT shall support a first person pilot camera view.
R14 [3] DiRT shall allow the user to load terrain maps.
R15 [2] DiRT enables the user to change the screen resolution.
R16 [2] DiRT shall enable the user to switch from pilot view to
free camera perspective.
R17 [1] DiRT shall use the keyboard to control vehicle movement.
R18 [1] DiRT shall enable the pilot to fly/drive the vehicle.
R19 [2] DiRT shall enable the user to change the model used for
the vehicle.
R20 [3] DiRT shall enable the user to toggle the terrain to on, off,
wire-frame, smooth, and smooth + wire-frame.
R21 [3] DiRT shall enable the user to change the speed of the
simulation (slow down or speed up).
Requirements Specification
• Non-Functional
– T01 DiRT will be able to run all dust methods in realtime.
– T02 DiRT will ask a user to choose a displaying
method from the three:
• 1. Volumetric fog dust
• 2. Diffuse reflection dust.
• 3. Particle system.
– T03 DiRT shall be implemented with OpenGL and Qt.
– T04 DiRT shall be a cross-platformapplication.
– T05 DiRT shall be written in C++.
Use Case Modeling
EnableFogDust
• To better understand
the functionality of
DiRT, the system has
been divided into use
cases.
• This figure presents
the interaction of the
user with DiRT
EnableRefractionDust
EnableParticleDu
st
ToggleTerrain
DriveByKeyboar
d
DriveByMouse
ControlCamera
ChangePerspective
ChangeHeightMa
p
ChangeTerrainMap
Use Case Modeling
• As part of the process
the team constructed a
use case / requirement
traceability matrix.
– This partial matrix
shows how the use
cases and requirements
interact.
Use Case
01
R06
02
03
04
05
06
07
08
X
R07
X
R08
X
R09
X
R10
X
R11
R12
X
R13
X
R14
X
R15
R16
R17
X
X
X
Architectural Design
• The system
architecture is divided
into various
subsystems.
«subsystem»
GUI
«subsystem»
Simulation
«subsystem»
Dust Methods
«subsystem»
Terrain
«subsystem»
Model
Architectural Design
• The structure of DiRT was done using an
object oriented approach.
• As such there were several charts and
diagrams built to clarify the design.
– The first was a class diagram.
Qt Libraries
2
GLFractal
1
1
Class QSlider
Class VBox
1
1
1
1
3
Class Qdialog
Class QRadioButton
1
1
1
1
1
Class QCheckBox
1
3
1
Class Line
1
1
Class QLabel
1
Class QLCDNumber
1
HeightMap
N
#width : int
#height : int
#xCorner : double
#yCorner : double
#cellSize : double
#min : double
#max : double
#noVal : double
#data : double*
-swapInPlace( buffer : void*, size : int ) : void*
-loadAscii( fileName : char* ) : HeightMap*
-loadBinary( filename : char*) : HeightMap*
+getWidth() : int
+getHeight() : int
+getXCorner() : double
+getYCorner() : double
+getCellSize() : double
+getInvalidFlag() : double
+getMinimum() : double
+getMaximum() : double
+getTrueMinimum() : double
+getTrueMaximum() : double
+getEntry( row : int, col : int ) : double&
+getRow( row : int ) : double*
+getData() : double*
Class Diagram
(partial)
-glFogCoordfEXT :
PFNGLFOGCOORDFEXTPROC
-g_nWallTex : GLuint
-object : GLuint
-xRot : GLfloat
-yRot : GLfloat
-zRot : GLfloat
-scale : GLfloat
-eyex : int
-eyey : int
-eyez : int
-fogdense : double
-hMap : HeightMap*
-displayListTex : GLint
-displayListColor : GLint
-displayListMesh : GLint
-camera : double[16]
-tex :Glint[1]
-glContext : QGLContext*
-scrollVal : double
-stereo : bool
-stereoEye : bool
-tx, -ty, -tz : double
-rx, -ry, -rz : double
-x : int[2]
-y : int[2]
-RADIUS : double
-voldegree : float
-radiuslen : float
-alpha : double
-beta : double
-gamma : double
-eyeX, -eyeY, -eyeZ: GLdouble
-eye : GLdouble[4]
-at : GLdouble[4]
-up
: GLdouble[4]heightMap : HeightMap* ) : void
+setHeightMap(
+setTextureFile( path : char* ) : void
#initializeGL() : void
#paintGL() : void
#resizeGL( w : int, h : int ) : void
#OnDisplay() : void
#LoadTexture ( filename : char*, eWrap : GLenum,
nTex : GLuint ) : void
#keyPressEvent( e : QKeyEvent* ) : void
#drawGLQuad( x : float, y : float, z : float ) : void
#drawDustVol( theta : float, radius : float ) : void
#DisplayTerrain() : void
#drawBox() : void
#isTolerableRowDiff( row : int, coll : int, col2 : int )
: int
#isTolerableColumnDiff( col : int, row1 : int, row2 :
int ) : bool
#setHeightMap( heightMap : HeightMap* ) : void
#renderRowTex( row : int ) : void
#renderRowColor( row : int ) : void
#renderMesh() : void
#renderSmoothedMesh( showColors : bool ) : void
System Activity Chart
Set All System Defaults
• The second was a
system activity chart
which is shown here
Load Terrain
Height Map
Load Speed Settings
Load Terrain
Texture
Load Dust Render Settings
Load Control Settings
User Chooses Quit
Play Mode
Open Browse
Terrain Dialog
Open Browse Height
Map Dialog
Toggle Dust Method
Adjust Speed Dial
Toggle Control Modes
Current Status
• Terrain Input
– video
Current Status
– A lot of work has continued on this portion
because of the importance to the whole system
– We have a paper going out tomorrow
describing a new algorithm for triangle
decimation that increases performance
dramatically here
• This is important because the data sets are HUGE!!!
Future Work
• Other Preliminary Work
– Data Selection
• Back to DiRT
– Three Methods
• Volumetric Fog
• Diffuse Reflection
• Particle Systems
– Probably not effective due to the processing power
needed.
– Video Example
Thank You