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.

No comments:

Post a Comment