Introduction to the sample program in OSG

Source: Internet
Author: User

Introduction to the sample program in OSG

Transferred from: http://www.cnblogs.com/indif/archive/2011/05/13/2045136.html

1.example_osganimate
One) demonstrates the use of path animations (Animationpath, Animationpathcallback), and the path animation callbacks can function on camera, Cameraview, MatrixTransform, Positionattitudetransform, etc. on four types of nodes.
II) demonstrate the use of Osgsim::overlaynode

2.example_osganimationeasemotion
A) demonstrates the use of osganimation::easemotion, easemotion can be used to express the displacement, velocity value changes over time, through the different template parameters (functor), to achieve a different curve.
II) a pop-up menu using osgwidget constructs is used in the program.

3.example_osganimationhardware
A) demonstrates the method of using custom Rigtransformimplementation in Osganimation::riggeometry.
b) You can refer to the program to get the animation list included in the skeletal animation model method.

4.example_osganimationmakepath
A) demonstrates the use of the Osganimation::sampler sampler, updating the object color (VEC4), object position (VEC3). The sampler derived template class is used to calculate interpolation and to obtain continuous data based on a set of known discrete data samples. Multiple interpolation methods are supported through template parameters.
Second) in the context of updating the object position, similar to the path animation Animationpath, but it needs to write its own callback to update the node matrix, the advantage is the ability to use a more flexible way to sample data, and Animationpath only linear interpolation.

5.example_osganimationmorph
A) demonstrates the method of using Osganimation::morphgeometry to animate the deformation of the geometry.

6.example_osganimationnode
A) The same functionality as the Osganimationmakepath demo.

7.example_osganimationskinning
One) demonstrates building bones using Osganimation::skeleton, Osganimation::bone, using Osganimation::animation, Osganimation::channel to build animations, Use Osganimation::riggeometry to build skins, and to use Osganimation::basicanimationmanager to play the process of skeletal animation. It can be used as a reference for learning the structure of osganimation skeletal animation.

8.example_osganimationsolid
A) demonstrates motion control of an object using multiple channel (eventually implemented into a matrix that updates the MT node). The difference with example Osganimationmakepath is that the Osganimation::channel, osganimation::animation, and osganimation are used here: Updatematrixtransform, multiple motion control overlays are applied to the same object.

9.example_osganimationtimeline
A) demonstrates the time-line control in Osganimation. Osganimation::timeline, Osganimation::timelineanimationmanager. What is timeline for?

10.example_osganimationviewer
A) demonstrates the loading and playback control of osganimation skeletal animation, which can be switched between multiple actions, but it does not seem to be possible to play multiple actions or pause actions.
II) There is a playback control GUI built using Osgwidget, and a menu that slides into the slide-out can be used as a reference for GUI construction.

11.example_osgautocapture
A) An automatic screenshot of the sample program, the use of custom Osgviewer::renderer,osg::camera::D rawcallback and so on.
b) There is a section of the code to locate the camera with latitude and longitude and direction angle.

12.example_osgautotransform
A) demonstrates the use of osg::autotransform to achieve automatic scaling, rotation, so as to achieve the specified effect of automatic face-to-screen.

13.example_osgbillboard
A) demonstrates the use of Osg::billboard. What's the difference with Autotransform?

14.example_osgblendequation
One) demonstrates the impact of different configurations of osg::blendequation on the rendering results.

15.example_osgcallback
A) demonstrates the use of various callback methods in OSG.

16.example_osgcamera
One) demonstrates single-window multi-camera (using Slavecamera), multi-window multi-camera (one viewer, multiple graphicscontext, multiple camera as slave added to viewer), multi-screen multi-window.

17.example_osgcatch
A) an egg-like game of small game program

18.example_osgclip
A) demonstrates the use of Osg::clipnode (Osg::clipplane).

19.example_osgcluster
A) Multi-machine synchronization Demo

20.example_osgcompositeviewer
A) demonstrates the use of Osgviewer::compositeviewer

21.example_osgcopy
A) demonstrates the use of the clone operation in OSG and the custom usage of OSG::COPYOP.

22.example_osgcubemap
A) demonstrates how to use specular mapping to enhance the model display effect. The specular map uses the cube map (osg::texturecubemap), and the highlight CubeMap is automatically generated using Osgutil::highlightmapgenerator. Use Osg::texgen to automatically generate texture coordinates in a reflection map. Use Osg::texenvcombine to blend the specular map with the original color (ADD).
Osgutil::highlightmapgenerator is derived from osgutil::cubemapgenerator, and there are some other uses for the cube map generator.

23.example_osgdatabaserevisions
A) demonstrates the use of the paging database local cache and the data version check.

24.example_osgdelaunay
A) demonstrates the use of delaunaytriangulator for triangulation of irregular mesh points.

25.example_osgdepthpartition
A) implemented a derived from Osg::group depthpartitionnode node type, it can automatically sub-node tree according to the depth of the division, to solve the problem of deep buffering under large scenes.

26.example_osgdepthpeeling
Depthpeeling

27.example_osgdistortion
A) demonstrates the effect of a similar haha mirror

28.example_osgdrawinstanced
A) demonstrates the method of rendering a quadrilateral patch into several facet slices using drawarraysinstanced.

29.example_osgfadetext
A) demonstrates the use of Osgtext::fadetext and uses Osg::clustercullingcallback to achieve a clustered clipping of text (tailoring the object based on the specified normals and line of sight). The Fadetext encapsulates the ability to automatically fade in and out of each other's occlusion technology.

30.example_osgfont
A) demonstrates the use of fonts

31.example_osgforest
A) demonstrates the effect of forest using a variety of technical methods. First, block processing (cell) is done for all trees in the entire forest and then modeled in a variety of ways, using a block structure. The methods used to model the tree include: Billboard, Shader, cross-patches, etc.

32.example_osgfpdepth
One) demonstrates the use of deep buffer related applications. Floating point depth buffer? Invert the depth buffer?

33.example_osgfxbrowser
A) demonstrates several special rendering effects created using OSGFX, and uses osgfx::effect to manage various effects. The effects include: Anisotropiclighting, Bumpmapping, Cartoon, Outline, Scribe, specularhighlights.

34.example_osggameoflife
One) demonstrates a rendering technique called "ping-pong", which refers to the use of FBO and two texture objects to write the results of a texture as input to another texture in a shader, and then invert the input and output textures for the same operation, so iterate.
The "Gameoflife" used in it is an example of using ping-pong to process pictures and output them.

35.example_osggeodemo
A) demonstrates the loading of the. Geo file, as well as the animated update of the GEO model.
II) GEO Pro is a modeling tool produced by Carbongraphics, and the. Geo file is its model file format.

36.example_osggeometry
A) demonstrates the various construction methods of osg::geometry (geometry).

37.example_osggeometryshades
A) demonstrates how to use the Geometryshader program to dynamically change the drawing of a geometry, in which a point is plotted as a continuously changing crosshair.

38.example_osggpx
A) demonstrates the data structure of a trace path and reads and writes it using Osgdb::xmlparser.

39.example_osggraphicscost
A) demonstrates the use of Osg::graphicscostestimator, Osg::graphicscostestimator is used to evaluate the time required to compile/draw geometry, textures, shader programs, nodes.

40.example_osghangglide
A) demonstrates the process of using a program to build a scene.
Two) realizes a coasting rover.

41.example_osgimagesequence
A) demonstrates the use of osg::imagesequence as a texture map, and through the Osg::imagestream interface for mapping animation playback control method. There are several control schemes for loading imagesequence maps.

42.example_osgimpostor
A) demonstrates the use of osgsim::impostor. The role of the impostor node seems to be to improve rendering efficiency by saving the object's rendering as a texture in some cases, and then by rendering the texture instead of the rendered object.
Two) a custom rover is implemented.

43.example_intersection
A) demonstration and a variety of methods to calculate the intersection, such as Osgsim::lineofsight, Osgsim::heightaboveterrain, Osgsim::elevationslice, osgutil::i Ntersectorgroup.

44.example_osgkdtree
A) demonstrates the use of kdtreee. OSG can automatically build kdtree when reading a model file.

45.example_keyboard
One) demonstrates the handling of keyboard input messages.

46.example_keyboardmouse
A) demonstrates the handling of mouse and keyboard messages.

47.example_osglauncher
A) a three-bit program navigation menu. A cube object is constructed for each example program, and the currently selected object is judged by the immediate intersection calculation, thus associating an example program and initiating execution.

48.example_osglight
A) demonstrates the use of light.

49.example_osglightpoint
A) demonstrates the use of Osgsim::lightpoint and Osgsim::lightpointnode.

50.example_osglogicop
A) demonstrates the use of Osg::logicop (GLLOGICOP).

51.example_osglogo
A) demonstrates the creation of the logo.

52.example_osgmanipulator
A) demonstrates the use of various types of osgmanipulator (Dragger).

53.example_osgmemorytest
A) Some of the GL operation tests.

54.example_osgmotionblur
One) demonstrates how to use the cumulative buffer (accumulation buffer) to implement a simple motion blur effect.

55.example_osgmovie
A) demonstrates the function of video playback. Need to use video reading plug-ins, such as Osgdb_quicktime, Osgdb_ffmpg

56.example_osgmultiplerendertargets
One) demonstrates how to use the RTT (render to Texture), MRT (multiple render Targets).

