The future of the 3D graphics engine?

2309 0

 

Imagine working in 3D CAD and seeing your model in near photorealistic quality at any point in the design process – without leaving your application viewport. This holy grail of 3D graphics could soon become a reality thanks to a new hybrid viewport technology from AMD, writes Greg Corke.

Graphics engines for CAD have changed very little over the years. Models can be displayed in real time, shaded with edges or rendered with realistic materials, lights and shadows using graphics API OpenGL. The effects can be impressive, but if you want photorealism you need to take the model offline and use a dedicated ray trace renderer. And it can take minutes or hours to deliver a single static image.

AMD’s Radeon Pro graphics division is looking to change this with a new hybrid viewport technology that it is offering for free to developers of CAD and other 3D software.

The technology aims to deliver on two fronts. First, it is designed to render models in real time, inside the viewport, with what AMD describes as a ‘close to photorealistic look and feel’. “Seeing your design rendered in real time allows you to make decisions in real time,” explains AMD’s Marty Johnson, director, ISV relationship management, developer programs.

Second, it has the potential to dramatically increase 3D graphics performance in all display modes, meaning users can get more out of their graphics hardware and can also work with much more complicated 3D models.

To do this AMD has drawn on two different technologies – Vulkan, a low-level graphics API from the same folks that develop OpenGL, and Radeon Rays, a GPU-accelerated ray tracing software that sits at the heart of AMD’s physically-based renderer, Radeon ProRender. Software developers can choose to implement both technologies or either one on its own.

Simplifying the rays

Ray tracing needs huge amounts of compute power and we’re still a long way away from being able to deliver highest quality results in real time using mainstream hardware. This means AMD has had to take some short cuts when developing its hybrid viewport technology.

Advertisement
Advertisement

Instead of simulating light precisely and letting it bounce off thousands of surfaces to deliver the perfect image, AMD’s technology makes some approximations, as Johnson explains. “We’re using ray tracing in an optimised way,” he says. “Instead of doing it for every pixel, we’re sending a sample set of rays out and then, from that, we produce the whole image.

“We’re giving the raster engine hints, using rays to show where shadows are going to fall. Likewise, reflections and ambient occlusion. There’s a whole bunch of different effects you can get there.

“It’s a way of getting ray tracing techniques into a real time environment so it doesn’t impact performance. The result is a real time viewport that has a much closer to photorealistic look and feel [than current viewports].”

Photorealism, of course, is in the eye of the beholder, so we asked Johnson to explain how good the viewport quality can be compared to results from Radeon ProRender and other physically-based renderers.

“To me, it’s a spectrum,” he explains. “Real time performance versus ray trace quality. What we’re trying to do is bring real time further up the spectrum. It depends on what features you [the CAD software developer] want to implement. You can push it all the way to full ray tracing in the viewport, if you’ve got enough horsepower (eventually that’s the end goal), but in the meantime we’re using raster. It’s a continuum.”

Each CAD software developer will be able to implement different levels of features, depending on the requirements of its users and the level of performance they want to get out.

“Right now, we’re just showing the capabilities of what’s possible. It’s up to the ISVs to adopt this and actually turn it into something real and then all those choices and sliders and switches will be what they decide to put into their UI [User Interface],” explains Johnson.

“If you had a lower level GPU you could actually run less demanding features or if you have a higher-end GPU you could run more,” continues Rob Jamieson, AMD’s Industry Alliance Manager, Workstation Graphics.

Software developers that adopt AMD’s physically-based renderer, Radeon ProRender, will also have a direct route into the hybrid viewport technology. In theory, those that have already embedded Radeon ProRender into their application, such as Maxon with Cinema4D, should have an easier route in.

With support for global illumination, true reflections, transparency and refractions, as well as area lighting, Radeon ProRender offers a step up in terms of image quality. However, as the physically-based renderer requires thousands of passes for every pixel, best quality results will take minutes or hours, depending on the GPU hardware.

Getting a grip on Vulkan

AMD’s hybrid viewport technology is not just about beautiful visuals and giving the designer the ability to see what things might really look like as early in the development process as possible. It should also help improve viewport performance in general, meaning designers are able to work with significantly larger models on the same graphics hardware. This is down to a new low-level graphics API called Vulkan from the Khronos Group, a not-for-profit consortium of AMD, Nvidia, Intel, Apple and others that is focused on open standards.

Khronos Group also develops OpenGL, the graphics API that dates all the way back to the early 1990s and is used in virtually all 3D CAD applications. OpenGL has many benefits, not least that it is mature, relatively easy to implement, and well understood by 3D CAD software developers. However, it contributes to a problem that occurs in many CAD applications where the CPU is the bottleneck for 3D performance. It is particularly noticeable when displaying very large models, simply – in shaded with edges mode, for example.

In such ‘CPU limited’ workflows it doesn’t matter how much GPU hardware you throw at your datasets, performance will not increase, or only increase very little. The only way to boost frame rates significantly is to increase the frequency (GHz) of the CPU.

Much of this is down to the way OpenGL works in conjunction with the graphics driver. Every time a 3D model is moved in the viewport, the CAD application has to talk to the driver, and then to the GPU, which adds a layer of latency.

To get around this bottleneck AMD developed Mantle, a low-level API that was then donated to the Khronos Group and became the open standard that is now Vulkan.

