Wednesday, January 12, 2011

12 January 2011

Continued with the fixing of the pan gesture for translation, but to no avail.

Kevin came in before lunch and talked to us about several new features that is to be done. Hopefully this would work towards our advantage for the extension. Anyway, we first listed down the items to be fixed:

- Translation in explode view
- Rotation (some angles could not be covered)
- Label locations

We would be implementing an online upload/download feature with the use of Dropbox API. We have decided to put all the 3D models inside a Dropbox folder, as well as their respective text files that stores individual node descriptions.

We managed to get the downloading of the 3D models up pretty quickly. Most of the time taken was spent on understanding the sample application provided. They made use of a lot of delegation, which made the understanding process a little tougher.

Though the downloading was done, we are still having some problems with the location to save the files. I was able to save it into the mainBundle, but seems like this is being restricted by Apple. Got to find the actual directory for saving tomorrow.

Tuesday, January 11, 2011

11 January 2011

A nice date today, 11.1.11. :)

Continued with the fixing of the pan gesture for translation. Reviewed the whole algorithm to see what we have missed out, or what went wrong, but still could not get any idea. In the end, I realized that we made a mistake while trying to retrieve the camera's z position after we did the explode. We added an extra value to the camera's z position while doing that, which caused the nodes to translate more that they should. It is more accurate now, but still not at the level we want yet.

Gonna have to try and figure out the problem tomorrow...

Monday, January 10, 2011

10 January 2011

Continued with researching on the center of models in OpenGL ES. Chanced upon this link, and it gave us most of our answers.

http://forums.create.msdn.com/forums/p/56669/345580.aspx

The pivots that we have set up in 3DS Max only works in modeling tools. In order to have our own pivot point in OpenGL ES, we would have to store that information ourself. We did, however, find a solution to the object's center, only when the model is not being exploded. This can be done easily by just setting the scene's center to (0, 0, 0) in 3DS Max.

Now, the problem is, how do we define where our pivot point in our code when every model is different?

We brought this issue up to Kevin, and came to a conclusion that the center of the models would have to be defined by the modeler when he/she creates the models. Whatever point the vertices of the model centers upon would be defined as the center by OpenGL ES. This would solve the issue when models are being exploded.

Then, we moved on to improve the algorithm for the explode feature. The previous algorithm translates the nodes by a certain value, and because of this, some nodes would appear to be out of the screen. We solved this by zooming the camera out by the largest translation distance of the nodes in the scene. While doing that, we also worked to improve the circle algorithm that we have based on some of my suggestions. This made the explode look nicer.

Then, with the improved explode feature, we realized that the translation was not working properly again. The translation values seems to be getting larger the longer we pan around.

Friday, January 7, 2011

07 January 2011

Started the day by reformatting the MacBook Pro and installing Windows 7. There were some problems with the version of Windows 7 being installed previously. Got all the necessary installations done before lunch.

Zac and I started working on adding lighting to our models, and to change the center of the models. Lighting was easy, since we have already done it before. Changing of the center, however, was the problem. We did some research and what we had to do was the change the pivot of the models in 3DS Max. We tried out many ways, but the POD models that we export from the scene still uses the default pivot.

We spent the rest of the day trying to solve this issue, but to no avail. However, I did manage to find an alternative online, which is to manipulate the transformations in coding to transform on a specified pivot. What was suggested was to first translate the object to -P, where P is the pivot point, do the necessary transformations, then translate the object to P. Wondering if this would work, and there definitely are complications. How do we define the pivot point in our program? We would have to discuss this issue of pivot points with Kevin next week.

Thursday, January 6, 2011

06 January 2011

Kevin came over today and looked at our progress. He did some testing and listed down a few things for us to fix.

- Dynamic model list creation
- Reset clipping
- Modify clipping
- Switch off for labels

We managed to get those fixed, and would be working on the following tomorrow:
- Add lighting for multi-node model
- Centre of rotation should be the centre of the object
- Compute explode radius based on z near

Tuesday, January 4, 2011

04 January 2011

Took another approach to implement the labels after having discussed with Kevin. We decided to forgo the drawing of lines and have the labels placed onto the nodes when being selected by the user.

We got the labeling for touching individual nodes done, but there are still some issues for showing all labels at the same time. When displaying all labels, the positioning depends heavily on the translation values of the nodes. Somehow, we are still unable to get the labels' position correctly for this.

Come to think of it, time really flies. In just about 7 weeks, our internship here would come to an end. Looking forward to working here as a temp staff till my enlistment, if possible. It has been quite a while since I received my mid SIP feedback from Kevin. I have been working actively, trying to improve myself. I hope that this would deserve me better grades for my SIP, and more importantly, heeding the feedback given by Kevin would definitely benefit me greatly in the future.

Monday, January 3, 2011

03 January 2011

New year, new start. Happy 2011 everyone! :D

Started working on the labeling of nodes today. Zac and I discussed on what to do and did some research on how people out there are doing the drawing of lines and labels.

Then, we decided to come up with the algorithm for the placement of the labels first, before we start drawing the lines. We modified the circle algorithm that Zac has used previously for the exploding of nodes. This algorithm sets an array that contains objects of NodeLabels.

Kevin came in at the end of the day and gave us some suggestions on how to get this done. We would be putting his suggestions into use tomorrow.