|
|||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
For further information and Help and the Sensor product you need to contact the MultiGen-Paradigm support department directly and they will be able to discuss you question and concerns directly, but note that are also bound by the restrictions imposed by the US state department. |
|||||||||||||||||||||||||||||||||||||||||||||
One reason might be because when MultiGen Creator builds a terrain file it will apply it's real world coordinate positions which is then picked up by Vega when the files is loaded And what you usually find is that the user is initialising their observer at the default coordinate origin of 0,0,0 but the terrain is being read in and positioned thousands on miles/kilometres away What you can do correct this situation is to use MultiGen Creator to find the coordinates of the terrain and enter them as an the start position for the Observer in Lynx, alternatively you can use the Object Viewer in Vega to find the location Also you might be at the centre of your terrain but just under there terrain and as by default Vega does not render back faces you will not see the terrain. You can again correct his in the same manner as above. Another problem might be that the scale of the terrain is wrong check the units you modeled are not say millimetres, as the default units for Vega is Meters. Also check that the file is actually being loaded, look in the console to see if there were any warning about not being able to load the file |
|||||||||||||||||||||||||||||||||||||||||||||
You would then simply position the vgIsector at the given X and Y coordinates, do the intersection test and retrieve the Z from the returned Hit results See the examples provide with Vega
|
|||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
The vgNavigator class process the event marker data and perform the actions it specifies during path traversal. A vgNavigator must contain at least one event marker per control point. The vgNavigator interprets these markers and uses their data to determine how to traverse between two control points or what specific actions to take when a certain control point is reached. See vgSplineNavigator further details on the vgNavigator Class |
|||||||||||||||||||||||||||||||||||||||||||||
See vgSplineNavigator further details on the vgNavigator Class |
|||||||||||||||||||||||||||||||||||||||||||||
If you wanted to do this you would have to:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
Note that the default start index is the first control point which is index 0; See vgSplineNavigator further details on the vgNavigator Class |
|||||||||||||||||||||||||||||||||||||||||||||
162 How can I tell the vgNavigator to Stop at the End of the Path | |||||||||||||||||||||||||||||||||||||||||||||
See vgSplineNavigator further details on the vgNavigator Class |
|||||||||||||||||||||||||||||||||||||||||||||
163 How can I tell the vgNavigator to Restart a the End of the Path | |||||||||||||||||||||||||||||||||||||||||||||
See vgSplineNavigator further details on the vgNavigator Class |
|||||||||||||||||||||||||||||||||||||||||||||
164 What is the max number of control points for a vgPath and vgNavigator | |||||||||||||||||||||||||||||||||||||||||||||
See vgSplineNavigator further details on the vgNavigator Class |
|||||||||||||||||||||||||||||||||||||||||||||
SGI Monitors and graphics hardware uses a differnt setting for the Gamma output to that of a PC So normally a the PC textures will look very bright on SGI machines while a SGI texture will look very dark If we say that the SGI machines have a Gamma value of 1.0 then we can say the Windows PC's machines have a gamma value of around 1.7, this is typically the differnce in gamma So the solution is to adjust your textures gamma/brightness either up or down depending on where they are being used |
|||||||||||||||||||||||||||||||||||||||||||||
Vega ships with a simple examples that shows you some of the basics on creating an AVI, the samples is typically found in ( Vega install location) Sample\Vega\pguide\ch03\MFCVega ). The down side of he sample is that it needs use interaction and using glReadPixels is expensive and you will find it hard to control your application. Another way which I have used in several cases, is to basically script your run-time such that you can replay it back with out user interaction. Typically you can use things like vpNavigators for dynamic objects,. If you have say update data coming in from a host simulator etc then you will need a method to record and play these back as well etc. So you then control the speed of the application using frame time stamps What's this means is that you can then take as long as needed to render each frame, in fact you this usually means that you can use higher resolution than can in real-time. another benefit is you can also pause the process Pseudo code is along these lines: 1) Get the reference time 2) Set number of frames a second 3) Work out the frame delta times 4) Work out the total number of frame required 5) for each frame 6) Set the Vega frame time stamp 7) Update Vega 8) Vega Draws the Frame 9) Capture the Frame 10) Process the captured frame with the AVI api 11) workout the next frame time stamp 12) inc frame number 13) goto 5, until no frame left
|
|||||||||||||||||||||||||||||||||||||||||||||
Unfortunately with Vega you cannot actually retrieve the celestial positions of the Sun or Moon, neither can you retrieve the local application positions of the Sun and Moon
|
|||||||||||||||||||||||||||||||||||||||||||||
Because the DRAW process is were the draw context is created and own to use Opengl you will have to either create Pre/Post draw callback functions on either a vgChannel or pfNode. See the Vega forums on the MultiGen-Paradigm web site, a quick search using key words such as draw call backs or Opengl will show you past discussions and possible examples (at some point in the near future, I should have some simple examples on for this site) |
|||||||||||||||||||||||||||||||||||||||||||||
Note that Vega, Vega Prime,Performer and OpenGL use lazy state evaluation for reasons of performance, as state chaning can be expensive in the graphics pipe line.
So basically any state change you make with you Opengl Code you typically will need to restore to it previous value, also you have to set the OpenGL state to that which you require to achieve you goals
You would do something along the lines of:
|
|||||||||||||||||||||||||||||||||||||||||||||
First you have to get the root pfNode from a vgObject and then use pfFindNode e.g.
See the code sample Find a Switch Node in a vgObject Code sample or Find a Switch Node in a vgPart code sample |
|||||||||||||||||||||||||||||||||||||||||||||
Then you can use pfSwitchValue(..), e.g. pfSwitchVal( swNode, PFSWITCH_ON); See the code sample on How to Turn on and Off Switch Nodes. Also see the code sample How to Set the Current Visible Switch Node. |
|||||||||||||||||||||||||||||||||||||||||||||
For example: if we have a switch node that has 4 nodes A B C D, we can draw [] or [ABCD] or [A]or [B] or [C] or [D], we can not have [AB] or [BC] with a basic switch node Switch masks add a Powerful features to switch nodes that all Mask to be used to decide with children to draw, so that as cobinations such as [AB] or [BC] or [ACD] can be used as well as None or All children. With Switch mask when we set an index to enable a chile such as 'pfSwitchVal( switchNode, childNumber )' we are selecting the Mask to draw and not the child. In Performer and Vega switch maskes cannot be created they have to be created in a modeling package such as Multigen-Paradigm's Creator., on basic switches can be created via code. |
|||||||||||||||||||||||||||||||||||||||||||||
The How to Restructure a Switch Node code sample shows how to remove the special switch mask controller node |
|||||||||||||||||||||||||||||||||||||||||||||
See the Find Number of Geosets in a vgObject Example for a code sample on how to achive this. |
|||||||||||||||||||||||||||||||||||||||||||||
You will have to traverse the tree of the vgPart and count the number of pfGeoSet's as you traverse the vgPart See the Find Number of pfGeosets in a vgPart Example for a code sample on how to achieve this. |
|||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
Yes you can use Opengl with a vgObject, similar to the manner of using Opengl with a vgChannel Pre/Post draw callbacks. Basically you have to create a dummy vgObject with a pfGroup node to use as the hooks for the Pre-draw callback to place the Opengl call in. Remember that to use Opengl in Vega you need a draw context which has a valid OpenGl context See Opengl with a Vega Object code sample for full details on how to achieve this |
|||||||||||||||||||||||||||||||||||||||||||||
If you mean inside a Win32, MFC, QT, X11 Motif based application then yes of course. But if you mean inside of a container such as ActiveX or COM object, DLL etc then in most cases NO simply because Vega and SGI Performer are not designed to be re-enterant they are designed to close and fully exit which normally will kill your container application as well or result in large memory leaks, I say in most case becuase I know of some people that have had limited success with ActiveX I would recommend moving across to Vega Prime if you need to use a container such as ActiveX |
|||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
To check simple load a flight file and in you console window when you load an Open Flight you should see something akin to the following ======================================================================== MultiGen Inc. OpenFlight (r) loader R15.7a for Vega $Date: 2002/05/13 16:42:11 $ ======================================================================== Copyright (c) 1986-2001 MultiGen-Paradigm Inc.
|
|||||||||||||||||||||||||||||||||||||||||||||
Vega will work with standard USB devices Keyboards, Mice, Ball Mice etc. Other devices may or may not works, as the Input library used by Vega is quite old and looking for Serial Port or IP port devices. It might by worth contacting MPI support directly to see if they can offer any advice on getting certain USB devices to works |
|||||||||||||||||||||||||||||||||||||||||||||
The vgPicker man Page can be found in the above HTML pages (vgPicker.html) |
|||||||||||||||||||||||||||||||||||||||||||||
Remember the setting the Name of a vgDataSet actaully also sets the path and file name to load in to the vgDataSet ( go figure whos bright idea this was) |
|||||||||||||||||||||||||||||||||||||||||||||
In the Vega Lynx ADF application, If you use the file dialog to browse to a file , then Lynx ill only use the file name and extension and strip the full path off. Note that the full path is not lost but will added to the vgPath which Vega use to find textures, models and other resources To use the full file name and path the simpy enter the full path and name in the text box's with out using the file browsers
|
|||||||||||||||||||||||||||||||||||||||||||||
Firstly you could simply remove the object from the vgScene with a call to vgRemSceneObj( m_scene, m_object ); If for some reason you want to get the vgobject i the scene but hide it then you have to do a little extra work and set the Draw Mask on the vgObject's Performer root node, along the following lines
This works by setting the mask to 0x0, which when logically anded with the vgChannels pfChannels draw mask stops the node and its children being drawn.
|
|||||||||||||||||||||||||||||||||||||||||||||
This can be achieved in the same way an vgObject can be hidden using the vgParts pfNode to set its Draw Mask:
|
|||||||||||||||||||||||||||||||||||||||||||||
If the Object was hidden by removing it from the vgScene the simple call vgAddSceneObj( m_scene, m_object ); to add the oject back in to the Scene. On the other hand if the vgObject was hidden youusing the draw mask then do something along the lines of:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
Yes you can draw a vgObject in one channel and not another, this can be a achieved using use Draw masks on the pfChannels and vgObjects We do this by setting 2 different draw masks on the vgChannels, the default Draw masks for every things is 0xFFFFFFFF so that all every thing will be drawn in all channels So we would set the draw mask on the 2 channels to be different, then set the draw mask of the vgObject to just match the draw mask of channel 0 so that 0x0000FFFF Logical AND 0x0000FFFF results in 0x00001111 so that the object will be draw in the channel 0, while the draw mask of channel 1 0xFFFF0000Logical AND 0x0000FFFF results in 0x00000000 will not be draw in the channel 1
|
|||||||||||||||||||||||||||||||||||||||||||||
Alternatively you could write some code to do simple linear interpolation and move the object by some delta each frame. See Vega Programmers Guide and Lynx Guides for further details on vgNavigator's and Pathing tool.
|
|||||||||||||||||||||||||||||||||||||||||||||
See the Code example switchObvserver2Player for further details on how to follow a vgPlayer Alternatively the harder way would be : On every frame
|
|||||||||||||||||||||||||||||||||||||||||||||
This a quite straight forward to do, as players were designed to be viewed from. You simply need to set your vgObserver to look from a desired vgPlayer and you can choose 3 methods of following:
For example to set tethered fixed you could do:
See the Code example switchObvserver2Player for further details
|
|||||||||||||||||||||||||||||||||||||||||||||
This is quite straight forward to do, you just have to ensure that you remove any associations with vgNavigator or vgPlayer that the vgObserver may have. See the Code example switchObvserver2MotionModel for further details
|
|||||||||||||||||||||||||||||||||||||||||||||
One way would be to:
Then when you move your motion model, the vglPayer and vgObject will automatically be moved for you and stay in your viewpoint at the given position |
|||||||||||||||||||||||||||||||||||||||||||||
int numobjs = vgGetNumParts( vgGetObj(0) ); Note that this is the number of vgParts and not necessarily the number of nodes also note that the Make Parts property for the vgObject has to be set before the vgObject is loaded or made. Also see How to count the number of pfGeoSet's in a vgObject
|
|||||||||||||||||||||||||||||||||||||||||||||
Isectors provide the ability to handle collision detection between objects within a Scenegraphs and are an essential part of most visual simulations For example, a typical need is to obtain the current Height Above Terrain (HAT) information in a flight simulator or a driving simulator is determined by firing a vertical line segment from the aircraft or vehicle towards the terrain/ground and calculating the distance between the aircraft or vehicle and the intersection point on the ground. Another example is the use of an Isector to pick or selecthings in the scene, this is typically done using an Line of Site (LOS) isector
|
|||||||||||||||||||||||||||||||||||||||||||||
And RDF is a Vega Region Definition File, the RDF file can be used to store the configuration parameters used for configuring the Vega LADBM environment. It is based on the assumption that the database is constructed with tile grids. For example, instead of defining a 10x10 tiled database in an ADF as 100 vgObjects, vgRegions, and vgVolumes, RDF leverages the fact that the data has the same basic attributes, and is evenly distributed across a regular grid. Instead of one monolithic ADF, we can have a small ADF and one or more small RDF to describe the data.
|
|||||||||||||||||||||||||||||||||||||||||||||
Heres an example ADF see the next FAQ for details and the LADBM documentation.
//------------------------------------------------------------------------------------------------------------------------------------------------
tilegrid "RHCB" { path "$(APPPATH)\data\contour-region-high-culture-bbldgs-fst" nameexpr { format "RHCB.c%03d.r%03d.fst" $col $row } radius 50000 groupid 3
tilelist {
{12 16} {12 17} {12 18} {12 19} {12 20} {12 21} {12 22} {12 23} {12 24} {12 25} {12 26} {13 10} {13 11} {13 12} {13 13} {13 14} {13 15} {13 16} {13 17} {13 18} {13 19} {13 20} {13 21} {13 22} {13 23} {13 24} {13 25} {13 26} {14 10} {14 11} {14 12} {14 13} {14 14} {14 15} {14 16} {14 17} {14 18} {14 19} {14 20} {14 21} {14 22} {14 23} {14 24} {14 25} {14 26} {15 10} {15 11} {15 12} {15 13} {15 14} {15 15} {15 16} {15 17} {15 18} {15 19} {15 20} {15 21} {15 22} {15 23} {15 24} {15 25} {15 26} {16 10} {16 11} {16 12} {16 13} {16 14} {16 15} {16 16} {16 17} {16 18} {16 19} {16 20} {16 21} {16 22} {16 23} {16 24} {16 25} {16 26} {17 10} {17 11} {17 12} {17 13} {17 14} {17 15} {17 16} {17 17} {17 18} {17 19} {17 20} {17 21} {17 22} {17 23} {17 24} {17 25} {17 26} {18 10} {18 11} {18 12} {18 13} {18 14} {18 15} {18 16} {18 17} {18 18} {18 19} {18 20} {18 21} {18 22} {18 23} {18 24} {18 25} {18 26} {19 10} {19 11} {19 12} {19 13} {19 14} {19 15} {19 16} {19 17} {19 18} {19 19} {19 20} {19 21} {19 22} {19 23} {19 24} {19 25} {19 26} {20 10} {20 11} {20 12} {20 13} {20 14} {20 15} {20 16} {20 17} {20 18} {20 19} {20 20} {20 21} {20 22} {20 23} {20 24} {20 25} {20 26} {21 10} {21 11} {21 12} {21 13} {21 14} {21 15} {21 16} {21 17} {21 18} {21 19} {21 20} {21 21} {21 22} {21 23} {21 24} {21 25} {21 26} {22 10} {22 11} {22 12} {22 13} {22 14} {22 15} {22 16} {22 17} {22 18} {22 19} {22 20} {22 21} {22 22} {22 23} {22 24} {22 25} {22 26} {23 10} {23 11} {23 12} {23 13} {23 14} {23 15} {23 16} {23 17} {23 18} {23 19} {23 20} {23 21} {23 22} {23 23} {23 24} {23 25} {23 26} {24 10} {24 11} {24 12} {24 13} {24 14} {24 15} {24 16} {24 17} {24 18} {24 19} {24 20} {24 21} {24 22} {24 23} {24 24} {24 25} {24 26} {25 10} {25 11} {25 12} {25 13} {25 14} {25 15} {25 16} {25 17} {25 18} {25 19} {25 20} {25 21} {25 22} {25 23} {25 24} {25 25} {25 26} {26 10} {26 11} {26 12} {26 13} {26 14} {26 15} {26 16} {26 17} {26 18} {26 19} {26 20} {26 21} {26 22} {26 23} {26 24} {26 25} {26 26} } numtiles 26 26 gridorigin -327287.45289023 -471148.8 gridextent 428149.6232 616345.6//16467.29320x26 23705.60000x24 rendersphere 0 immediate 0 aoicull 1 isectclass 0x0 optim 0x10 sensorizable 0 }
//------------------------------------------------------------------------------------------------------------------------------------------------
|
|||||||||||||||||||||||||||||||||||||||||||||
char nameexpr [PF_MAXSTRING] Specifies a naming expression for the tiles. When evaluating that expression, the loader sets the variables col and row to the column and row values appropriate for that tile. The generated name is used for the tile's vgObject, vgRegion, vgVolume, vgDataSet, and the actual datafile to be loaded. By convention, nameexpr should only specify the basename of the file; pathing should be resolved by searching the Vega pathlist.
int numtiles [2] Specifies the number of columns and rows in the tilegrid (which is not the same as the actual number of tiles populating the tilegrid). If no tilelist attribute is defined, then The tile numbering starts from the lower left with tile {0 0}. Default value: 1 1
double gridorigin[2] Specifies the location of the lower left corner of the tilegrid (i.e. the lower left corner of tile {0 0}) in world (DBU) coordinates. Default value: 0. 0.
double gridextent[2] Specifies the width and height of the tilegrid in world (DBU) coordinates. Default value: 0. 0.
int groupid Sets the tiles' vgRegion VGREG_GROUP property. value must be an integer from 0 to 31; see man vgRegion. Default value: 0 It's a good practice to assign an unique group id to each rdf file. This will cause the region paging traversal more efficient and accurate. Also, at the initial traversal, AOI will go through ALL regions, starting from group 0, to figure out the GCS and surrounding regions. If you have many regions defined in many rdf files, then the arrangement of the group id's may affect the initial visual appearance. Here is a guide line: group 0 - low level terrain tiles group 1 - high level terrain tiles group 2 - low level culture features group 3 - high level culture features
int aoicull Sets the tiles' vgRegion VGREG_AOICULL property. value must be an boolean. Default value: 1
float radius Sets the radius of tiles' vgVolume. value is in DBUs. Default value: 0.
int rendersphere Sets the tiles' vgRegion VGREG_VOL_RENDER property. value must be an boolean. Default value: 0
|
|||||||||||||||||||||||||||||||||||||||||||||
Unfortunately you can only pick Dynamic Objects, this is a design limitation that was built into vgPicker when I originally wrote the code. (DOH) There is no straight forward or easy working around for this limitation with Vega and the vgPicker they only solution is than write your own picking code
|
|||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||
© Copyright 2004-2006 Gordon Tomlinson All Rights Reserved. All logos, trademarks and copyrights in this site are property of their respective owner. |