57.example_osgmultitexture
A) demonstrates the use of multiple textures.

58.example_osgmultitexturecontrol
A) demonstrates the use of Osgfx::multitexturecontrol.

59.example_osgmultiviewpaging
A) multi-viewport split screen demonstration.

60.example_osgoccluder
A) demonstrates the use of osg::convexplanaroccluder.

61.example_osgocclusionquery
A) demonstrates the use of Osg::occlusionquerynode.

62.example_osgoit
A) The use of depth peeling.

63.example_osgoutline
A) demonstrates the method of drawing an outer contour line of an object using Osgfx::outline.

64.example_osgpackeddepthstencil
A) Osg::camera: use of the:P Acked_depth_stencil_buffer.

65.example_osgpagedlod
A) demonstrates the use of OSG::P Agedlod to achieve levels of detail and flow-loading.

66.example_osgparametric
One) demonstrates the use of a vertex shader (Vertex Shader program) for simple morph animations.

67.example_osgparticle
A) Several particle effects are demonstrated, and a custom Osgparticle::operator method is used to control particle motion.

68.example_osgparticleeffects
A) demonstrates the effects of several predefined effect in osgparticle, including explosions, explosive fragments, smoke, fire, etc.

69.example_osgparticleshader
A) osgparticle realization of a fountain effect

70.example_osgpdf
Use Osgwidget::P dfreader to read and display examples of PDF documents, you need to have the appropriate plug-in support.

71.example_osgphotoalbum
A 3D photo album demo program? Implements a format for merging multiple picture files into an album file.

72.example_osgpick
An example of picking and judging by the intersection calculation.

73.example_osgplanets
A sample program of celestial bodies that uses billboard to create atmospheric effects for the sun.

74.example_osgpoints
Demonstrates drawing points using the point sprite (osg::P ointsprite) and setting the point size.

75.example_osgpointsprite
Example of a point cloud using point sprite Painting (OSG::P ointsprite).

76.example_osgposter
Demonstrates how to render a large-resolution picture (high-resolution image).

77.example_osgprecipitation
Demonstrates the osgparticle: rain and snow effects achieved by the:P Recipitationeffect.

78.example_osgprerender
Demonstrates the use of render-to-texture (RTT). Render the scene to the texture when pre_render, then use this texture to render the main scene.

79.example_osgprerendercubemap
Demonstrates how to use cube mapping (OSG::TEXTURECUBEMAP) to implement ambient reflection.

80.example_osgrefelect
Demonstrates the implementation of a specular reflection effect.

81.example_osgrobot
A multi-joint robot is presented, which is caused by the tree structure of matrix nodes.

82.example_osgscalarbar
Demonstrates a color ruler effect that is implemented using Osgsim::scalarbar.

83.example_osgscreencapture
Demonstrates how to implement screenshots using Osg::camera::D rawcallback derived classes.

84.example_osgscribe
The effect of attaching gridlines on the model surface, using OSG::P olygonmode and OSG::P olygonoffset Implementation, consistent with osgsim::scribe effect and principle.

85.example_osgsequence
Demonstrates the effect of serializing multiple models, using the Osg::sequence node implementation.

86.example_osgshadercomposition
Demonstrates the use of the shader combination (shadercomposition), using the Osg::shaderattribute

87.example_shadergen
Demonstrates the GLSL code that uses Osgutil::shadergenvisitor to generate replacements for fixed-function pipelines.

88.example_osgshaders
Demonstrates the use of several shader code files in the Data\shaders directory.

89.example_osgshaderterrain
An example of terrain elevation generated by texture sampling in a shader program.

90.example_osgshadow
A shadow Effect demo program that contains a variety of real-time shadow algorithm implementations.

91.example_osgshape
Use Osg::shapedrawable to build a demonstration of common geometry.

92.example_sharedarray
Demonstrates the method of constructing geometry in a custom data structure, deriving the Osg::array class.

93.example_osgsidebyside
Osgsim::multiswitch, Osgsim::D The control of the Oftransform node. Single-window multi-viewport usage.

94.example_osgsimplifier
Demonstrates a method of simplifying a model using Osgutil::simplifier.

95.example_osgsimulation
Demonstrates the use of node tracking bots (osgga::nodetrackermanipulator).

96.example_osgslice
Should be a very old example, also in the direct use of Osgutil::sceneview, there is no link osgviewer library, so the window GC call failed, cannot run.

97.example_osgspacewarp
Use a small technique to implement the point of viewing the effect of becoming a line in the case of camera motion (similar to the effect of phantom). The trick is that for each point, a line is drawn, and one endpoint of the line is always at the point's current position, and the other endpoint uses the point at the position of the previous frame.

98.example_osgspheresegment
An example of using osgsim::spheresegment to draw an arc surface.

