Improving O3D's hardware compatibility
Wednesday, July 1, 2009 | 6:54 PM
Labels: O3D API Blog
We stated before that one of the goals for O3D is to have no caps bits. That means, not having to make your code check if the user's machine has feature X: You can write your application and you can assume it will run on any machine. We also wanted to select a feature set that we thought would be a good trade off between allowing high end real time 3d graphics and running on the majority of machines currently in use without being too slow.
Unfortunately, there are a few extremely popular GPU chipsets out there, like the Intel 950 for example, that were missing a couple of these base features we felt were important. Without those features certain common effects, like floating point textures for shadows, would not be possible. We could have just used the software renderer on machines without those features but the software renderer is not as fast as GPU hardware so we came up with what we think is a reasonable solution.
When your application starts up O3D, it can tell O3D what features the application requires. If the user's system supports those features then O3D will use them. If the user's machine does not support those features O3D will fall back to a software renderer. If you do not explicitly request those features then O3D will not let you use them.
We chose this solution because it provides the ability for a much wider range of applications to use GPU hardware than before. For example, only 3 of our samples required additional features to be available, which means most of the samples will run with GPU hardware acceleration even on low-end GPU hardware.
The specific features you can request are:
- Floating Point Textures.
- Geometry with more than 65534 vertices.
If you are using our sample utility libraries, the second argument to o3djs.util.makeClients is now a comma separated list of features you want. For example:
o3djs.util.makeClients(initStep2, 'FloatingPointTextures');
will request floating point texture support for your application.
If you dig into our samples you'll notice this is only used in 3 of our samples so far.
- generate-textures.html uses floating point textures.
- vertex-shader.html geometry with more than 65534 vertices.
- The beach demo because it uses geometry with more than 65534 vertices.
For those last 2 samples, we could have avoided requesting those features if we wanted to. For example, in the case of vertex-shader.html we could just slightly lower the resolution of the plane that it animates. For the beach demo we could split any models with more then 65534 vertices in half and draw the 2 halves separately. This shows that many applications do not need those features or can be refactored to not need them and so a very large percentage of O3D applications can run using hardware accelerated graphics. Higher end applications that need those features can request them and they'll still run everywhere, but for applications that don't they'll be able to use hardware acceleration on a much much larger set of computers.
One question that is likely to come up is, "Could this solution be used to add really high end features like Shader 4.0?". The current answer is unfortunately "no". The reason is, if the user's machine doesn't have those features O3D uses a software renderer. Unfortunately we don't have access to a software renderer that could draw Shader 4.0 features at a reasonable speed.
We hope you'll agree that getting hardware acceleration on as many machines as possible is as awesome as we think it is. This change helps O3D run its best on a much larger set of computers.
9 comments:
DaVince said...
How about allowing to lower detail on the 65534 vertices thing? Meaning that, if there are too many vertices, it just lowers the amount of vertices, giving the user a lower-detail model in return (possibly relying on testing CPU power available to incrementally cut back polygons).
Well, I think it'd be a neat feature, anyway. It would certainly help on my low-end Eee PC if such performance features were added in. :)
July 3, 2009 at 12:48 PM
Anonymous said...
There is nothing stopping an application from asking if you want to run the low-poly version of their product. On the other hand, for most products, there is no reason they can't split their geometry and just have look exactly the same and therefore not have to ask.
July 7, 2009 at 9:08 PM
Arash Keissami said...
This update broke Windows 7 compatibility. I know Windows 7 is not officially supported yet, but it used to work prior to the last update. Now it doesn't, any idea as to when it may be fixed?
July 8, 2009 at 6:41 PM
Arash Keissami said...
After trying to run XP through virtualization in Win 7 with no luck, I learned that changing the Compatibility mode of Firefox to Windows XP (SP3) will get O3D running in Win 7 again!
July 9, 2009 at 12:06 AM
Anonymous said...
Windows 7 is fixed in trunk. Hopefully will be able to push a patch ASAP.
July 11, 2009 at 2:45 PM
Carsten Orthbandt said...
While I welcome the ease of use with your caps scheme I think a little bit more control would be helpful.
If say a game could detect if FP textures are available in the hardware renderer it could switch to a version of its content that looks better.
Asking the user to select the right one is a total no-go in my experience.
July 20, 2009 at 2:22 AM
Unknown said...
i read somewhere that native client could be used for stuff like sound and physics which also are very important parts of most 3d applications.
but i don't this... what's the point of o3d then with native client? since if i understand this correctly native client could run any full blown game engine in the browser?
i am very curious who this whole 3d on the web thing will turn out. :p
July 27, 2009 at 4:22 PM
The Rainbow UI said...
Hello there,
Just want to know if there are plans to extend the O3D api to flash developers, actionscript 3.
Thank you
Best regards
January 25, 2010 at 1:10 AM
DaVince said...
Sounds very unlikely. First of all, there's no reason, especially with more and more free and open technologies starting to replace Flash. Heck, even a Flash interpreter written in just JavaScript and SVG was released recently...
You have to keep in mind JavaScript is the most-used (and actually only) type of client-side scripting language specifically made for web pages and similar technologies out there.
January 26, 2010 at 9:51 AM
Post a Comment