• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

123 Neutral

About Xerion

  • Rank
  1. Hello all,   I followed the bullet demo for picking object and was able to successfully add it to my pet project.   What I am trying to do and failing is to have a rubber band selection in my opengl window. My though are on this line. A rubber band is pretty much a 2d box so I can easily get the 4 cornes and similalry to the demo for single click picking I can get the near and the far points for each of my corners. Thus I will have 8 points or a frustrum if you wanna call it as such.   How can I use bullet to get all my objects that reside in that frustrum ?   I have been reading that I can do it either via the btPairCachingGhostObject or btGhostObject.   Anyone can provide a simple example ?   Thanks in advance
  2. Well, it seems that i need your help again about this matter. Everything works smooth as , up to a point but then it breaks. I use the angles that i extract from the rotation matrix along with the translations to move to that location and then glRotate so i can finally draw some things... and everything is good up to a point when i can see that the object i am drawing faces on a weird angles and not towards where it is supposed to be... I checked my code and is similar to what i have found over the internet and people say that it is indeed working but when i do arbitary rotations to the 3d space it seems that things brake at a point and if i keep moving arround they get fixed. I tried to understand when things break and why but i could not find anything.. I am open for different suggestions if you have any on how to draw on the place where the camera is :) I can post my code if you think that it helps but i am just using something similar to http://www.gamedev.net/community/forums/topic.asp?topic_id=319213 ths one to extract the angles. Thank you one more time, your help is priceless :D
  3. If you extract the angles from the rotation matrix there are ambiguities which can lead to object facing the wrong way if you draw something with that extracted angles. Is that ambiguity resolved if you use quaternions ? Cause from what i see there is not much of a difference cause in both ways you need to get the atan which actually will give two solution for each angle. Any help ?
  4. Thank you for your answer. Let me provide some more info then and see where it goes :) The interface is not something special i think. It is a 3d world representation in order to simulate a "virtual" test field for photogrammetric calibrations. So the user can move and rotate freely at the test field. I dont want to keep track of all his movements and rotations but at the specific points that the user chooses i want to know the location of that specific point as it is the exterior orientation of the camera. And to know that what i actually need is the 3 tranformations and 3 rotations from the origin of the coordinate system. I dont really know what else to say. I hope i provided some more info but if you have any specific question i am more than happy to answer. At the moment i am using an actor frame to manage the moving arround the "world". PS. I dont have to use Euler angles but i need to know the Euler angles as an output lets say (its a simulation so what i test onwards is how accurate i find the orientation and location so i got to have something to compare it with :) ) and also cause i want to draw something at that location which can only be done with glPushMatrix() transform and rotate with that position and orientation in space for every "selected location". I am open to suggestions though :) sure there is a better way to do it. What is more accuarate quaternions or Euler? i know i can extract the euler angles from the rotation matrix but there can be different combinations that satisfy that rotation. Since i have never worked with quaternions i am asking for you experience over the matter! Thank you again ! [Edited by - Xerion on February 9, 2009 11:52:42 PM]
  5. The titile may be a bit enigmatic but i am in need to know the angles of rotations that are applied when a user moves arround. The user can rotate freely arround any axis or any arbitary point. Things are really easy if you allow rotation only arround x,y,z axis as you can just keep track of the 3 rotation angles... But what happens when we have rotations arround arbitary points ? How can i find the 3 angles that i need to rotate from my origin to get at the same exact view that the user had ? I only talk about rotations cause the translations are really easy to get from the GL_MODELVIEW[16]. I need to do that so i can save the exterior orientation(EO) of the locations that the user selects which actually means knowing the x,y,z and the 3 rotations ω,φ,κ from the origin of the coordinate system. Not allowing the user to move freely arround is not a solution :P Thank you in advance
  6. How can i create gradient circles ?

    Either i am missing something or its my fault that i forgot to mention that i am using OpenGL. Thanks for the idea though i think i can still use something similar in opengl and create gluDisks with the same center but have a hole in the middle so each one gets drawn after the other with different colours.... but this will require lot of resources!
  7. Kinda newbie question but here it is ! :) I want to draw lots of circles that are gradient. Can this be done somehow ? or i have to texture map ?
  8. Hello i just wanted to save my viewport to higher resolution(for example 4kx4k pixels) and from what i have been reading tile rendering is the way to go or using Framebuffer object and then saving it. Well i tried both but the quality of the image of the FBo was not the best which i really dont know why :) It had some blurness arround the objects i created e.g. 2 white gluDisk. Anyway , for tile rendering i am using this library http://www.mesa3d.org/brianp/TR.html and everything works good apart from the colors being a bit messed. What i mean by that is that colors are saved differently from what they are displayed :) Red becomes Green Green becomes Blue Blue becomed red So RGB is actually saved as GBR.If i could put R in the front everything would be sweet :P I guess its just some messup thingy of how they are being saved but i cant figure it out ... Any help ? :) Thank you in advance ! PS. i used similar code with the one provided in demo2 to save my image.Even in his demo with some changed to not draw random colors what i am saying can be seen.
  • Advertisement