Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

VSRD International Journal of Mechanical, Civil, Automobile and Production Engineering, Vol.

VIII Issue VMay 2018 / 141


e-ISSN: 2249-8303, p-ISSN: 2319-2208 © VSRD International Journals: www.vsrdjournals.com

RESEARCH PAPER

CONVERSION PROCESS OF VRML (VIRTUAL REALITY MODELING


LANGUAGE) TO HTML5 (WEBGL)
1Dipak
Vinayak Shirbhate* and 2Dilip Sahebrao Ingole
1Principal,
Shri Dadasaheb Gaval Charitable Trust’s Vikramshila Polytechnic,
Amravati, Maharashtra, INDIA.
2Professor, Mechanical Engineering Department

Prof. Ram Meghe Institute of Technology & Research, Amravati, Maharashtra, INDIA.
*Corresponding Author Email ID: dipakshirbhate@gmail.com

ABSTRACT
In this paper author uses a method to convert a VRML file into a WebGL rendered scene through an offline application that is capable
of rendering this uploaded VRML file within the Web browser itself without any plug-ins being installed. It also describes the online
conversion tool. The conversion process between the input VRML file and the WebGL using offline commands which take the VRML
file as a source file and convert it into the HTML file. The nodes are then converted into scene graph nodes used for the scene creation.
A scene tree is then initialized and populated using these nodes containing their info and sent to the proposed dynamic WebGL
template. Finally, a new HTML5 file is created and displayed on the user's Web browser. An extensive set of experiments are
conducted to show the process of the offline conversion.

Keywords: X3D, VRML, WebGL, HTML5, Offline Converter, 3D Vector Graphics, Web-based Graphics Library.

1. INTRODUCTION
X3D is an open standard for 3D content delivery. It is
not a programming API, not just a file format for 2. LITERATURE REVIEW
geometry interchange. It joins both geometry and run- This section discusses some related work about
conversion mediums available for VRML TO HTML5.
time behavioral descriptions into a single file in a
Fatma Ziwar and Rimon Elias [1]. In this paper authors
number of different file formats available for it,
including the Extensible Markup Language (XML). It is have proposed the method of conversion by web-based
application. In this paper, the first-ever VRML-WebGL
the next version of the VRML97 ISO specification,
converter is created. It performs the conversion between
integrating the new search in commercial graphics
hardware features including architectural improvements 3D virtual world graphics written in a VRML file and
based on years of feedback from the VRML97 WebGL, thus allowing these 3Dgraphics to be drawn
development community. and rendered directly on the Web without using
additional plug-in or file viewer. This paper focus on a
The aim of X3D is to provide an interoperable platform conversion technique that is capable of editing a WebGL
for real-time, interactive virtual environments over the template by sending the parameters and objects of the
network. This goal is realized by suite of ISO requested graphics to be included in the HTML5 context
specifications that support the portability, of the output Web page.
interoperability and continuity of digital assets. For
example, these specifications include the declarative The application applies the different requested
characterization of interactive scenes in various operations onto the requested objects. It does data
encodings (XML, utf-8, binary) as well as an event- acquisition, processing and conversion process between
VRML and WebGL contexts. Also a file viewer is called
based API for integration with other languages.
to view the VRML input file graphical output on the
HTML5is a markup language used for structuring and Web browser to compare the two graphical outputs.
displaying content on the World Wide Web. It is the fifth
and current major version of the HTML standard. 3. PROBLEM STATEMENT
HTML5 includes detailed processing models to VRML is an easy to write modeling language used to
encourage more interoperable enforcements; it enlarges, represent Scalable Vector Graphics. These graphics
improves and rationalizes the markup available for could be then viewed on a standalone application like a
documents, and introduces markup and application player or a viewer or onto a Web browser by using an
programming interfaces (APIs) for complicated web.[6] additional plug-in. On the contrary, the main
For this reasons, HTML5 is also a campaigner for cross- functionality for using WebGL is to represent SVG
platform mobile applications, because it incorporates directly onto the Web browser. Unfortunately, there is
features designed with low-powered devices in mind.
Dipak Vinayak Shirbhate and Dilip Sahebrao Ingole VSRDIJMCAPE, Vol. VIII (V) May2018 / 142

no tool to convert from VRML to WebGL. Thus, Fatma installed. Example of Web-based converter applications
Ziwar and Rimon Elias created converter to help in include VRML Merge that runs as a Java applet inside
filling the gap of the conversion between VRML and the Web browser, a command line tool, or as a desktop
WebGL. In this paper, the first-ever VRML-WebGL application [4] and it is used to convert VRML'97 files
converter is presented and discussed (Section III).Not to X3D files. Other examples include Instant reality X3D
only the WebGL written inside the JavaScript context encoding converter that allows the developer to produce
helped in this conversion but also the new features new applications and virtual worlds by modeling and not
available in HTML5 and the new open source modern just programming.
Web browsers that support WebGL . They succeeded in
developing a conversion technique that is capable of
successfully editing a WebGL template by sending the 5. PROPOSED METHODOLOGY
extracted parameters and objects of the requested This section discusses the flow of proposed methods for
graphics to be included in theHTML5 context of the converting VRML to html5.After conversion it
output Web page. Being a Web-based application, it can integrates 3D content seamlessly into our webpage - the
run directly onto the Web browser page, and could run scene is directly written into the HTML markup. It
on wider range of hardware and operating systems eliminates the plug-in requirement to view VRML file
platforms; so, it can be used by more developers and/or on the web. There are two methods of converting VRML
users. code to X3DOM (HTML5).
 Online Conversion
