Managed to get quite a few problems solved for the translation today.
I got the camera position factored into our translation algorithm, and scenes that only have objects drawn at the near plane can be translated properly. If there were to be multiple objects in the scene with different z-axes, the translation would not appear well.
What needed to be done was to factor in the translation vector of the different nodes for their individual translations, in particular, the z position. This can be easily obtained through a method that can be found in the library that we are using.
Hence, in order for the translation to work, there are 3 things that we have to take into consideration:
- Camera's z position
- Node's default scene z position
- Node's z position that is being set by us when drawing
Once that was done, I then moved on to look into another issue with the translation.
We have a scene where there is a heart model, and 4 identical cylinders. Somehow, the translation for the heart works very nicely. As for the cylinders, the translation value seemed to be too large, and the objects fly all over the view. We have another scene where there is only one cylinder in it, and it translates properly.
I am suspecting that this has got to do with the way the scene is being created. Tried working with 3DS Max to change the order in which the nodes are being drawn, and also to recreate the camera, but both did not seem to have any effect at all.
Got to do some research on this tomorrow to get an idea as to what is going on.
No comments:
Post a Comment