There are two big advantages to Vulkan. The first is it can reduce the CPU overhead by giving CAD software developers more direct control over the GPU. Rather than having to route everything through the graphics driver, the CAD application can talk straight to the hardware, reducing the layers of complexity. Second, Vulkan code can be multi-threaded, so commands can be split across multiple CPU cores, before they are submitted to the GPU.

Both of these things should mean CAD software is able to use the GPU much more efficiently, leading to better viewport performance, the ability to handle much bigger CAD models and to load them much quicker.

“We’ve been constrained. Customers want to load a whole city or want to load a whole car and want to do it in real time,” says Jamieson. “The performance is there [in the GPU], it’s just that the software hasn’t been there to use it.”

The downside of Vulkan is that it is more complex. As the CAD application has to take on some of the work that the driver used to do, it makes it harder for software developers to program viewports. In many of the older CAD applications, OpenGL code can be found in lots of different places, making swapping out the graphics engine much more involved.

AMD acknowledges that this is a significant challenge for software developers, which has held some back from Vulkan development. However, it is looking to remove some of the barriers by not only offering a helping hand to the larger CAD vendors, but providing a free toolkit called V-EZ [read: V easy].

“V-EZ is a middleware, a programming API on top of Vulkan that is designed to make it a lot easier for software developers to implement Vulkan and write Vulkan code,” explains Bruno Stefanizzi, senior manager software engineering, AMD Radeon Pro. “We’ve done a lot of the work for them. It means they can write significantly less code – less than half – and still get all the benefits. It means they don’t have to re-invent the wheel.

“A good example here is ‘line stipple’, the command used to draw dotted lines in CAD packages,” he says. “In OpenGL, there’s a native way to draw those lines but, in Vulkan, the software developer would have to program it in. In V-EZ we’ve done that for them.

“The same goes for shaders,” he adds. “V-EZ can directly take OpenGL shaders and use them. They are a first-class citizen in V-EZ.”

Stefanizzi gave DEVELOP3D a technology demonstration to show the kind of performance one might expect when using V-EZ inside a CAD application. He showed a complex motorcycle assembly in shaded mode, comprising 20 million+ polygons, sectioned through it in real time then exploded all the parts – all fluently inside the viewport.

So, when might we see the technology appear in shipping CAD applications? Johnson confirmed that AMD is already talking to some of the largest CAD software developers, although would not name names. He was, however, upbeat about how the hybrid viewport technology has been received. “The Initial impression about what we’re trying to do, and the objectives and the potential for it, is resonating well with everyone we talk to,” he said. “However, there’s a lot of development work, and you have to hit the release cycles [of CAD software], but we’re optimistic.”

Open for business

As AMD’s hybrid viewport is based on open technology, it is designed to work with all different GPUs, from AMD, Nvidia or Intel. The basic requirement is that the GPU must support Vulkan 1.0.

All users will likely experience a general performance increase over their current hardware when viewing models in simple shaded with edges mode and be able to work with bigger models. However, those looking to get ‘near photorealistic quality’, as close to real time as possible, will likely need a more powerful GPU.

This is where the CAD software developers need to make a good call to support their users most effectively. Most users will currently have entry-level or mid-range GPUs, so to suddenly ramp up the requirements dramatically could be met with resistance. Of course, it would be a great opportunity for AMD (and Nvidia) to sell more powerful GPUs.

<

Paving the way to VR

To date, most design and engineering focused VR solutions have been separate applications that pull CAD data into a game engine or a high-end visualisation tool.

By squeezing more performance out of the GPU hardware, could AMD’s hybrid viewport technology pave the way for CAD software developers to enable VR inside the viewport and allow designers to jump in and out of VR to influence the design process? We put this to Johnson.

“This is in line with the future of visualization,” he said. “I think you will see viewports that support VR directly. Adopting our Ray Tracing and V-EZ technologies will help drive that transition and we are ready to help ISVs get there.”

Conclusion

AMD has spent the last few years trying to get its physically-based renderer, Radeon ProRender, in as many places as possible. And it’s done a pretty good job in the M&E sector. The company now has plug-ins for SolidWorks, 3ds Max, Maya, and blender, and there are direct integrations for Rhino and Cinema4D. Others, including PTC Creo and Modo, are in the pipeline.

The strategy here was always to try and head off Nvidia at the pass and limit potential damage to AMD GPU sales from Iray, Nvidia’s GPU renderer that only works with Nvidia GPUs. Introducing Radeon ProRender, a free GPU renderer that works on any GPU hardware, gave customers options.

While AMD was always playing catch up with Nvidia here, it is now trying to take the initiative. Its new hybrid viewport technology not only promises to deliver better quality visuals in the viewport, but can also help break through CPU bottlenecks, a long-standing issue of many 3D CAD applications.

From what we have learnt, AMD’s hybrid viewport technology certainly sounds impressive and has the potential to offer big benefits to CAD users across the board. The big question is, will the technology give software developers sufficient additional incentive to take the leap into Vulkan and embark on the significant job of developing a brand-new graphics engine? If one of the major CAD vendors does jump in and give its users a substantial performance and quality advantage over others, there could be a ripple effect.

Of course, it will be interesting to see how Nvidia reacts. Theoretically, it could already be planning something similar, perhaps using a derivative of its AI-enhanced ray tracing technology it announced last year. One thing’s for sure, the competition for graphics in 3D CAD just got a lot hotter.

AMD will be demoing this technology live at DEVELOP3D LIVE – watch it live online at 11.50am. REGISTER HERE

If you enjoyed this article, subscribe to AEC Magazine for FREE

Advertisement

Leave a comment