VRML Questions : Urgent ! Interior and Exterior Object

Greeting to all experts here :

I had a questions(maybe simple to you but not to me) to ask about Virtual Reality Modeling Language (VRML). I totally new to this language. Basically i just want to make a object as display at :
[Note : You need to download pulgin in - Quick Time to view the objects]

I dont know what requirement i need to use in order to solve my problems. I just want to make a simple VRML objects(involve interior and exterior design) for a car. To make it clearly, i just want to solve following problems :

1.know all the basic step to make/run a vrml object.
2.make an object (involved interior and exterior) for a car as shown at URL above into a web site.

If you know the solutions, simply show me the guidelines. I need someone who really can put me into the right track to solve my problems. This is urgent to me, i need to get it work.

Thanks a millions.
I appreciate for ANY helps. Hope you can give me some guidelines.
I know this questions is pretty dizzy (maybe for me), i will give a huge BONUS points to anyone who can solve the questions completely.

LVL 29
David H.H.LeeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David H.H.LeeAuthor Commented:
Thanks for quick response, sunnycoder(good record too).
Which links to solve my problems? I out of time to solve this problems(create interior and exterior object for car). Hope you can put me in the right track. Thanks a millions.

For the basic info to make/run a vrml,
can you state it out here what tools + all required stuff that i need to use?I cant read it from the links Benetz.

Thanks. Sorry for my dizzy requirement. This is new to me, hope you can understand the situations here. Thanks.

from the links it seems that to write a program, all you need is a text editor ...
what platform are you working on

I would suggest that you take some time to read the links carefully
http://www.eecs.tulane.edu/www/Benetz/mainpage.html and
have everything that you are asking
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

David H.H.LeeAuthor Commented:
Thanks again for your helps. I will take some times to read for it. But, could be somethings can be more express to solve my problems?I only need to get it work for create a simple interior and exterior for a car. I need to get it work in a web site. Possible same tools as recommended here?
What i need is just a text editor? What tools do i need to use it run vrml object? It's that Quick time or any else? Sorry for asking stupid questions, but i'm really no idea for it. Thanks a millions.
I hope you can guide me more clearly. I'll award 'A' and bonus points if this problems solve. There still have some though questions need to solve. I'm lack of time to do this.

from: http://tecfa.unige.ch/guides/vrml/vrmlman/node5.html
There are 3 (major) ways for producing VRML:

Code VRML by hand. If you like to hand code VRML (which is a good choice for learning how to build truly interactive worlds), consider getting a VRML assisting editor like emacs.

Use a VRML supporting Modeler. There are basically two types of tools you need:
A object creation tool

A space (or ``walk thru'') creation tool such as Cosmos' (ex-Paragraph's) Home Space Builder (the non-profit versions are cheap) or Virtus' Walkthrough Pro.

See e.g. the Tools section in our VRML Pointers.

Use a Filter to transform other 3D Formats into VRML.

The structure of a WRL File:
VRML (*.wrl) files have 3 basic elements:

A header which tells the browser that the file is VRML and which version also. A header line is mandatory.

Comments are preceded by a #.

Nodes: Most everything else are nodes. Nodes generally contain:
The type of node (required). Nodes always are in Capital letters.
A set of curly braces {.....} (required)
A number of fields, all or some of which are optional. Note that there is no mandatory ordering of fields.
Fields with that can have multiple values require braces [ ...]. Fields always start with lowerCase letters.
Here is a typical VRML file with a single node (don't worry if you don't understand it):

# VRML V2.0 utf8
# A sample file with a single stupid node

