webgl and vrml/x3d


  • Excuse me for my poor English, but I use the translator google

Here, I created several years a very large 3D world in VRML
I read that WebGL could help me do it again live.
Can we make a multi-user chat how to blaxxun?
I do not program in VRML, and so I do not have the ability to program in another language (I am a child of 14 years)
is it possible to link the code VRML/X3D easily?
if so how?

you have any examples?
Thank you

can you speak in good english for use a translator thank you


I can’t help myself, I need to ask this:

VRML was around like 10-15 years ago. If you are 14 now, how old have you been when you made that very large 3D world?

To answer your question, AFAIK the people from X3DOM and XML3D are coming from a VRML background and they work on integration with WebGL. But I doubt if that helps you.

VRML is a high-level API and WebGL low-level.

my uncle 5 years ago and was programming in VRML2 so 2 years ago, as I was fascinated by what he was doing, I have learned with him, he abandoned his worlds, I improved and made more beautiful, but VRML has always struggled to win and despite a full commercial site in 3D, I haven t had only 100 visitors over 3000 who really visited the store in 3D (java applet blaxxun)
so I wanted to know if the WebGL, m’ll have succeeded in putting this shop, or my other worlds to date

(I hope this translates well. I have tried to keep my English simple.)

VRML is a messy idea. That is why it failed. It tries to do too many things.

It is:

  1. A file format for storing 3D models.
  2. A “markup” language like HTML for annotating those models.
  3. A “scripting” language to make them move in simple ways.

It doesn’t do any of those things well - and it is too complicated.

WebGL is none of those things. It is (mostly) a set of functions that a JavaScript programmer can call to draw triangles in 3D. It is simple. But it works well.

Converting your VRML world to run with WebGL would require you to do all of these things:

  1. Find a way to convert the VRML models into a form that JavaScript can load. You would probably have to write a computer program to do that.
  2. Write JavaScript to draw those models using WebGL. That is not easy because VRML’s rules for how to convert (for example) a ‘cube’ object into triangles are complicated. Especially when texture maps are being used. You would also need to learn some GLSL.
  3. Replace whatever “markup” was in the VRML files with some other thing.
  4. Rewrite the ‘behaviors’ in the VRML scripting system in JavaScript.

This requires good programming skills. I have been a 3D graphics programmer for 30 years - and I would not do this project!

I think that anyone who is smart enough to have done all of that work should learn to write JavaScript. You obviously have a passion for 3D graphics - and that is a wonderful thing! Teach yourself JavaScript, then WebGL and GLSL - and then start building a new 3D world, better and more beautiful than the last one!

I hope this translates well!

(For those who doubt a 14 year old could have built something like this…my son was only 7 years old when he started building 3D “worlds”. At 8 years old, he built several of the tracks for my “TuxKart” game. It’s definitely possible if the child is exposed to the 3D tools and has both motivation and adult assistance from an early age).

How about coverting VRML to X3D and then fire up X3DOM?

Still tedious but better than recreate VRML player in WebGL.

For a quick try you can use the X_ITE JavaScript library which will take a VRML model and render it using canvas. No browser plug-ins needed.

I wish I could link to the StackOverflow answer I received from the very helpful VIncent Marcetti from the Web3D Consortium - only just joined, can’t yet add URLs to my posts :frowning: