Archived

This topic is now archived and is closed to further replies.

Maximum coordinate space

This topic is 5113 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a question about Direct3D''s maximum coordinate space. Vertices are defined using Single precision floats. This means that I should be able to draw a box using Single.MinValue and Single.MaxValue as the coordinates for the corners. When I try this, the maximum box I can draw seems to be about 800,000 units across. No errors occur; it just doesn''t draw. Any suggestions? I''m trying to define a coordinate space to model the solar system (Sun, planets, etc.). I''d like to use the maximum amount of the coordinate system as possible so I can zoom in to a fairly granular level. Suggestions or comments would be most helpful. Thank you in advance. Rick

Share this post


Link to post
Share on other sites
When you draw things, make sure the zbuffer has an appropriate range. Then beware that very large polygons may not be drawn. A good indication of the maximum screen size a poly can have, check the guard band sizes in dxcaps.
if you plan to draw a thing the size of the solar system, you will have a problem with floats (I suppose you knew that), floats have a precision of about 7 digits, and your smallest object, say as moon is more than 10 million times smaller than your total range. What I suggest is keep high precision computations and do a non linear sqweeze at render time, eg render close by object, the each object as a layer, like in photoshop, making sure the zbuffer can discriminate between them.

Share this post


Link to post
Share on other sites
Yaeah, make sure your near and far clipping planes are properly set. If you want to zoom in, then change your clipping planes when zooming in. That''s what I am doing.

Share this post


Link to post
Share on other sites