Sunday, September 15, 2013
Amazing Simulation of 1970s Graphics in WebGL
Its the mid 1970s all over again.
I actually have written my first WebGL application to display a .obj file.
First you have to convert the .obj to a ".json" file, and then type in its name to some code. But this process which might seem awkward and stupid, is actually all the more authentic. This makes the application feel even more 1970s with a retro user interface.
The image is of my test object, a viewpoint .obj of a playing card. By being completely flat, believe it or not, I can test certain things in my code that was useful. Yes I know, its not the most compelling 3D object you have ever seen, and you would not even guess that the object is lit, but it is.
The great advantage in having all this in HTML is that it provides all sorts of tools for layout, fonts, scrolling and so forth. Thus the "program log" window on the far left scrolls which was trivial to implement.
Wow! Thats exciting, isnt it !
Ok, so the status display is wrong. In fact this is the line segments of the very flat 3D object that you are seeing. The display does not become correct until the user rotates the object and from that point forward it is correct. Fixed in the next release.