Vega  FAQ's FAQs 251 thru 300

 

   

FAQs 1 thru 51 square72_blue.gif FAQs 51 thru 100 square72_blue.gif FAQs 51 thru 100 square72_blue.gif FAQs 101 thru 150 square72_blue.gif FAQs 251 thru 300 square72_blue.gif FAQs 251 thru 300

  1. Why Does my Application only Run at only 1-2hz
  2. What is a pfFlux
  3. How can I Pick A Line Using vgPicker
  4. Can I pick and Change textures with vgPicker
  5. What is the Difference between Real-time & Animation Apps
  6. How do I Calculate the Vertical Field of View
  7. How do I Calculate the Horizontal  Field of View
  8. What is a Line Segment
  9. Integrated Graphics Card Problems
  10. How Can I Change the Color of Light Lobes
  11. Why Does glReadPixels Capture other Windows
  12. How can I Force my Graphics Window on Top
  13. Can I Stop a Window being Ontop after using &wndTopMost
  14. Why do Light Lobes Look Bad on Windows
  15. How do I calculate an Objects size
  16. How to I calculate the Bounding Sphere of an Object
  17. Does Vega Prime Support Vertex Buffer Objects VBO
  18. What are Vertex Buffer Objects (VBO's)
  19. I can see my Terrain file in Creator but not in Vega
  20. How can I position the mouse in my Window
  21. How do I create my own Motion Model
  22. What up with vgVolume
  23. How to I set the reset position for a motion model
  24. How do I use collision detection with a motion model
  25. How can I set my Height above the terrain
     
  1. How do I use and Isector
  2. How can I get texture color and alpha from an isector
  3. Why can't the Isector see my vgPart
  4. How do I pick a vgObject
  5. How do I use vgPicker
  6. How do I pick multiple objects
  7. How do I move a picked object
  8. What happens when I pick a vgPlayer
  9. How can I enable Environmental Texture mapping
  10. How do I draw a Logo in on my Channel
  11. How can I Pause Vega
  12. How can I create Rain effects
  13. How can I create Snow effects
  14. How to disable fog on Clouds but keep it on My Scene
  15. How can I have a call-back that only gets called for one frame
  16. How do I change vertices
  17. How do I change a color of a Polygon
  18. How do I change a texture
  19. How do I find a polygon from Creator
  20. How do I get a parts world position
  21. How do I orbit/spin around an object
  22. How do I orbit/spin around an point
  23. How do I use pfFlux's
  24. Can I use APP+CULL, DRAW with pfFlux's
  25. How do I get the cursor position
 

Faq's

 

* 201  * Why Does my Application only Run at only 1-2hz up

 

    There can be many reasons that your simulation/application can be running at only 1-2 Hz or less.

    Typically this indicates that you may have dropped in to software rendering mode on your graphics card. This can happen when you set-up up Opengl and request your pixel format for the Opengl Window. Normally it means you have asked for a format or a setting that the card cannot support or does not support. I say cannot support as it may be that the resources of that card are limited when you request the pixel format, such as your resolution is too big for a 32bit z buffer, another Opengl has already consumed most of the resources etc. Or your requesting a setting not supported by your graphics card, you can find the formats supported by your cards with the following 

    On Irix you can use findvis on the command line to display the available bit plane configurations supported on the Irix system

    On Windows you can use a program from Nvidia to show the available bit plane configurations

    Then it might be a case you are trying to

    • display too much,
    • too many polygons
    • high screen resolutions
    • too many textures.
    • textures too big ( > 512,x512) ( for real-time try to stick below 512x512
    • Too many state changes
    • You Application is too complication making you CPU bound et
    • Your IO bound
    • Etc

    In this case you have to try and simply your application, reduce the data, reduce the applications work load, get fast machine, maybe use a multi-process machine, get better graphics, reduce your resolution etc

 

* 202  * What is a pfFlux  up

     

    A Performer pfFlux is basically a container for dynamic data that enables multi-processor applications to pass, share and edit frame accurate data between the processes of a Performer application.

    A pfFlux  consists of multiple buffers of data, where each of the buffers is associated with a frame number. The use of frame numbering allows the multiple processes each to have a copy of the data containing the frame on which they are working

    Multiple reader processes can share a copy of the current results or use the frame of results that is appropriate for that process

    Typically you would use pfFlux's to safely pass data between process, for example passing a command from the APP process to the Draw process.

    Also another major use of pfFlux's is for used in dynamic geometry, typically in a multi-process application you cannot change geometry while it is in the scene because the Draw process will be accessing the data while you are trying to. By using pfFlux for the geometry you can safely modify geometry will in the scene.

    See the Performer Programmers guide and man pages for more detail on pfFlux's

 

* 203  * How can I Pick A Line Using vgPickerup


    Unfortunately you cannot pick lines using the vgpicker class in Vega Prime,  this is a design limitation that was built into vgPicker when I originally wrote the code.

    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
     

* 204  * Can I pick and Change textures with vgPickerup


    No not directly you cannot pick a texture, the vgPicker is designed to pick geometry and vgObjects.

    But you can pick at the pfGeoset level and from there you can get at the pfStateSet and retrieve and change the Texture
     

* 205  * What are the Difference between Real-time and Animation Applications up



    Animations are typically used for films, high resolution renderings, images for print, and pre-programmed demonstrations.

     

    Real-time applications are used in application where responding to user input is part of  the simulation, for example, during flight training and interactive architectural  demonstrations. Both real-time and animation applications simulate real and imaginary worlds with highly detailed models, produce smooth continuous movement, and render at a certain number of frames per second .

    Some of the main differences are: 

    • Real-time application frames are rendered in real time, which means the frames are continuously recalculated and rendered as the user changes direction and chooses where to move through the scene to view
    • Animation frames are pre-rendered, which means the animator sets the order of the frames and chooses the parts of the scene to view. Each frame can take hours to render
    • Real-time applications are highly interactive, and the user controls the movement of objects within the scene; animations do not allow for human interaction, and the user is a passive  participant 
    • The typical emphases of real-time applications are interactivity and purpose. Models in real-time applications typically have less detail than models that are used in animations to increase the rendering speed and shorten the latency period, which is the time delay from user input until the application makes an appropriate response. To achieve realistic real-time simulations, the latency period must be too short for the user to perceive
    • The emphases of animations are almost always non-interactive aesthetics and visual effects. Models in animations usually have much more details; mainly because the use of frames that pre-rendered ( which can take hours or days), the effect on drawing speed can be pre-determined
    • Real-time applications typically are displayed at various frame rates, which range typically require rate off 60 frames per second, this may change depending on application goals and screen complexity
    • While animations based applications usually display at standard 24 frames per second for every pre-rendered sequence of images ( which can take hours per frame compared 16.666 milliseconds for real-time at 60hz)

 

* 206  * How do I Calculate the Vertical Field of View  up


    Here's one way that you could do this is along the following lines:

       

Formula :





                        


    aspect_ratio = channel_width / channel_height

    width = tan ( horizontal_fov / 2.0 ) * 2.0 * near_clip

    height = width / aspect_ratio

    vertical_fov =  2.0 * atan(  height / ( 2.0 * near_clip  ))

     

 

     

* 207  * How do I Calculate the Horizontal  Field of View up


    Here's one way that you could do this is along the following lines:
     

Formula :





                        


    aspect_ratio  =  channel_height / channel_width

    height = tan ( vert_fov / 2.0 ) * 2.0 * near_clip

    width = height / aspect_ratio

    horizontal_fov =  2.0 * atan( width / ( 2.0 * near_clip  ))

     

 

     

* 208 * What is a Line Segment up


    Generally in a line segment is talked about and used as part of an Isector which is used for collision detection.

    A line segment in this case is defined by 2 XYZ vectors a Begin and an End position. A vpIsector class such as vpIsectorLOS will position and orientate the line segment.

    Basically speaking  the Isector will traverse its target scene graph and test a nodes bounding spheres against the Line segments. If no intersection is found then the node and all the nodes children are a rejected, this allows for fast collision detection.

    If an intersection hit is encountered with the bounding sphere the test can them become more fine grained test of each child node for an intersection until the leaf geometry node is reached, then data on the collisions detected can be stored such as pointers to node, position of intersection, the normal perpendicular to the intersection etc. (This is of course an oversimplification of a more complicated process)

 

* 209 * Integrated Graphics Card Problems  up

     

    Q: I'm using an Integrated Graphics Card  and I'm having problems with artefacts appearing and my frame rate is very poor.

    This is quite a common problem when using an integrated graphics cards (such as Intel 82845)

    This is quite a common problem, most OpenGL based programs such as Vega, Performer and OSG more than likely will have problems when they are used with an integrated such as the common  Intel 82845 chipset.

    The first thing to do is to visit the manufactures web site or contact their support channels to obtain there latest graphics driver for the card.

    Installing the newest  graphics driver normally help to some extent, make sure you select at least 24bit or 32 bits for the colour,

    Also make sure and allocate as much RAM to the card as possible, you will need at least 64mb  the more they support the better, if you only have 32mb then your performance will not be good

    The performance of the integrated card can will always in most case be a lot worse the a dedicated graphics card as the integrated card in  most case use system ram, which slows it down and also place a lot of the processing of graphics commands on the machines normal CPU.

    To be honest integrated cards are terrible for 3d Real-time graphics, there fine for normal desktop activities but not graphics, the best recommendation I can give is to install a dedicate graphics card, you can get a  very reasonable card these days for say $100 or so which will blow away the integrate card.

 

* 210 * How Can I Change the Color of Light Lobes up


    Unfortunately in Vega you cannot change the colour of the light lobes.  I'm not aware of any work around that will allow to do this

    I did at one point when I worked at MPI add this functionality as I needed it for a project but it was never released ( well Vega was never had another public release)

    Note this lack of functionality is a throw back to LLobes being originally based on Irix hardware supported LLobes that did not offer colour selection

    Also note Vega Prime LLobes suffer the same limitation which is a shame etc

     

* 211 * Why Does glReadPixels Capture other Windowsup

     

    When I do a glReadPixels and write this out as an image file or to an AVI file, I get other windows captured, why.

    Presuming that when you do the call to glReadPixel you have other windows overlapping the graphics window, then it is likely that you will see the other windows in your capture

    Unfortunately This is not so much a platform issue as it is a consequence of the OpenGL specification.

    Paraphrasing section 4.1.1 "Pixel Ownership Test": ...if a pixel in the frame buffer is not owned by the GL context, the window system decides the fate of the incoming fragment; possible results are discarding the fragment...  Note that no mention is made of whether front or back buffer; it's entirely the window system's call.  Any code depending on a particular implementation's behaviour is very non-portable.

    This seem to be more of a problem for Windows users and not as much on X11 based OS's (although not guaranteed).

    On windows you can force you application to the stay on stop and then glReadPixel will capture just the applications window
     

* 212  * How can I Force my Vega Window on Top: up


    On Windows this is quite straight forward using the following on your window
     

Code :

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

    RECT wpos;

     

    SetFocus();

     

    BringWindowToTop();

     

    SetWindowPos(  &wndTopMost,

     

                                wpos.left,

     

                                wpos.top,

     

                                wpos.right - wpos.left,

     

                                wpos.bottom - wpos.top,

     

                               SWP_NOMOVE | SWP_SHOWWINDOW | SWP_NOSIZE );

 

     

 

* 213  * How Can I Stop My Vega Window being Ontop after using &wndTopMost : up


    How can I stop my Vega  window from being on top after using &wndTopMost after using FAQ 213

     

Code :

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

 

    RECT wpos;

    SetWindowPos(  &wndNoTopMost,

     

                                wpos.left,

     

                                wpos.top,

     

                                wpos.right - wpos.left,

     

                                wpos.bottom - wpos.top,

     

                               SWP_NOMOVE | SWP_SHOWWINDOW | SWP_NOSIZE );

     

     

* 214  * Why do Light Lobes Look Bad on Win : up


    To use LLobes on Windows your card needs to support

    Alpha Planes and Multi-sampling

    from the vgLLobes html page:

    If alpha bitplanes are supported, but not granted by the X Visual supplied, light lobes will not work correctly. If the terrain and object in the scene appear bright even when the time of day is low (i.e. night), then the visual may not be the desired one. See "man vgWindow" for tips on getting a visual with alpha planes.

    It is recommended that the visual also have multisample bitplanes (Samples in the Windows panel). If multisample planes are not present in the Light Lobes window, transparent objects may 'glow'. Although the glowing effect can be lessened by turning off transparency, the scene quality suffers.

 

* 215  *  How do I calculate an Objects sizeup

     

    You can get the bounding box of an object extents along the following lines
     

Code :

--

     

     

    vgObject *obj  = NULL;

     

    pfNode   *node = NULL;

     

    pfBox bbox;

     

    //

    // First get a pointer to object of interest

    //

    obj = vgFindObject( "my Cool Object" );

     

    //

    // Retrieve the pfRoot node of the Object

    //

    node = vgGetObjPfNode ( obj );

     

    //

    // Now traverse the Nodes tree and get the bounds

    //

    pfMakeEmptyBox( bbox );

     

    pfuTravCalcBBox( node, bbox );

     

 

     

* 216  *    How to I calculate the Bounding Sphere of an Object  up

     

    You can get the bounding Sphereof an object  along the following lines
     

Code :

--

     

     

    vgObject *obj  = NULL;

     

    pfNode   *node = NULL;

     

    pfSphere bsphere;

     

    //

    // First get a pointer to object of interest

    //

    obj = vgFindObject( "my Cool Object" );

     

    //

    // Retrieve the pfRoot node of the Object

    //

    node = vgGetObjPfNode ( obj );

     

    //

    // Now for an update and then get the bounding sphre

    //

    pfNodeBSphere( node,  NULL, PFBOUND_DYNAMIC );

    pfGetNodeBSphere( node, &bsphere );

     

 

     

* 217  *  Does Vega Prime Support Vertex Buffer Objects (VBO's)up


    No not directly, Vega was written before Vertex Buffers Objects (VBO) were introduce in in OpneGL 1.5, so Vega its self knows nothing about VBO's

    But there is nothing stoping you using them direclty with Opengl Code.

     

* 218  *  What are Vertex Buffer Objects (VBO's)up


    A VBO is an acronym for a graphics construct called a Vertex Buffer Object is a powerful feature that allows the use to to store certain graphics drawing data in the high-performance memory on the graphics card (server side).

    This feature providwes  a mechanism of encapsulating data within 'Buffer Objects'  for handling these data without having to take them out from the server side, thereby increasing the rate of data transfers.

    The basic idea of this VBO mechanism is to provide some chunks of memory (buffers) that will be available through identifiers. As with any display list or texture, you  can bind such a buffer so that it becomes active. The binding operation turns every pointer in every client/state function into offsets, because we will work in a memory area that is relative to the current bound buffer. In other words, this extension turns a client/state function into a server/state function.

    We all know that a client/state function deals with data whose scope is only accessible for the client itself. Another client won’t be able to access any of this data. As a consequence of passing these functions on the server’s side, it is now possible to share this data between various clients. Many clients will be able to bind common buffers, and everything is dealt with just like texture or display list identifiers.

    ( Note that VBO's requires Opengl 1.5 or higher support)

     

* 219  * how do I get the mouse's button states up


    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

    What you can happen 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

    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 modelled are not say millimetres, as the default units for Vega  is Meters.

    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

    Check you have add the file to the scene, and if you are using Asynchronous page loading then it will not start to be loaded until you add the file to the scene 

    Check you LOD settings are correct and that you close enough for them LOD to draw something

     

* 220  *  up

     

* 221  *  up

     

* 222  *  up

     

* 223  *  up


* 224  *  up

     

* 225  *  up

     

* 226  *  up

     

* 227  *  up

     

* 228  *  up

     

* 229  *  up

     

* 230  *  up

     

* 231  *  up

     

* 232  *  up

     

* 233  *  up

     

* 234  *  up

     

* 235  *  up

     

* 236  *  up

     

* 237  *  up

     

* 238  *  up

     

* 239  *  up

     

* 240  *  up

     

* 241  *  up

     

* 242  *  up

     

* 243  *  up

     

* 244  *  up

     

* 245  *  up

     

* 246  *  up

     

* 247  *  up

     

* 248  *  up

     

* 249  *  up

     

* 250  *  up

     

     

 

 

© Copyright 2004-2006 Gordon Tomlinson  All Rights Reserved.

All logos, trademarks and copyrights in this site are property of their respective owner.