This week I had to improve efficiency of handling obj files. There were two main tasks, one was to remove the temporary obj files created using conversion to free space on server. Another task was to merge the obj files, and load them as one entity to decrease the number of http requests. About 100 requests are made to render a simple model. This slow things down.
Worked on server setup. I have few problems with server. MongoDb conflict came while running OGV. I uninstalled mongoDb but started getting different error. Tried to search about it, but no success. Thinking of starting with a fresh rebuild of server. Also this will test the tutorial I wrote for install Meteor on FreeBSD works or not. As I haven't tried it on a completely new system.
I started reading the obj file format, from where I left, day before yesterday. If we wanted we can merge, or a more appropriate word would be append two obj files manually. I created a gist here where I explained how to append two obj files. It's simple math. But the problem here is that if we try to do it manually in OGV, a model having 400 obj files, each obj files having 100's of vertices. It seems impossible to perform the manual method. We have to think of a more automated approach to Obj files merging.
Today I did comparitively less work. I was out on a party :D. There are 3-4 students in my university who were selected for GSoC. We all celebrated the mid term evaluation success with a party. Amazing party it was. I had such fun after a lot of time. Also this was my first time I managed to throw a party to my friends at such scale.
Party was in morning. After that we went on a little road trip to nearby village, to celebrate the new car of my friend.
In late evening, I came back home, and picked up my laptop to work. I read few mails, and fixed few things related to search in OGV.
Today I searched online about OBJ files. As this week's task is all around handling obj files. It sure is a tough one, but not an impossible one
Threejs is a library, which is being used to render obj files in OGV. It has a merge function, which can be used to merge geometries. Geometry is a 3d shape. It can be a circle, a rectangle rendered using threejs. But we need some function to merge the obj files, to reduce the number of request a browser does to fetch each obj file.
After that, I started reading about OBJ files, why are they used and what is it's format.
I started working on thumbnail preview of model. As stated in my proposal, one way to take screenshot of model was to enable preserveDrawingBuffer: true
and take screenshot using renderer.domElement.toDataURL( 'image/png' )
Added the button to model view, clicking on it, stores the image data in collection ModelFiles
as screenshot.
Also tried to solve the error, getting on freeBSD server, but no success.