Jump to content
  • Advertisement
Sign in to follow this  
Basiror

Object space transformations *floats*

This topic is 4904 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

Hi I am working on a 3d map editor and just wondered til when i can use worldspace transformations instead of object space transformations IEEE 754 float standard save floats as follows 1 bit sign 8 bit exponent rightshit = exponent - 127 23 bits mantissa aka decimal letters lets say i want 0,000001 precision now when i multiply 4096,000001*4096,000001*4096,000001 dont i exceed the boundaries of the ieee standard?

Share this post


Link to post
Share on other sites
Advertisement
well

i don t want to screw the data inside the mapeditor

editing and suddenly your convex brush turns invalid when you move it because some dot products deliver false values, sucks doesn t it?


my EPSILON is 0.0001f so the precision should at least be 0.0001f>= desired precision otherwise plane equations might fail

Share this post


Link to post
Share on other sites
Don't use epsilon values that aren't representable as floats. Might result in really strange bugs. What Every Computer Scientist Should Know About Floating-Point Arithmetic

What kind of transformations do you do?

A somewhat usefull technique is to move the world a bit so that it doesn't contain the float origin (with some safety margin to it). That way you don't have regions that are far more precise than others. So it is safer to move stuff around.

Share this post


Link to post
Share on other sites
well thats what i thought of

instead of worrying about precision of my floats i just translate my objects to the worldorigin and do my calculation there

small numbers result in small floats and increase precision


but what i am looking for is a maximum distance that i could use to decide whether to translate to the origion or not

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!