Size limit of world and view space

Started by
1 comment, last by Fargo 12 years, 2 months ago
Hi,
Im new to directx and have a question. I wanted to start out simple so I decided to build a solar system and have a ship travel to and from.. The ship would have the view point of the camera. The distances are in millions and billions of units (Km) so I wanted to know if the world and view space (transfomations) have any limit to size? This would make my life easier.. Or would the prefered method be to keep all the planets closer on the edge of a large playfield and use scaling to give the perception of getting closer or farthur away from a planet. ?
Advertisement
You should be probably careful with the floating point precision, all transformations matrices are built of float variables (4 bytes).
If you simply make a huge continuous space with relatively tiny planets, you many find out that you are not able to transform the planet verticles properly by the planet's world matrix - they may all end up in the same position, because of the precision limitation.

But honestly, I have no idea how big the space would have to be for this to become a problem. So it's just a warning about a potential problem if you choose the simple "brute-force" approach.

Anyway, that's also answer to you question about limit to size of world/view. Just what floats can store, but keep in mind not just the range of floats (max. exponent), but especially the precision (number of significant digits).
Thank you for the reply.. I see what you are talking about the possible world transfomation problem. perhaps the scaling method might be better..

This topic is closed to new replies.

Advertisement