Transform {
   translation 0 2 0
   children [
      Shape {
         geometry Sphere {}

4. Mixing HTML with VRML
In this chapter you will learn a few more static VRML tricks. Alternatively you can start learning some interactive VRML and directly go to chapter 5 on page
4.1 Introduction
HTML-VRML links:
Embeding a VRML browser in a HTML Page:
VRML-HTML links:
JAVA, Javascript, VRML, HTML links:
4.2 Mixing HTML and VRML Frames
4.2.1 VRML scenes library
4.2.2 VRML to HTML in a frame
4.3 VRML code generation
4.3.1 VRML Code Generation with Javascript
4.4 Adding and Removing Kids with Javascript
David H.H.LeeAuthor Commented:
I' read some of the article provided by you.
It's that anyways i can integrate with javascript? I want to make a object can rotate 360 degree as shown at
[Note : You need to download pulgin in - Quick Time to view the objects]

I didint need javascript and just follow your guidelines?
Thanks again for your great helps.
i really want to get it work as soon as possible. I'm lack of time.
Thanks a millions and sorry for my stupid questions again. Your effort to me will reward a great grade later. I promise!

Generating a VRML scene with Javascript is rather easy once you know how to deal with Netscape Frames using Javascript. [You also need a browser that works, some older browsers will not allow to it].

Generating VRML can be useful in various applications, e.g. you can write a VRML generator for your students or show mathematical functions (or other data) in 3D. The next example has been very strongly inspired from Yasuyuki Suzuki's Object Creation example.

Example 4.3.1   VRML code generation with Javascript  

Contents: Contains 2 frames. A html/javascript frame allows to create simple objects
HTML: generate-js-1-frame.html
Frame Source: generate-js-1-frame.text
HTML/JS Source: generate-js-1.text

Look at the full example before you move on please ! Below we will discuss a slightly simplified version. Anyhow, in order to understand this example you rather must learn more about Javascript than anything about VRML. (See Netscape's OnLine documentation for developpers. At Tecfa we have a copy of the JavaScript Guide).

Let's have a quick look at the frameset in the file generate-js-1-frame.html (if you don't understand this, please read section 4.2 on page ).

<FRAMESET COLS="*, 70%">
<FRAME SRC="generate-js-1.html" NAME="menu_frame"
<FRAME SRC="javascript:top.vrml();" NAME="vrml_frame"

Note that we also generate dynamically an inital object in the frame by directly calling javascript:top.vrml(). We could have left this page blank or inserted some canned VRML *.wrl page. Just remember that the frame to the left is called menu_frame and the frame to the right vrml_frame.
The user enters size and color information in the left (HTML/Javascript) frame and then can click on ``Create Box''. This will render the object in the VRML frame to the right.

This is a simple HTML Form that will collect information from the user. Note the following things:

The ``form'' tag has just a name field (no method field needed)

The input ``button'' will trigger an onClick event when pressed that will launch the ``makeBox'' script. This script will then poll the form for values the user entered (see below).

<FORM NAME="cont">
<STRONG>Example Objects:</STRONG><p>
<STRONG>Custom Box:</STRONG><p>
 Width : <INPUT TYPE="text" NAME="w" VALUE="1" SIZE="5"><br>
 Height : <INPUT TYPE="text" NAME="h" VALUE="1" SIZE="5"><br>
 Depth : <INPUT TYPE="text" NAME="d" VALUE="1" SIZE="5"><p>
 Colors (be sure to enter values between 0 and 1!<br>
 Red  : <INPUT TYPE="text" NAME="red" VALUE="1" SIZE="5"><br>
 Green : <INPUT TYPE="text" NAME="green" VALUE="0.2" SIZE="5"><br>
 Blue  : <INPUT TYPE="text" NAME="blue" VALUE="0" SIZE="5"><p>

<INPUT TYPE="button" NAME="make" VALUE="Create Box" onClick="makeBOX();"><P>

Here are the most important elements of the (simplified) source code. The function makeBOX will draw a box of a given size in given colors. It will access the values entered in the form below and write lines to the VRML frame.

In this example (like in the original) we poll the values the user entered from the form, e.g.:

     w = top.menu_frame.document.cont.w.value;

will assign the value for the width of the box to a temporary variable ``w''. There are several ways of doing this as you can note. Also note that polling the form is one way of doing it. Alternatively we could have passed the values to this function within the INPUT tag of the form. Finally be aware that we do not any value checking. It's up to the user to enter good values.

var MIMEType = 'x-world/x-vrml';

function makeBOX() {
     var w, h, d, red, green, blue;
// Note: all these ways of accessing values work
     w = top.menu_frame.document.cont.w.value;
     h = top.menu_frame.document.forms[0].h.value;
     d = document.forms[0].d.value;
     r = document.forms[0].red.value;
     g = document.forms[0].green.value;
     b = document.forms[0].blue.value;

     with (top.vrml_frame.document) {
        writeln('#VRML V2.0 utf8');
        writeln('Shape \{');
        writeln('  appearance Appearance \{');
        writeln('        material Material \{ ');
        writeln('           emissiveColor ' + r + ' ' + g + ' ' + b);
        writeln('                      \} \}');
        writeln('  geometry Box \{');
        writeln('     size ' + w + ' ' + h + ' ' + d)
        writeln('\} \}');

The only other thing you need to know is how to write to the VRML frame:

We first get some handling on the VRML frame's document window object. The with statement makes referring to objects properties and methods simpler (you don't have to type the full path each time). In the following expression top refers to the ``top'' node in the Javascript hierarchy (?), vrml_frame is the name we gave to the frame where the plugin will appear and document refers to it's contents.
      with (top.vrml_frame.document) {

Next we ``open'' output to the vrml frame with 'x-world/x-vrml'.
      var MIMEType = 'x-world/x-vrml';

We defined the variable MIMEType here since we do it more than once.

Next you simply write out the VRML code (including a valid VRML header first).

Then you close the output to the frame.
Note how we can simply ``string-add'' ``canned'' VRML instructions with variables in the code. Javascript is very convenient in this respect.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David H.H.LeeAuthor Commented:
I know pretry much above Jscript. I will take some time to look around all the advice given here. I will post my questions here if i got anythings didnt get it work. Thanks for your helps.
if you get any sample for VRMl objects which can lead me to solve my questions based on this objects shown at :
[Note : You need to download pulgin in - Quick Time to view the objects]
I do like to take a look here.

THANKS a millions!!

David H.H.LeeAuthor Commented:
I'm still cant get it work. Maybe i missing somethings/steps there?

what is the problem encountered ?
try with the simplest example first and then graduate to more complex stuff
David H.H.LeeAuthor Commented:
sunnycoder ,
sorry for late response because I need some time to read all your provided links/helps before i ask silly questions. Now i think i have some idea about VRML. Thanks.

ok,it seem work fine for a simple object. Do you have any more complicated source which can be use in a web site, just like what i need ?It's seem i still can't build a complete object that can be use inside a web site.

Thanks a thousand millions for your HELPS. Appreciate!

Hope can hear from you very soon...

this time apologies from my side... i was away on a vacation

>Do you have any more complicated source which can be use in a web site, just like what i need
right now, no... just give google search a try with eact keywords for what you require and it will definitely throw up some useful links
David H.H.LeeAuthor Commented:
@sunnycoder ,
I know i cant search the info. based on Internet. But, i'm afraid i will get all those garbage references...Can you show me the right references?I appreciate your helps as well....Thanks..Thanks...Thanks..

Hope can hear good news from you.

David H.H.LeeAuthor Commented:
sunnycoder ,
Thanks for your helps. Appreciate for your helps. THANKS!!!!
Sorry for my delay because i'm busy with my others task. Time to make it PAQ.

Take this BONUS points for your great services. THanks.

Appreciate your helps!! Thanks....

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Game Programming

From novice to tech pro — start learning today.