Scholarly article on topic 'Virtual Interior Design Based On VRML AND JAVA'

Virtual Interior Design Based On VRML AND JAVA Academic research paper on "Computer and information sciences"

CC BY-NC-ND
0
0
Share paper
Academic journal
Physics Procedia
OECD Field of science
Keywords
{"Virtual reality" / "Virtual Reality Modeling Language" / "Virtual Interior" / Java / EAI}

Abstract of research paper on Computer and information sciences, author of scientific article — Shaoliang Qi

Abstract Virtual reality has been involved in a wide range of academic and commercial applications. It can give users a natural feeling of the environment by creating realistic virtual worlds. In this paper, we use vrml and java to discuss the virtual interior design. EAI and JASI are used to realize the interaction between user and virtual interior scene.

Academic research paper on topic "Virtual Interior Design Based On VRML AND JAVA"

Available online at www.sciencedirect.com

SciVerse ScienceDirect

Physics Procedia 33 (2012) 1614 - 1620

2012 International Conference on Medical Physics and Biomedical Engineering

Virtual Interior Design Based On VRML AND JAVA

Shaoliang Qi

Department of Art and Design, PING DING SHAN University Pingdingshan, 467000, P.R .China Lq721201@163.com

Abstract

Virtual reality has been involved in a wide range of academic and commercial applications. It can give users a natural feeling of the environment by creating realistic virtual worlds. In this paper, we use vrml and java to discuss the virtual interior design. EAI and JASI are used to realize the interaction between user and virtual interior scene.

© 20121 Published by Elsevier B.'v. Selection and/or peer review under responsibility of ICMPBE International Committee. Keywords: Virtual reality; Virtual Reality Modeling Language ; Virtual Interior; Java; EAI.

1. Introduction

Virtual reality has been involved in a wide range of academic and commercial applications. It can give users a natural feeling of the environment by creating realistic virtual worlds. The more intensively World Wide Web is used in our daily life, the more strongly people desire for diverse, sophisticated and interactive media types on the WWW. Tourists may desire to plan their trips in advance by selecting tourist attractions by previewing through the WWW. Virtual reality is the digital transposition of real scenes and objects using informatics' technologies; interaction between user and virtual reality is made possible by navigation systems, 3D vision instruments, manipulation objects tools and so on. Interactive 3D graphics on the WWW (Web3D) such as Web-based Virtual scene become more attractive and demanded[1].

With the fast development of network velocity and computer capability, more and more people try to use Virtual Technology on the development of commerce. The application platform of VRML (Virtual reality modeling language) is Internet , so it has the most possibility to become the frame of constructing VR. In our paper, 3DSMAX is used to construct static virtual interior design. And VRML EAI and JASI are used to realize the interaction between user and virtual interior scene.

1875-3892 © 2012 Published by Elsevier B.V. Selection and/or peer review under responsibility of ICMPBE International Committee. doi:10.1016/j.phpro.2012.05.260

2. Construction of virtual interior design based on VRML and 3dmax

VRML (Virtual Reality Modelling Language) is a language, specifically designed to describe 3D scenes, which has an increasingly number of users as it can be interpreted by a WEB browser. VRML is independent of HTML. It is a language for description of highly interactive three dimensional scenes. Current version 2.0 is called "Moving Worlds" and provides support for easy walk-through virtual scenes, multimedia effects and real-time interaction. Hyperlinks are used either for retrieving and combining parts from another Web sites or for "hyperjump" from one virtual word to another one. The positive features of VRML are:

+ introducing three-dimensional worlds in natural way + platform independence + working well over low-bandwidth connections + supporting an extensible model

VRML is a description of the three-dimensional realm language, all 3D modeling software for virtual environment constructed base, VRML as a language can also be directly constructed virtual environment. Directly through VRML language construct three-dimensional objects have code in the short run time, etc. You can also directly edit with WordPad, VRML files are also available some support VRML Editor Edit (such as VrmlPad) preparation of VRML files. For simple objects generally use VRML direct modeling, here's a simple objects generally refers to the rules of objects geometry, such as: a rule in the table. But with VRML language programming is often complex, with VRML to construct a three-dimensional object, you see only the code line by line, but cannot see the code corresponds to the three-dimensional graphics, this brings to write code more difficult. Only after you have written your code, you can use the browser on the editing of three-dimensional objects[2].

