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. 







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