99.example_osgspotlight
Demonstrates the use of spotlights. Osg::lightsource

100.example_osgstereoimage
Demonstrates how to create a stereoscopic picture.

101.example_osgstereomatch
For an example of stereo matching of left and right eye images, use the Data\images directory to run a picture of the dog.

102.example_osgteapot
Use OSG::D rawable Derived classes encapsulate the drawing of the classic Glut_teapot.

103.example_osgterrain
Example of dynamic control of terrain parameters, using Osgterrain::terrain.

104.example_tessellate
Demonstrates the use of tessellation (tessellation), Osgutil::tessellator.

105.example_osgtext
Demonstrates the various ways of using text, Osgtext::text.

106.example_osgtext3d
Demonstrates the use of stereoscopic text, Osgtext::text3d.

107.example_osgtexture1d
Demonstrates the use of a one-dimensional texture osg::texture1d, texture coordinates generation node Osg::texgennode.

108.example_osgtexture2d
The use of two-dimensional textures is demonstrated using osg::texture2d, and the different effects of textures in different texture filtering modes (filter), Texture wrapping mode (wrap), and various shaped coefficients (anisotropic) are demonstrated by updating callbacks.

109.example_osgtexture3d
Demonstrates the use of osg::texture3d for three-dimensional textures. The example uses multiple two-dimensional images to assemble a three-dimensional texture object, specifying s, t two texture coordinates in the vertex data, and using Osg::texgen to generate a separate texture coordinate R (Texgen can be used to generate the texture coordinates of a dimension independently). Dynamically update texture coordinates R by updating Texgen parameters in the update callback, resulting in smooth switching between multiple textures due to the linear filtering used by the texture filtering method.

110.example_osgtexturecompression
Demonstrates the contrast effect of multiple compression formats (Internelformatmode). The use of multi-viewport osgviewer::compositeviewer is also available.

111.example_osgtexturerectangle
Demonstrates the use of rectangular texture osg::texturerectangle, where the texture coordinate range of a rectangular texture must be a picture pixel range, and the wrapping mode does not support repetition and does not support borders and mipmap.

112.example_osgthirdpersonview
Use Osgviewer::compositeviewer to build a multi-window view and draw the first window of the camera's view cone while drawing the same scene in the first window in the second window.

113.example_osgthreadedterrain
One) use the incremental compilation osgutil::incrementalcompileoperation to avoid dropping the frame rate caused by loading large models.
II) use of Osgterrain::layer and Osgterrain::terraintile.

114.example_osguniformbuffer
Demonstrates the use of osg::uniformbufferobject.

115.example_osgunittests
Unit test Code.

116.example_osguserstats
Demonstrates how to display user-defined statistics in the OSG statistics display interface.

117.example_osgvertexattributes
Demonstrates the use of vertex properties (Vertexattribute) in a shader program.

118.example_osgvertexprogram
Examples of environmental reflection using cube maps (CUBEMAP) and vertex shader programs (vertexshader), along with a Sky box implementation.

119.example_osgviewerglut
The combination of OSG and Glut window system.

120.example_osgviewermfc
The combination of OSG and MFC.

121.example_osgvirtualprogram
The use of the coloring program.

122.example_osgvolume
Examples of three-dimensional texture and body rendering.

123.example_osgwidgetaddremove
Osgwidget examples of dynamically adding and removing widgets, with custom handling of mouse events.

124.example_osgwidgetbox
Osgwidget::box use, and drag-and-drop processing.

125.example_osgwidgetcanvas
The use of Osgwidget::canvas.

126.example_osgwidgetframe
For Osgwidget::frame, you can drag the border around the left and right corner to change the widget size and drag the border on the upper side to move the widget.

127.example_osgwidgetinput
The use of Osgwidget::input to receive text input.

128.example_osgwidgetlabel
The use of the text label Osgwidget::label.

129.example_osgwidgetmenu
Example of constructing a menu using Osgwidget.

130.example_osgwidgetmessagebox
Example of a MessageBox built using Osgwidget::frame, Osgwidget::box, Osgwidget::label, and so on.

131.example_osgwidgetnotebook
tab-Tabbed Notepad using osgwidget constructs.

132.example_osgwidgetperformance
Osgwidget efficiency test.

133.example_osgwidgetscrolled
The scroll screen of the Osgwidget window is implemented by setting the mouse wheel message callback handler to handle the wheel message.

134.example_osgwidgetshader
Use shader rendering for widgets.

135.example_osgwidgetstyled
The use of Osgwidget::style.

136.example_osgwidgettable
Use of table osgwidget::table.

137.example_osgwidgetwindow
Use of LUA scripts.

138.example_osgwindows
Example of multi-window stitching.

139.example_osganalysis
Scene analysis?

Introduction to the sample program in OSG

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.