Using the tools which support VRML to construct virtual environment. Writing complicated scene using VRML is trival, we can use can provide better visual tools for VRML complex 3d object modeling. Those can greatly improve the efficiency of development. Currently there are many tools support VRML, and most of them provide visual operation, so through modeling can dump development tools, improve the development of the boring language of effectiveness and efficiency. There are many develop software such as 3DS MAX, Maya, LightScape[3]. These software can export *.wrl file.Because these visual tools and VRML between provides format for several tools, interface combined. However, due to the document itself offers VRML language development and the format of coding, leading to file a relatively large, so the complete works of VRML after optimizing compression is an inevitable in the aspects of work, as the most professional VRML VRMLPad editor software, give us a good compression function.

So many developing tools are provided to write a VRML file; usually a simple text editor is enough to describe a simple virtual world. We use 3dmax to construct the virtual environment[4]. The basic steps for creating a VRML file in Max:

• Create your geometry

• Assign Materials, Lighting and Texture Maps and Cameras.

• Make your animations.

• Under "Helpers" on the "Create" Command Panel choose one of the VRML Helper sections.

• Place your VRML nodes in the scene and link them appropriately.

• Select File/Export.

• Export your file as a ".wrl" file.

• Configure the export dialogue box and press OK.

• Check out your file in your VRML browser.

• You might want to open the file in your text editor at this point as well. You can look at the code, edit and save it and look at it again in the browser. You will often be going back and forth between the browser, the text editor and MAX.

3. VRML AND JAVA for virtual interior design

For Virtual Interior Design, even though it is vivid to use animation effect, viewers take in message passively. It would be better for viewers being able to control the product. As a programming language characterized by hardware and software being unrelated, Java complemented VRML. The former is for programmer designing in internet environment whereas the latter is for building virtualized product. As VRML is not strong in its interactivity, Java complemented VRML by way of using Script node which connects VRML with Java within virtual product[5].

There are two popular approaches to using Java to extend VRML virtual product: one is internal Java Script Authoring Interface (JSAI) and the other is External Authoring Interface (EAI).

Java Script Authoring Interface. A vrmled product consists of nodes that mimic real world objects and concepts such as various geometries and material descriptions etc. Script nodes defined within the VRML file are used to program more complex behaviors for a VRML product. A node can signify or receive events from the user or other nodes from the scene and effect changes in the scene by using ROUTE to send events. The script is the way VRML communicates with outside world, encapsulating the Java code and providing naming conventions for interconnecting Java variables with field values in the scene. Program scripts are miniature applications that contain the logic and interfaced Java classes import the rml.*; vrml.field.* and vrml.node.* class libraries to provide type conversion between Java and VRML. In this way, we can establish a link between a VRML scene and a Java application by making a handle to a Java, class file in a script node [6].

j,1 i.i 1i:.

Fig. 1 Events routing in an object with the Script node.

In spite of its strengths, JSAI is unable to link with external data because it runs entirely within its plug-ins environment.it needs EAI(External Authoring Interface). The EAI is a set of language-independent bindings that provides a conceptual interface between VRML scenes and an external environment. The EAI not only allows manipulation all of the entities that internal scripts can modify. By using EAI to bind the data in the Java applet to the VRML world, developers are able to create a compelling cost efficient, cross-platform solution. EAI firstly creates an object reference to the browser, using the methods of that object to locate various nodes which are named using a VRML statement DEF within a scene, once the pointer to a node is obtained. It then creates objects that encapsulate the EventIn and EventOut constructs of that node. Once that is accomplished, manipulating values within a VRML world is accomplished in the same way as SAI. Another feature of EAI is being notified when events are sent from eventOuts of nodes inside the scene. In this case the applet must subclass the EventOutObserver class, and implement the callback() method. The advice() method of EventOut is then