But, this technique uses a continuous internet connection  Offline Conversion
and requires a time to convert the file. So in this paper an
offline method of conversion of VRML to HTML5 is Online conversion:
suggested.
START
4. PROPOSED WORK
OVERVIEW: Until recently, Web browsers were not
able to directly draw graphics on the Web without using
additional plug-ins like Flash, or file viewers. Rendering Open the
rich computer 3D graphics directly on a Web page was a
dream of many developers. But, as the Hyper Text
Markup Language fifth major version (HTML5) arises it Type following url
came up with the help for solving this problem, by http://doc.instantreality.org/tools/x3d_enc
having the canvas element embedded into its context. oding_converter/
Thus graphics can be rendered without any helper
programs, Java applet or even the usage of an additional
plug-in, only by using the Canvas and Scalable Vector
Select the Encoding as
Graphics (SVG) elements. The usage of HTML5 and
additional scripts like JavaScript containing WebGL
running on an Internet-connected computer and a Copy and Paste the VRML code into the
WebGL enabled browser allows for faster drawing
graphics onto the Web permitting the generation of 3D
graphics and for automated memory management [1].
Choose output encoding as HTML5
Currently there are many modern Web browsers that
support WebGL, for example: Google Chrome, Mozilla
Firefox, Safari, Opera and recently Internet

Explorer IEII [2].Software converter applications can be Click on Convert Encoding Button
Web-based applications in which the user or the
developer can have its access through the Web browser
being used directly, or as a stand-alone computer
program. An existing stand-alone VRML converter STOP
applications example: Ayam which is a free open source
3D modeling environment [3] used to export and import Offline conversion:
files written in a way that can be read by human easily. The second method (offline conversion) is called
These files are known for the Render Man Interface Transcoding. If you have VRML file, you can easily
Bytestream (RIB) files. To render the scenes modeled by recode your data without any data loss. There are
Ayam, a Render Man compliant renderer is required different options but the easiest right now is the Avalon-
to978-1-4799-5807-8/14/$31.00 @2014 IEEE being Optimizer (aopt) from the Instant Reality packages.
Dipak Vinayak Shirbhate and Dilip Sahebrao Ingole VSRDIJMCAPE, Vol. VIII (V) May2018 / 143

Download and install the Instant Player system. The  aopt -iinput.wrl -x output.x3d
package includes a command line tool  To Convert VRML or X3D-XML directly to HTML
called aopt(.exe) which we will use for conversion. use the command
Setup your shell-environment to find and include the  aopt -i input.x3d -N output.html
binary. The usually paths are:  To Convert VMRL or X3D-XML to XHTML use
the command
Windows: C:\Program Files\Instant  aopt -i input.x3d -M output.xhtml
Player\bin\aopt.exe
 To convert VRML file which has tag <Inline>,
Various aopt commands: generally we use "-u” in command for Optimization.
run "aopt -h" to get a full list of commands.  aopt -i input.x3d -u -N output.html
 To Convert VRML directly to X3D-XML use the
command

START

Open the browser.

Type following url


http://www.instantreality.org/downloads/

Download and install the Instant Player

Go to Start All Programs Accessories Command Prompt

Change the default path of command prompt to


C:\Program Files\Instant Reality\bin\

Now place input .wrl file into the bin folder itself
that we want to convert.

Type the command in command prompt


to convert file as below and press Enter.
aopt -i VW2.wrl -N VW2.html

STOP

6. RESULT ANALYSIS
Both (online and offline) methods were compared

Online conversion:
In the first method, user is supposed to simply copy and paste VRML code in online
convertoravailable athttp://doc.instantreality.org/tools/x3d_encoding_converter/

By applying above discussed method of online conversion tool we got the result:
Dipak Vinayak Shirbhate and Dilip Sahebrao Ingole VSRDIJMCAPE, Vol. VIII (V) May2018 / 144

The final Encoded output will be created just below the convert encoding button.

Copy that final Encoded output and paste it to new text file and save that file with .html extension.

Offline conversion:
In this second method of offline conversion user got the final output as follows:
Dipak Vinayak Shirbhate and Dilip Sahebrao Ingole VSRDIJMCAPE, Vol. VIII (V) May2018 / 145

A new file VW2.html file will be generated in the same bin folder itself.

where input.wrlis vrml file chosen for conversion operating system.


and output.html is the HTML5 file obtained after  Offline converted files can be better manipulated
conversion. Our findings in conversion process are as with mouse as compared to files converted by online
follows: convertor.
 Small files are best suited for online conversion
 Large files are best suited for offline conversion.
7. REFERENCES
 Conversion process works well on windows 7 [1] Fraunhofer IGD/VCST “X3DOM Documentation”
Dipak Vinayak Shirbhate and Dilip Sahebrao Ingole VSRDIJMCAPE, Vol. VIII (V) May2018 / 146

Release 1.4.0 constrained frequent sets” Proc. International Database


[2] FatmaZiwar and Rimon Elias The German University in Engineering & Applications Symposium, 2009, Pp 109–
Cairo, Egypt {fatma.ziwar, rimon.elias @guc.edu.eg} 120.
[3] “VRML to WebGL Web-based Converter Application” [22] C.C. Aggarwal, Y. Li, J. Wang, J. Wang “Frequent pattern
2015. mining with uncertain data” Proc. ACM SIGKDD
[4] Khronos Group. WebGL - OpenGL ES 2.0 for the Web. International Conference on Knowledge Discovery and
http://www.khronos.org/webgl/ Retrieved 15 December Data Mining, 2009, Pp 29–37.
2013. [2] Microsoft Developer Network. WebGL. [23] S. Zhang, Q. Chen, Q. Yang “Editorial: acquiring
[5] J. Behr, Fraunhofer Institute for Computer Graphics knowledge from inconsistent data sources through
(IGD). Features and Benefits. weighting” Data & Knowledge Engineering, 2010. Pp
http://www.instantreality.org/story/what-isit!. Retrieved 779–799.
15 December 2013. [24] L.A. Abd-Elmegid, M.E. El-Sharkawi, L.M. El-Fangary,
[6] http://www.web3d.org/about/faq/ and http://web3d.org/ab Y.K. Helmy “Vertical mining of frequent patterns from
out/overview uncertain data” Computer and Information Science, 2010.
[7] X. Yin, and J. Han “CPAR: Classification based on Pp 171–179.
Predictive Association Rules” Proceedings of the SDM, [25] L. Sun, R. Cheng, D.W. Cheung, J. Cheng “Mining
SIAM, Francisco California, 2003. uncertain data with probabilistic guarantees” Proc. ACM
[8] Zhen Peng, Lifeng and Wu Xiaoju Wang “Research on SIGKDD International Conference on Knowledge
Multi-Relational Classification Approaches” IEEE, 2009. Discovery and Data Mining, 2010, Pp 273–282.
Pp 3-9. 
[9] He J, Liu HY, Du XY. “Mining of multi-relational
association rules” Journal of Software, 2007, Pp 2752-
2765.
[10] Baralis, E., Cerquitelli, T, & Chiusano, S. “IMine: Index
support for item set mining” IEEE Transactions on
Knowledge and Data Engineering, 2009, Pp 493–506.
[11] Chen, L., & Wang, C. L. “Continuous sub-graph pattern
search over certain and uncertain graph streams” IEEE
Transactions on Knowledge and Data Engineering, 2010,
Pp 1093–1109.
[12] Chen, S. M., & Bai, S. M. “Using data mining techniques
to automatically construct concept maps for adaptive
learning systems”Expert Systems with Applications,
2010, Pp 4496–4503.
[13] Chu, C. J., Tseng, V. S., & Liang, T.” Efficient mining of
temporal emerging itemsets from data streams” Expert
Systems with Applications, 2009 Pp 885–893.
[14] Ding, J. F., &Yau, S. S. T. “TCOM, an innovative data
structure for mining association rules among infrequent
items” Computers and Mathematics with Applications,
2009, Pp 290–301.
[15] Du, Y. J., & Li, H. M. “Strategy for mining association
rules for web pages based on formal concept analysis”
Applied Soft Computing, 2010 Pp 772–783.
[16] Eichhorn, A., Girimonte, D., Klose, A., & Kruse, R. “Soft
computing for automated surface quality analysis of
exterior car body panels” Applied Soft Computing, 2005
Pp 301–313.
[17] Gharib, T. F., Nassar, H., Taha, M., & Abraham, A. “An
efficient algorithm for incremental mining of temporal
association rules”Data and Knowledge Engineering, 2005,
Pp 800–815.
[18] Kuo, R. J., Chao, C. M., & Chiu, Y. T. “Application of
particle swarm optimization to association rule mining”
Applied Soft Computing, 2011 Pp 326–336.
[19] Lee, A. J. T., Wang, C. S., Weng, W. Y., Chen, Y. A., &
Wu, H. W. “An efficient algorithm for mining closed
inter-transaction item sets” Data and Knowledge
Engineering, 2008, Pp 68–91.
[20] C.K. Leung, D.A. Brajczuk “Efficient algorithms for
mining constrained frequent patterns from uncertain data”
Proc. ACM SIGKDD Workshop on Knowledge
Discovery from Uncertain Data, 2009, Pp 9–18.
[21] C.K. Leung, D.A. Brajczuk “Mining uncertain data for

You might also like