HOOPS-D3D Technical Overview

by Rob Mazeffa

The document discusses TSA’s recent addition of a Direct3D driver for HOOPS and provides a general assessment of Direct3D. We also outline what we believe the future holds for OpenGL and Direct3D and how this will impact HOOPS users.

D3D Overview
D3D is a low-level, immediate-mode drawing interface designed to facilitate the hardware acceleration of 2D and 3D graphics display, similar to OpenGL. The D3D API is a Windows-specific graphics “platform” that applications and higher level subsystems can leverage to gain superior graphics quality and rendering speeds. While Direct3D has been used extensively in and optimized for the gaming sector, Microsoft is working to make it more optimized for other markets such as CAD/CAM/CAE.

HOOPS Support for D3D
Official support for D3D commenced in HOOPS/3dAF v11. Specifically, the HOOPS 3D Graphics System includes a D3D driver similar to its OpenGL, X11 and GDI drivers which may be enabled by simply specifying the driver type to be ‘Direct3D’. The driver takes advantage of all major D3D features, and significant effort has gone into optimization and stability. One of HOOPS’ main benefits is that developers can work from a high level because they are insulated from lower-level device interfaces and requirements. As such, developers do not need to specially organize their data when using the D3D driver. If general HOOPS scene-graph organization guidelines are being followed, HOOPS will be able to optimally drive D3D.

The Future of OpenGL on Windows
It has been reported that Microsoft’s next major version of Windows (Longhorn) is scheduled to ship sometime in 2006, and based on various reports Longhorn will continue to officially support the OpenGL API. Similar to previous versions of Windows, it will include support for an OpenGL installable client driver which allows graphics hardware vendors to provide hardware-accelerated OpenGL support. We expect that OpenGL will be officially supported through the life of Longhorn, thus it will remain a viable option for several years. However, because Microsoft will be primarily focusing on optimizing and extending D3D, we would fully expect Direct3D to begin to outpace OpenGL in terms of performance, functionality, and stability over the medium term. Over the longer term (post-Longhorn) we predict that Microsoft will begin phasing out support for OpenGL altogether.

Usage of D3D in the CAD/CAM/CAE/PLM markets
At present, the number of CAD/CAM/CAE/PLM applications driving D3D as their drawing interface is negligible. However, this promises to change as D3D becomes the primary, and more optimized solution for 3D graphics on the Windows platform.

In anticipation of an industry trend toward driving Direct3d several HOOPS customers have begun to test and evaluate the Direct3D to determine where it would best be used in their applications.

The Benefits of a Direct3D Driver to HOOPS Developers
HOOPS developers now have the ability to optimally drive the D3D API, thereby taking advantage of any performance or functionality advantages that D3D has or may gain over OpenGL.

Note that the HOOPS architecture is such that developers may choose to driver whichever API is faster for a particular rendering mode or with a particular class of data. For example, if testing demonstrates that Direct3D is faster with your shaded models but OpenGL performs better with wireframe rendering, developers may choose the best rendering path.

This flexibility ensures that your application is always running as fast as possible on the available hardware.

The Future of HOOPS’ OpenGL Driver
OpenGL continues to be a widely-used API that HOOPS will continue to support for many years. Based on our latest testing OpenGL appears to be the best rendering approach in many cases in Windows, so will continue to be used extensively by HOOPS developers. In addition, OpenGL will continue to be the preferred graphics API on non-Windows platforms for the foreseeable future. As a result, HOOPS will continue to optimally drive OpenGL on all platforms so that HOOPS applications can continue to provide optimized, cross-platform support.

Benefits to Developers with OpenGL-based Solutions
Many engineering software vendors have created their own graphics subsystems geared specifically toward driving OpenGL. These companies now must consider ways to leverage the coming benefits of Direct3D. The task of switching away from these home-grown OpenGL-based subsystems to a more flexible approach will require a challenging, costly and time-consuming overhaul effort.

Due to its high-level interface and rich set of encapsulated functionality HOOPS can help significantly ease the pain of this switch and dramatically reduce the costs/time of required development.

D3D Functionality and Performance
D3D functionality largely matches OpenGL in terms of support for graphical attributes, geometric primitives, and advanced rendering capabilities. HOOPS/3dGS API allows the developer to easily access such capabilities in a high-level, unified manner.

Customers who have tested their HOOPS-based application with both OpenGL and Direct3D have seen varying results based on the specific nature of their common models and the hardware configurations they use.

We strongly encourage all HOOPS customers to perform their own testing to make a determination of Direct3D’s benefits for your specific application.

We would also encourage HOOPS developers to consult with TSA regarding D3D support for various graphics cards and to share the results of internal testing to help up improve and optimize each driver.

TSA has performed internal testing of both OpenGL and Direct3D using the HOOPS Part Viewer application. To view the performance graphs representing the results of the tests with back plane culling off visit: http://developer.hoops3d.com/graphicscards/perf_test8/OGLvsD3D_performance8_graph2.htm. With back plane culling on visit:
http://developer.hoops3d.com/graphicscards/perf_test8/OGLvsD3D_performance8_graph1.htm. These results contain data for a variety of graphics cards, datasets, and rendering modes.

In summary, TSA’s test results show D3D to provide better performance than OpenGL in several gouraud-shading cases when backplane culling is on, but to fall behind in wireframe and flat-shading cases or when backplane culling is off. In general we found OpenGL to provide better performance on lower-end graphics cards. TSA intends to update these tests with each new HOOPS release. Again, although review of the TSA tests are useful, we encourage HOOPS users to perform their own tests using their own data in common scenarios on hardware that is important to them.

D3D Future Focus
To increase the rate of adoption among CAD/CAM/CAE applications we believe Microsoft will focus on making certain that D3D provides compelling performance advantages not only in gouraud-shaded cases, but in flat-shaded and wireframe cases as well. Additionally, we expect Microsoft will work closely with card vendors to help ensure that D3D performs more closely to OpenGL on lower-end cards.

TSA is working with Microsoft to highlight any shortcomings in functionality and performance to help ensure that D3D evolves to address the ongoing needs of our customers in the CAD/CAM/CAE/PLM markets. Similarly, TSA will continue to profile and improve HOOPS’ D3D driver, in order to ensure that D3D is being driven optimally across common CAD/CAM/CAE data models and rendering modes.

Summary
One of HOOPS’ primary strengths has always been to insulate the developer from lower level device interfaces by providing a high-level API which still takes maximum advantage of immediate-mode graphics APIs and hardware capabilities. Now that HOOPS officially supports D3D, existing developers have the advantage of being able to immediately and easily leverage D3D, with the possibility of providing increased performance to the end-user. Developers maintaining home-grown OpenGL-based subsystems have yet another compelling reason to replace them with HOOPS. As D3D evolves and becomes more compelling from a performance and functionality standpoint, HOOPS-based applications will already be in a position to leverage those benefits.