passed the EventOutObserver. It permits handling of events from multiple sources, the source being distinguished just according to this value. Thus the applet can be notified once something has happened in the VRML world[7].

Fig. 2 EAI event transmit mechanism

To enable the Java Applet to interact with a VRML scene through EAI, it is necessary to pre-code all the DEFed nodes and related events in the Java file in advance. This approach results in data redundancy and it is also impossible to include all the DEFed nodes in a single file. We then use X3D DOM Handler to extract and store the DEFed names as a tree structure in memory to enable the EAI Handler to access and send or receive events to/from them[8].

The combination of VRML and Java is a very powerfultool for the control of virtual products. Interactive products that have their behavior defined by user actions can be modeled with VRML using a Script node and its associated program, which is capable of receiving parameters from another Java application, responsible for the user interface.

4. Virtual INTERIOR DESIGN

4.1 Based on 3DS MAX modeling for complex objects

In the world, the.3ds MAX is the most widely used of 3d modeling and animation, software rendering, fully meet the need of high quality animation production. Since the.3ds MAX out later, with its powerful 3d graphics functions has won numerous praise. Although the.3ds MAX derived from *.WRL format, but use of complex object modeling.3ds MAX can be greatly reduced development cycle, improve efficiency. If you write directly with VRML language is vastly more difficult, but, for simple objects can directly use VRML language. If use of computer modeling on visualization tool will become vastly more, while using 3ds MAX can more easily to be model. Figure 3 is in after the 3ds MAX structure "computer model is derived using visual tools," could not only reduce workload, and the model is constructed with good 3dmax effect. But not for VRML 3dsMAX design, so use 3dmas file generated VRML MAX is huge, but also often data will appear data lost phenomena, such as: use map 3DSMAX in effect, the export of *.WRL document, texture path will be lost. But can use VRMLPad editor, will open in the documents are in the corresponding texture map route, change URL that can reproduce texture[9].

Fig. 3 3dsmax for three-dimensional model

4.2 3d scene positioning assembly

Use the VRML language Inline node, the method is very common assembly, very simple also. Defect is bad. ISA focuses on the scene, locate visualization is easy. But it is a weakness, only with the proportion of XYZ three direction techniques.so.

ISB can also be used to assemble, can be complex scenes as the object, but its and assemble the compatibility of 3dsmax Therefore, we use Inline node and the way of combination of 3dsMAX. assembled in positioning, use.3ds MAX Inline assembled. Firstly constructed of good in.3ds MAX single 3d objects in 3d model, and houses for positioning reference model. Will construct good 3d object model is incorporated into one scene in total corresponding position after its corresponding VRML derived file format. Finally using Inline node of the 3d model (VRML file). Figure 4 is part of the sitting room after assembling of virtual scene graph.

Fig. 4 Living room virtual scene graph

4.3 Through JAVA, JAVASCRIPT for dynamic interactive

If the building is a virtual environment of indoor static scene. "User" watching the room decoration and layout can have a vivid feeling, also can from different angles, carefully observe an object, "user" in a virtual environment of identity as a spectator. But this is far from enough for users, because when "user" on a piece of furniture dissatisfied, but cannot respond and feedback. This is mainly because he observes the scene dynamic interaction, so its commercial value, cannot satisfy the demand of users. And the SCRIPT by VRML node and JAVA, JAVASCRIPT communication, it can achieve some degree of interaction. As shown in figure 6, if one piece of furniture is unsatisfactory (such as the bed in the

bedroom, you can click) virtual scene in "bed" three-dimensional models will pop-up and relevant 2d images "bed". Select the corresponding 2d images will cause the 3d scene to transform model. Through the nodes in JAVA Script cited the Script compiler and class in Script functions described above.

As shown in fig5 and when current 3d modeling of bed "not satisfied", then click when the bed will pop up after 6A as the "interactive dialog box, select the option, interactive scene shown, such as fig6 is achieved with the virtual scene in certain degree between the interaction.

