Introduction to virtual reality.
Virtual reality (VR) is a new world created by computer and electronic technology, and it is a seemingly real simulation environment. Through various sensing devices, users can check or operate objects in the virtual world according to their own feelings, and take advantage of human natural skills to participate in events. At the same time, it provides multi-channel information such as vision, hearing and touch. Users can intuitively and naturally perceive in real time through vision, hearing, touch, etc. Immerse participants in a simulated environment. The three most prominent features of VR are its three "I" features: interactivity, immersion and imagination.
Virtual reality technology is developed on the basis of computer graphics, simulation technology, multimedia technology, sensor technology and artificial intelligence. Virtual reality technology has made great progress in the last decade, which is mainly attributed to the rapid development of computer software and hardware conditions, as well as the decline in the price of virtual reality special equipment and the improvement of performance. At present, virtual reality technology has been widely used and is becoming more and more popular, not only in large-scale projects like NASA, but also in some games. You can even build your own personal PCVRS (Personal Virtual Reality System) on some high-end PCs.
When designing a virtual reality system, apart from the hardware conditions that individuals can't customize, the only thing that can give full play to personal initiative is to work hard on the software of the system. To design a VR system, the first problem to be solved is to create a virtual environment, which includes three-dimensional models, three-dimensional sounds and so on. Among these elements, it is most important to create a realistic and reasonable model and display it dynamically in real time, because vision has the largest intake of information and the most sensitive response. A large part of the construction of virtual reality system is also to establish a realistic and suitable three-dimensional model.
Introduction to 2.3D Studio MAX
3D Studio MAX is a powerful 3D modeling software launched by Kinetix Company. Because it is based on Win NT or Win98 platform, it is easy to learn, and because of its relatively low price advantage, it has become the most popular 3D modeling software on personal PC. Its 3.0 version has consolidated its position on the PC platform. Compared with the previous version, its version 3.0 has obvious improvements in the following aspects:
(1) workflow mode makes the coordination of working groups easier and more efficient. 3D Studio MAX R3 has introduced the workflow mode, from the introduction of external reference system (XRef) and graphic view, and now 3D MAX can be controlled externally by other programs without activating its work interface.
(2) Improvement of usability. The improvement of the operation interface is the most significant change in version 3.0. In addition to the changes in appearance, R3.0 has also added functions such as custom interface, macro recording, plug-in code, transformation Gizmo, track bar and so on.
(3) Promotion of rendering. Autodesk acquired Discreet Logic, which is famous for its rendering and video technology, and absorbed its advanced technology. 3D MAX R3 almost redesigned its renderer, which not only improved the rendering speed, but also improved the rendering quality of the picture.
(4) Enhance the modeling technology. The enhancement of modeling technology is the most important and outstanding improvement of 3D Studio MAX, which is also a powerful reason to apply it to the construction of virtual reality system. The main improvements include:
① Subdivision surface technology. 3DS MAX includes subdivision surface technology. Subdivision surface technology is the most popular modeling technology in the industry since 1998, and it is likely to surpass NURBS technology. It can make modeling easier and achieve better results.
② Flexible choice. This technique can "partially" select vertices, so as to obtain a smooth and soft effect when transforming vertices, which is very useful for modeling complex objects.
③ Surface tools and improved NURBS technology. Using surface tools can produce very complex "patch" models, which is also an important modeling method. The NURBS technology in version 3.0 not only accelerates the speed, but also adds a series of convenient and easy-to-use functions.
5] Better support for games. 3D Studio MAX R3 greatly enhances the support for games, and these functions can also be used in other occasions.
① The role animation function has been added. Version 3.0 has the built-in function of making character animation, which can easily make human or animal movements, soft objects and deformation effects.
② Vertex information and enhanced mapping coordinate function. Vertex can now be colored, adding the channel of vertex, enhancing the function of UVW Unwarp, and adding the world XYZ map coordinates.
In addition, 3D Studio MAX R3 also significantly enhanced the animation function.
3.3 the application of dsmax in the construction of virtual reality system.
As mentioned above, VR system requires real-time dynamic and realistic simulation of the environment. Considering the limitation of hardware and the real-time requirement of virtual reality system, the modeling of VR system is significantly different from the animation modeling method based on modeling. Most VR modeling technologies adopt model segmentation, texture mapping and so on. At present, there are two main methods to construct virtual scenes in virtual reality: model-based method and IBR (image-based rendering) method. Both methods can be implemented and verified in 3DS MAX, which will be explained in detail below.
3. 1 Model-based construction method. The geometric modeling methods of 3DS MAX mainly include polygon modeling, non-uniform rational B-spline curve modeling (NURBS) and subdivision surface modeling. Usually a model can be obtained by several methods, but each has its own advantages and disadvantages and simplification.
(1) polygon modeling. Polygon modeling technology is the earliest modeling technology, and its idea is very simple, that is, using facets to simulate surfaces, thus making various shapes of three-dimensional objects. Facets can be triangles, rectangles or other polygons, but in fact they are mostly triangles or rectangles. Using polygon modeling, you can directly create the basic geometry, and then adjust the shape of the object with modifiers as needed. You can also use lofting, surface modeling, combined objects and other methods to make virtual reality work. The main advantages of polygon modeling are simple, convenient and fast, but it is difficult to generate smooth surfaces, so polygon modeling technology is suitable for constructing objects with regular shapes, such as most artificial objects. At the same time, according to the requirements of virtual reality system, models with different resolutions can be obtained only by adjusting the parameters of the established models to meet the needs of real-time display of virtual scenes.
⑵ NURBS modeling. NURBS is the abbreviation of non-uniform rational B-spline, which is purely a mathematical concept of computer graphics. NURBS modeling technology is one of the most important modeling methods for three-dimensional animation in recent four years, which is especially suitable for creating smooth and complex models, and has unparalleled advantages in universality of application and fidelity of model details. However, NURBS modeling must take surface patches as the basic modeling unit, so it also has the following limitations: the number of topological structures of NURBS surfaces is limited, and it is difficult to make objects with complex topological structures (such as objects with holes); The basic structure of NURBS surface patch is mesh. If the model is complex, it will lead to a sharp increase in control points, which is difficult to control. When constructing complex models, it is often necessary to cut surfaces, but a large number of cutting will easily lead to calculation errors; It is difficult to construct "branch" objects with NURBS technology.
⑶ Subdivision surface technology. Subdivision surface technology is a three-dimensional modeling method introduced by 1998. It solves the difficulties faced by NURBS technology in creating surfaces. It uses any polyhedron as the control grid, and then automatically generates smooth surfaces according to the control grid. The mesh of subdivision surface technology can be arbitrary, so it is easy to construct various topological structures and keep the smoothness of the whole surface all the time. Another important feature of subdivision surface technology is "subdivision", that is, without increasing the complexity of the whole object, only details are added to the local part of the object, while maintaining the smoothness of the object after adding details. However, because subdivision surface technology is a new technology, the support of 3D Studio MAX R3 is not mature, and some very complicated models cannot be created.
With the understanding of the above 3DS MAX modeling methods, we can choose the appropriate modeling method according to the requirements of the virtual reality system before making the corresponding model for the virtual reality system, so as to complete the production of virtual reality works quickly and economically.
When making virtual reality works, we should follow a principle: on the premise of ensuring the visual effect, try to use relatively simple models, and the objects that can be constructed by parametric methods should be constructed by parametric methods as much as possible. At the same time, in the process of model creation, the models should be divided and modeled separately to facilitate the operation and investigation in the virtual reality system.
For the motion or principle demonstration of complex objects, we can animate the motion and description of objects in advance and save them as avi files, and then wait for the appropriate trigger event of VR system to play the avi files.
3.2 Image-based rendering (IBR), the traditional graphic rendering technology is designed for the geometric shape of the scene, so the rendering process involves complex modeling, blanking and brightness calculation. Although the visibility pre-calculation technology and scene geometry simplification technology can greatly reduce the number of patches in the scene, the existing computer hardware can not draw the simplified scene geometry in real time for highly complex scenes. Therefore, an important problem we are facing is how to realize real-time rendering of realistic graphics on a computer with average computing power. IBR technology is a brand-new graphics rendering method, which aims to achieve this goal. This technology generates scenes from different viewpoints based on some pre-generated images (or environmental maps). Compared with the traditional rendering technology, it has distinct characteristics:
⑴ Graphics rendering has nothing to do with the complexity of the scene, but only with the resolution of the picture to be generated.
(2) Pre-stored images (or environmental maps) can be either computer-generated or actually taken pictures, and they can be mixed.
⑶ This rendering technology does not require high computing resources, and can realize real-time display of complex scenes on ordinary workstations and personal computers.
Because each frame of the scene only describes the result of observing the scene from a given viewpoint along a certain line of sight, it is not to restore the geometric or optical scene model from the image. In order to get rid of the limitation of single frame of the scene, we can take pictures from a given viewpoint or get images from all directions through calculation, and stitch them into a Zhang Quanjing image. In order to enable users to roam in the scene, we need to establish panoramic views of different positions of the scene, and then obtain the corresponding views near the viewpoint through view interpolation or deformation. IBR technology is a new research field, which will change people's traditional understanding of computer graphics, thus making computer graphics more widely used.
The application of 3DS MAX in IBR is natural. 3DS MAX's excellent texture mapping, powerful mapping control ability and various spatial distortions and deformations provide a simple method for processing images and environmental maps. For example, in various IBR applications, the generation of panorama is a problem that often needs to be solved. In this respect, 3DS MAX can be used to generate the corresponding base according to the required panorama type. For example, a cylindrical panorama can be generated as a cylinder, and then the strip images in all directions can be controlled to be mapped along the cylinder. Moreover, the process of image mosaic can be compiled into a script file, made into a plug-in and embedded into the 3DS MAX environment, so that a panoramic view can be easily generated, and the effect of roaming in the virtual reality system can be observed in advance, which can be realized by setting the motion track of the camera in the video post. In fact, there are already some plug-ins for panorama generation and correction.
After creating a model for VR system with 3DS MAX, it is necessary to adopt LOD(Level of Detail) model according to the requirements of VR system. If necessary, we can use the LOD plug-in provided by MAX to directly generate the LOD model of the object. Finally, according to the editing environment of VR system, we can output the model as a file type that the editing environment can accept, such as VRML97 or DXF.
The above mainly introduces the production of VR works by 3DS MAX, and then briefly introduces some other applications of 3DS MAX.
In virtual reality system, stereoscopic view with parallax and depth of field is often needed. This can be achieved by setting two cameras in 3DS MAX to simulate human eyes rendering stereo view pairs. This requires adjusting the relative positions of the two cameras, and then rendering different camera views. Please refer to reference [2] for the specific implementation process.
3DS MAX is an application software written in C++ language and Open GL, and the MAX SDK it provides is also written in C++. We can easily realize our graphics algorithm by combining c++ and Open GL with MAX SDK, and then embed our algorithm into 3DS MAX environment as a plug-in, regardless of the complex code of object model generation and processing. Using the rendering timer of 3DS MAX, we can easily check the efficiency and effect of our algorithm.
refer to
1. Zeng Fangfang. Virtual reality technology. Shanghai Jiaotong University Press, 1st edition, 1997.
2. Huang Xinyuan Virtual reality technology and its application. Science press, first edition, 1999.
3. Shen Xiangyang and He Liwei. Concentric mosaic rendering. The' 99 SIGGRAPH.
4. Xu. 3D Studio MAX R3 (I)。 Tsinghua University Publishing House, first edition, 1999.
4.3D Studio Max R3 technical documentation. Kinetix company.
5. Bag, Peng. State key laboratory of CAD&CG of Zhejiang University. Image-based graphics rendering technology. 1998 No.36 technical special edition.