VRML,图形引擎, OpenGL,WebGL

从数据库中获取数据,并使用VRML语言来组织数据并将这些数据传输,在客户端,VRML语言写成的数据被解析成3D模型(比如obj,collada等格式的模型),或者自己写代码将VRML语言组织的数据解析成OpenGL或WebGL能够分析的数据,完成这个工作的可能是某些插件,然后再由基于webgl或opengl的图形引擎加载这些3D模型,从而完成绘制工作。



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!





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

Still tedious but better than recreate VRML player in WebGL. 







發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章