Using Javascript also can achieve some degree of interaction. "Observer" on a 3d model may be very satisfied, but on the modelling of color or exterior not satisfied, through to the same object can realize the Javascript different material. Of course through the Java can realize, but some cases with Javascript use Java cut than simple and direct embedded VRML Javascript can. As to the scene of the sitting room sofa modelling is very satisfied, but feel its appearance and overall design slightly, can not match by clicking on the map in the sofa to change its appearance, as shown in figure6 material.

Virtual reality modeling language pushed the commercialization of virtual reality, which in the electronic commerce has wide application prospects. Using various may be used to support the three-dimensional development tools, VRML can preliminarily feel virtual reality of commercial value. But the virtual reality technology is a new technology, its value is not fully developed[10].

5. Conclusion

Fig. 5 Based on Java interactive scene for living-room

Fig. 6 Based on Java interactive scene for bedroom1

Virtual reality modeling language pushed the commercialization of virtual reality, which in the electronic commerce has wide application prospects. Using various may be used to support the three-dimensional development tools, VRML can preliminarily feel virtual reality of commercial value. But the virtual reality technology is a new technology, its value is not fully developed.

Using a desktop VRML, and use JAVA virtual environment provides support, realized the VRML setups user and the interactive virtual environment, basically met some business needs. But this is not a complete interactive, because users can only choose not to revise, scene. In the future research could try a fully interactive virtual scene, users can make any changes in the browser. With the development of virtual reality technology and virtual reality modeling language will reflect more value.

References

[1] B. Jung, J.-T. Milde, An open virtual environment for utonomous agents using VRML and Java, in: Proceedings RML'99,

[2] Jason Wood, Helen Wright and Ken Brodlie, Collaborative Visualization, Proceedings of IEEE Visualization 1997 Conference, edited by R. Yagel and H.Hagen, 1997, pp .253-260.

[3] I. Wachsmuth, B. Lenzmann, T. Jörding, B. Jung, M.Latoschik, M. Fröhlich, A virtual interface agent and itsagency, in: W. Johnson (Ed.), Proceedings of the Istinternational Conference on Autonomous Agents, Marina delRey, CA, Febraury 5-8, 1997, ACM Press, New York, 1997,pp. 516-517.

[4] H. P. Meinzer, M. Shaffer, G. Glombitza, A. Mayer, H. Evers, and . Meetz, "Segmentation of medical images, course notes 24, threedimensional visualization of medical data," presented at Proc. SIG RAPH'94.

[5] W. F. Decraemer, S. M. Khanna, and W. R. J. Funnell, "Vibrationsof the cat tympanic membrane measured with high spatial resolution,"presented at 20th Midwinter Res. Mtg., Assoc. Res. Otolaryngol., St.Petersburg Beach, FL, 1997

[6] W. Stanford, W. E. Erkonen, M. D. Casssell, B. D. Moran, G. Easley,R. L. Carris, and M. A. Albanese, "Evaluation of a computer-basedprogram for teaching cardiac anatomy," Investigative Radiol., vol. 29,pp. 248-252, 1994.

[7] R. Kikinis, M. E. Shenton, D. V. Iosifescu, R. W. McCarley, P.Saiviroonporn, H. H. Hokama, D. Metcalf, C. G. Wible, C. M. Portas, R.M. Donnino, and F. A. Joesz, "A digital brain atlas for surgical planning, odel-driven segmentation and teaching," IEEE Trans. Visual. Comput.Graphics, vol. 2, pp. 232-241, Jan. 1996.

[8] Hartman, J., Wernecke, J. (1996). The VRML 2.0 Handbook: Building Moving Worlds on the Web. Addison-Wesley, Reading (MA).

[9] N. Badler, B. Webber, J. Kalita, J. Esakov, Animations from nstructions, in: N. Badler, B. Barsky, D. Zeltzer, (Eds.),Making Them Move. Mechanics, Control, and Animation of rticulated Figures, Morgan Kaufman, San Mateo, CA, 1991,pp.

[10] Brenner, C. & Haala, N. (2001): Automated Reconstruction of 3D City Models. In Abdelguerfi, M. (ed), 3D Synthetic Environment Reconstruction. Kluwer Academic Publishers, pp. 75-101.