|
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||
|
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 |
|||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||
|
See vgSplineNavigator further details on the vgNavigator Class |
|||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||
|
See vgSplineNavigator further details on the vgNavigator Class |
|||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||
|
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.
|
|||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||