Download presentation
Presentation is loading. Please wait.
Published byRandell Henry Modified over 9 years ago
1
© Copyright Khronos Group, 2004 - Page 1 Coping with Fixed Point Arto Astala, CTO Arto@Fathammer.com
2
© Copyright Khronos Group, 2004 - Page 2 Fathammer Mobile Gaming Technology -X-Forge™ Game Development System -Client focused -Complete solution -4 years of experience Game development -Internal development -Game Development Partners Industry cooperation -Samsung, Gizmondo, Tapwave, Nokia -Intel, TI, Nvidia (& MediaQ), ATI -Channels (TBA)
3
© Copyright Khronos Group, 2004 - Page 3 Summary How do you do it without floats? You don’t !!!
4
© Copyright Khronos Group, 2004 - Page 4 Outline The Audience The Difference General Strategies The Production Chain Coding Summary Q & A Demo
5
© Copyright Khronos Group, 2004 - Page 5 The Audience Who you are? Professional experience Graphics experience Art experience
6
© Copyright Khronos Group, 2004 - Page 6 The Difference Problems in any math -Loss of precision -Speed of calculation -Implementation effort -The artists With floats you don’t usually notice -In mobile / embedded there is no difference -You can partly choose your problems There is a difference -Space, Speed, Effort limitation -Try to optimize the recurring effort -Fixed is better sometimes
7
© Copyright Khronos Group, 2004 - Page 7 General Strategies Don’t fight the system -Some things are just done in float, no matter what -Avoid risky operations -Train the artists Know your system -Order operations -Debug math -Create precision offline -How many polys per pixel you need Be careful -Audit the content -Debug the math -Use floats when needed (e.g. physics)
8
© Copyright Khronos Group, 2004 - Page 8 Production Chain All starts with content -Usually most effort, by far -Optimize effort -Avoid mistakes Tool chain massages it into suitable shape -Use all the precision you can -Verify everything -Pre-calculate Real-time processing in the device -Understand the problems -Don’t cumulate the errors -Solutions available, both math only and full game engine
9
© Copyright Khronos Group, 2004 - Page 9 Production Chain: Art Love your artist Art is done in float but understanding is needed -Set limits -Use natural one unit -Avoid extreme differences and sizes -Document! There is enough precision -Scale at export if necessary -Track the scaling factors Remember textures & UV mapping Remember device differences -Perspective correction, lights, raw performance differences
10
© Copyright Khronos Group, 2004 - Page 10 Production Chain: Tools Use all available precision -Doubles are good for fixed point -Select appropriate representation (quarternion) -Filter out all unnecessary data Pre-calculate as much as you can -Win-win: improves both performance and precision Verify your content -Weed out problems -Fast preview for artists helps -Verify limits -Useful error messages -Keep the coder out of the loop
11
© Copyright Khronos Group, 2004 - Page 11 Production Chain: Device Use old coders -Re-use at its best :-) Avoid risky things, bad things -Order of operations -Use alternative algorithms (normalize, length) Exploit the content -You know it, trust it! (limits) Discard errors, not precision -Collect transformations -Delay or eliminate world space -Calculate relative to camera
12
© Copyright Khronos Group, 2004 - Page 12 Coding Make always the same errors Use libraries, they are there Debug / trace your system Use precision where needed -Cumulation of errors -Catastrophic errors -Low volume -Physics Alternative ways -Sliding origo -World size limits -Shift decimal point, use multiple representations
13
© Copyright Khronos Group, 2004 - Page 13 Summary Success is achieved by care and feeding of the artists Understand your system Discard errors, not precision Just do it (without floats) Don’t reinvent the wheel There is always a way
14
© Copyright Khronos Group, 2004 - Page 14 Questions ?
15
© Copyright Khronos Group, 2004 - Page 15 COPING WITH FIXED POINT: Using fixed point in applications on top of OpenGL ES Maintain accuracy, avoid overflows and methods for improved performance Effective use of fixed point in OpenGL ES applications Float to Fixed-point based engine conversions, for those who want to write for common-lite STAYING GROUNDED IN A FLOAT FREE WORLD
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.