Jump to content

  • Log In with Google      Sign In   
  • Create Account


Large Scale Coordinates


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Shag   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 September 2001 - 08:02 AM

OK ... here''s a problem I''m writing a space sim, and i''m using my own 96bit data type to store galactic coordinates - which gives a range of thousands of millions of light years with a resolution of 1 millimeter! But i can''t get my head around how to convert these coordinates into something that can be used by OpenGL - which ultimately converts everything to floats. I''ll give you an example of what i mean - The number 1584552368456 will be rounded to 1.584552e12 = 1584552000000 Therefore if you were to fly long distances, the positional accuracy of any given object will decrease. This is CRAP! One solution would be to alter the positions of all objects relative to the user - ie subract the user''s coordinates from the coordinates of all other objects. But this would be very slow, especially for thousands of stars, each with their own planetary systems. And bearing in mind i''m using my own data type, this will be slower than normal! Does anyone have any ideas how I can achieve the effect I''m after, without the subtraction every frame? Please feel free to make a suggestion! :-)

Sponsor:

#2 Dean Harding   Members   -  Reputation: 546

Like
Likes
Like

Posted 09 September 2001 - 11:42 AM

The "subtraction of the camera position from every object" happens anyway when you transform your vertices by the camera matrix. If you do your own transformations, you can do the subtraction with your own datatype, which if you optimize enough, shouldn''t be that big a deal (especially if you use a good LOD scheme - you don''t need to transform stars that are light years away, just draw a point in their general direction). Then you can use more "normal" (even hardware) transform for the rest.


codeka.com - Just click it.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS